mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-29 18:53:22 +08:00
Syncing latest changes between public/private.
This commit is contained in:
parent
5f55efcb89
commit
5624bcb5e7
@ -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):
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND -->
|
||||
<!--DOCSHASH=4e89c37b263033ec4a3b8c5bc8c142ee-->
|
||||
<!--DOCSHASH=a9af83504c95ee68b2281719192df567-->
|
||||
<h4><em>last updated on 2020-02-19 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>
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user