diff --git a/assets/src/ba_data/python/bacommon/assets.py b/assets/src/ba_data/python/bacommon/assets.py index 3f375be2..fa789e89 100644 --- a/assets/src/ba_data/python/bacommon/assets.py +++ b/assets/src/ba_data/python/bacommon/assets.py @@ -44,9 +44,11 @@ class AssetPackageFlavor(Enum): class AssetType(Enum): """Types for individual assets within a package.""" TEXTURE = 'texture' + CUBE_TEXTURE = 'cube_texture' SOUND = 'sound' DATA = 'data' MESH = 'mesh' + COLLISION_MESH = 'collision_mesh' class AssetPackageFlavorManifestValue(entity.CompoundValue): diff --git a/assets/src/ba_data/python/efro/executils.py b/assets/src/ba_data/python/efro/executils.py index 4859e3e7..7b587a97 100644 --- a/assets/src/ba_data/python/efro/executils.py +++ b/assets/src/ba_data/python/efro/executils.py @@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # ----------------------------------------------------------------------------- -"""Exec related functionality shared between all ba components.""" +"""Exec related functionality shared between all efro components.""" from __future__ import annotations diff --git a/docs/ba_module.md b/docs/ba_module.md index 9a51a588..bbc1cb10 100644 --- a/docs/ba_module.md +++ b/docs/ba_module.md @@ -1,5 +1,5 @@ - +
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 let me know. Happy modding!
diff --git a/tools/bacloud b/tools/bacloud index 5e816fa9..b6134c08 100755 --- a/tools/bacloud +++ b/tools/bacloud @@ -91,6 +91,7 @@ class Response: deletes: If present, file paths that should be deleted on the client. dir_prune_empty: If present, all empty dirs under this one should be removed. + open_url: If present, url to display to the user. end_message: If present, a message that should be printed after all other response processing is done. end_message_end: end arg for end_message print() call. @@ -108,6 +109,7 @@ class Response: downloads_inline: Optional[Dict[str, str]] = None deletes: Optional[List[str]] = None dir_prune_empty: Optional[str] = None + open_url: Optional[str] = None end_message: Optional[str] = None end_message_end: str = '\n' end_command: Optional[Tuple[str, Dict]] = None @@ -377,8 +379,13 @@ class App: if not dirnames and not filenames and basename != prunedir: os.rmdir(basename) + def _handle_open_url(self, url: str) -> None: + import webbrowser + webbrowser.open(url) + def run_user_command(self, args: List[str]) -> None: """Run a single user command to completion.""" + # pylint: disable=too-many-branches nextcall: Optional[Tuple[str, Dict]] = ('user', {'a': args}) @@ -403,6 +410,8 @@ class App: self._handle_deletes(response.deletes) if response.dir_prune_empty: self._handle_dir_prune_empty(response.dir_prune_empty) + if response.open_url is not None: + self._handle_open_url(response.open_url) if response.end_message is not None: print(response.end_message, end=response.end_message_end,