mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-25 16:33:20 +08:00
Got master server communication working, cleaned up debug output spam, other minor bug fixes
This commit is contained in:
parent
8c8e057f70
commit
173a0ffa15
@ -117,9 +117,9 @@ class DependencyComponent:
|
||||
# For now lets issue a warning if these are instantiated without
|
||||
# a dep-entry; we'll make this an error once we're no longer
|
||||
# seeing warnings.
|
||||
entry = getattr(self, '_dep_entry', None)
|
||||
if entry is None:
|
||||
print(f'FIXME: INSTANTIATING DEP CLASS {type(self)} DIRECTLY.')
|
||||
# entry = getattr(self, '_dep_entry', None)
|
||||
# if entry is None:
|
||||
# print(f'FIXME: INSTANTIATING DEP CLASS {type(self)} DIRECTLY.')
|
||||
|
||||
@classmethod
|
||||
def dep_is_present(cls, config: Any = None) -> bool:
|
||||
@ -142,11 +142,11 @@ class DependencyComponent:
|
||||
class DependencyEntry:
|
||||
"""Data associated with a dependency/config pair in a ba.DependencySet."""
|
||||
|
||||
def __del__(self) -> None:
|
||||
print('~DepEntry()', self.cls)
|
||||
# def __del__(self) -> None:
|
||||
# print('~DepEntry()', self.cls)
|
||||
|
||||
def __init__(self, depset: DependencySet, dep: Dependency[T]):
|
||||
print("DepEntry()", dep.cls)
|
||||
# print("DepEntry()", dep.cls)
|
||||
self.cls = dep.cls
|
||||
self.config = dep.config
|
||||
|
||||
@ -190,7 +190,7 @@ class DependencySet(Generic[T]):
|
||||
"""
|
||||
|
||||
def __init__(self, root_dependency: Dependency[T]):
|
||||
print('DepSet()')
|
||||
# print('DepSet()')
|
||||
self._root_dependency = root_dependency
|
||||
self._resolved = False
|
||||
self._loaded = False
|
||||
@ -198,8 +198,8 @@ class DependencySet(Generic[T]):
|
||||
# Dependency data indexed by hash.
|
||||
self.entries: Dict[int, DependencyEntry] = {}
|
||||
|
||||
def __del__(self) -> None:
|
||||
print("~DepSet()")
|
||||
# def __del__(self) -> None:
|
||||
# print("~DepSet()")
|
||||
|
||||
def resolve(self) -> None:
|
||||
"""Resolve the complete set of required dependencies for this set.
|
||||
@ -211,7 +211,7 @@ class DependencySet(Generic[T]):
|
||||
if self._resolved:
|
||||
raise Exception("DependencySet has already been resolved.")
|
||||
|
||||
print('RESOLVING DEP SET')
|
||||
# print('RESOLVING DEP SET')
|
||||
|
||||
# First, recursively expand out all dependencies.
|
||||
self._resolve(self._root_dependency, 0)
|
||||
@ -229,7 +229,7 @@ class DependencySet(Generic[T]):
|
||||
raise DependencyError(missing)
|
||||
|
||||
self._resolved = True
|
||||
print('RESOLVE SUCCESS!')
|
||||
# print('RESOLVE SUCCESS!')
|
||||
|
||||
@property
|
||||
def resolved(self) -> bool:
|
||||
|
||||
@ -154,6 +154,8 @@ def filter_playlist(playlist: PlaylistType,
|
||||
and 'default' in setting):
|
||||
entry['settings'][setting_name] = setting['default']
|
||||
goodlist.append(entry)
|
||||
except ImportError as exc:
|
||||
print(f'Import failed while scanning playlist: {exc}')
|
||||
except Exception:
|
||||
from ba import _error
|
||||
_error.print_exception()
|
||||
|
||||
@ -107,7 +107,7 @@ class Session:
|
||||
from ba._error import DependencyError
|
||||
from ba._dependency import Dependency, AssetPackage
|
||||
|
||||
print(' WOULD LOOK AT DEP SETS', depsets)
|
||||
# print(' WOULD LOOK AT DEP SETS', depsets)
|
||||
|
||||
# first off, resolve all dep-sets we were passed.
|
||||
# if things are missing, we'll try to gather them into
|
||||
@ -140,7 +140,8 @@ class Session:
|
||||
required_asset_packages: Set[str] = set()
|
||||
for depset in depsets:
|
||||
required_asset_packages.update(depset.get_asset_package_ids())
|
||||
print('Would set host-session asset-reqs to:', required_asset_packages)
|
||||
# print('Would set host-session asset-reqs to:',
|
||||
# required_asset_packages)
|
||||
|
||||
if team_names is None:
|
||||
team_names = ['Good Guys']
|
||||
|
||||
@ -503,8 +503,8 @@ class PlaylistBrowserWindow(ba.OldWindow):
|
||||
position=(h + scl * 75, v + scl * 10),
|
||||
texture=ba.gettexture('lock'),
|
||||
draw_controller=btn)
|
||||
assert v is not None
|
||||
v -= scl * 130.0
|
||||
if v is not None:
|
||||
v -= scl * 130.0
|
||||
|
||||
except Exception:
|
||||
ba.print_exception("error listing playlist maps")
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND -->
|
||||
<h4><em>last updated on 2020-04-03 for Ballistica version 1.5.0 build 20001</em></h4>
|
||||
<h4><em>last updated on 2020-04-04 for Ballistica version 1.5.0 build 20001</em></h4>
|
||||
<p>This page documents the Python classes and functions in the 'ba' module,
|
||||
which are the ones most relevant to modding in Ballistica. If you come across something you feel should be included here or could be better explained, please <a href="mailto:support@froemling.net">let me know</a>. Happy modding!</p>
|
||||
<hr>
|
||||
|
||||
@ -754,17 +754,20 @@ def checkenv() -> None:
|
||||
from efrotools import PYTHON_BIN
|
||||
print('Checking environment...', flush=True)
|
||||
|
||||
# Make sure they've got curl.
|
||||
|
||||
# Make sure they've got our target python version.
|
||||
if subprocess.run(['which', PYTHON_BIN], check=False,
|
||||
if subprocess.run(['which', 'curl'], check=False,
|
||||
capture_output=True).returncode != 0:
|
||||
raise CleanError(f'{PYTHON_BIN} is required.')
|
||||
raise CleanError(f'curl is required; please install it.')
|
||||
|
||||
# Make sure they've got pip for that python version.
|
||||
if subprocess.run(f"{PYTHON_BIN} -m pip --version",
|
||||
shell=True,
|
||||
check=False,
|
||||
capture_output=True).returncode != 0:
|
||||
raise CleanError('pip (for {PYTHON_BIN}) is required.')
|
||||
raise CleanError(
|
||||
'pip (for {PYTHON_BIN}) is required; please install it.')
|
||||
|
||||
# Check for some required python modules.
|
||||
for modname, minver, packagename in REQUIRED_PYTHON_MODULES:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user