From c808f24cd3dd37982f2128dd8fba6deb9c12e47b Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Sun, 26 Apr 2020 14:17:28 -0700 Subject: [PATCH] Enabled Python UTF-8 mode to fix windows locale issues --- assets/src/ba_data/python/_ba.py | 2 +- assets/src/ba_data/python/ba/_music.py | 5 +++++ docs/ba_module.md | 8 ++++++-- tools/snippets | 22 +++++++++++++++++----- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/assets/src/ba_data/python/_ba.py b/assets/src/ba_data/python/_ba.py index c3ff6d76..0190c5d5 100644 --- a/assets/src/ba_data/python/_ba.py +++ b/assets/src/ba_data/python/_ba.py @@ -34,7 +34,7 @@ NOTE: This file was autogenerated by gendummymodule; do not edit by hand. """ # (hash we can use to see if this file is out of date) -# SOURCES_HASH=140243910598492207243870278972956193008 +# SOURCES_HASH=166094941497544152153395869789035079688 # I'm sorry Pylint. I know this file saddens you. Be strong. # pylint: disable=useless-suppression diff --git a/assets/src/ba_data/python/ba/_music.py b/assets/src/ba_data/python/ba/_music.py index 8653f906..58522c62 100644 --- a/assets/src/ba_data/python/ba/_music.py +++ b/assets/src/ba_data/python/ba/_music.py @@ -36,6 +36,10 @@ class MusicType(Enum): """Types of music available to play in-game. Category: Enums + + These do not correspond to specific pieces of music, but rather to + 'situations'. The actual music played for each type can be overridden + by the game or by the user. """ MENU = 'Menu' VICTORY = 'Victory' @@ -453,6 +457,7 @@ class MusicPlayer: signify that the default soundtrack should be used..""" # Subclasses should override the following: + def on_set_volume(self, volume: float) -> None: """Called when the volume should be changed.""" diff --git a/docs/ba_module.md b/docs/ba_module.md index 07490722..f4b7993e 100644 --- a/docs/ba_module.md +++ b/docs/ba_module.md @@ -1,5 +1,5 @@ -

last updated on 2020-04-25 for Ballistica version 1.5.0 build 20001

+

last updated on 2020-04-26 for Ballistica version 1.5.0 build 20001

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!


@@ -3339,7 +3339,11 @@ signify that the default soundtrack should be used..

inherits from: enum.Enum

Types of music available to play in-game.

-

Category: Enums +

Category: Enums

+ +

These do not correspond to specific pieces of music, but rather to + 'situations'. The actual music played for each type can be overridden + by the game or by the user.

Values:

diff --git a/tools/snippets b/tools/snippets index 0135831b..7dfedb3a 100755 --- a/tools/snippets +++ b/tools/snippets @@ -181,11 +181,23 @@ def androidaddr() -> None: sys.exit(255) arch = sys.argv[3] archs = { - 'x86': {'prefix': 'x86-', 'libmain': 'libmain_x86.so'}, - 'arm': {'prefix': 'arm-', 'libmain': 'libmain_arm.so'}, - 'arm64': {'prefix': 'aarch64-', 'libmain': 'libmain_arm64.so'}, - 'x86-64': {'prefix': 'x86_64-', 'libmain': 'libmain_x86-64.so'} - } # yapf: disable + 'x86': { + 'prefix': 'x86-', + 'libmain': 'libmain_x86.so' + }, + 'arm': { + 'prefix': 'arm-', + 'libmain': 'libmain_arm.so' + }, + 'arm64': { + 'prefix': 'aarch64-', + 'libmain': 'libmain_arm64.so' + }, + 'x86-64': { + 'prefix': 'x86_64-', + 'libmain': 'libmain_x86-64.so' + } + } if arch not in archs: print('ERROR: invalid arch "' + arch + '"; (choices are ' + ', '.join(archs.keys()) + ')')