mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-19 21:37:57 +08:00
build system rework
This commit is contained in:
parent
c643145bfe
commit
cd259c65af
@ -1670,6 +1670,10 @@
|
||||
"assets/build/ba_data/textures/iconRunaround.ktx": "https://files.ballistica.net/cache/ba1/6e/66/c5741e7805801c46c18df2f86c9a",
|
||||
"assets/build/ba_data/textures/iconRunaround.pvr": "https://files.ballistica.net/cache/ba1/54/e9/55a73bde307c0c7cb386c06837ac",
|
||||
"assets/build/ba_data/textures/iconRunaround_preview.png": "https://files.ballistica.net/cache/ba1/2b/09/82799554bb223e4ffba1aeb3dc81",
|
||||
"assets/build/ba_data/textures/iircadeLogo.dds": "https://files.ballistica.net/cache/ba1/d1/e3/2f27a82cd5e5c69f78a3bac30ab5",
|
||||
"assets/build/ba_data/textures/iircadeLogo.ktx": "https://files.ballistica.net/cache/ba1/58/b9/848fbac7a1c7ad6a9b2efd758ff1",
|
||||
"assets/build/ba_data/textures/iircadeLogo.pvr": "https://files.ballistica.net/cache/ba1/19/ba/66f832c978d9cf46f991e4811401",
|
||||
"assets/build/ba_data/textures/iircadeLogo_preview.png": "https://files.ballistica.net/cache/ba1/c7/d6/0740136951cbc17907f6192357b2",
|
||||
"assets/build/ba_data/textures/impactBombColor.dds": "https://files.ballistica.net/cache/ba1/70/54/c210c5ade9e3ba9a39b71631dc24",
|
||||
"assets/build/ba_data/textures/impactBombColor.ktx": "https://files.ballistica.net/cache/ba1/fc/3b/e1051061b1ed03bcbfdc6b9f8c79",
|
||||
"assets/build/ba_data/textures/impactBombColor.pvr": "https://files.ballistica.net/cache/ba1/d6/d9/0f81193db5aa44780ee8bb0943b9",
|
||||
@ -3930,14 +3934,14 @@
|
||||
"assets/build/windows/Win32/vcruntime140d.dll": "https://files.ballistica.net/cache/ba1/50/8d/bc2600ac9491f1b14d659709451f",
|
||||
"build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3f/99/9b94f7d478142a08e02c769b64ba",
|
||||
"build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/0d/f0/aed2b96addcc73e2de400aed2bdf",
|
||||
"build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/46/36/ebf2770d091219bbccac73d18d96",
|
||||
"build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ea/78/2b6fa11738eefee4c65900543679",
|
||||
"build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/11/74/74dcfb32ee1d796230cfac867978",
|
||||
"build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/db/63/5067f6fae12feecaa181d4f13a4d",
|
||||
"build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/fe/d7/2abece41eae6a109583d75300528",
|
||||
"build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ab/15/0ba36634e2d80e8bed3922a63b24",
|
||||
"build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/a0/7f/587e6a6d3dece7669d09bd042701",
|
||||
"build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/ad/4c/7b78e4c0a2e65a62fee7e38e34e7",
|
||||
"build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/c4/f8/1f8eee280877672da222c3397429",
|
||||
"build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/61/a7/7b8d223cef9f48fb58de41607009"
|
||||
"build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/95/36/1850f9eda27c27700a928a220d01",
|
||||
"build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ec/51/8117cff653fd3d3e5e4f2da28cfb",
|
||||
"build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/0b/1b/dc4328caa59881f3c7a18f4b71cd",
|
||||
"build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/16/06/ce0ff5f88a22e9fd7daae113b229",
|
||||
"build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/63/af/656a2860f87943d534fdb69386bd",
|
||||
"build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/88/6a/fc189088a19d5b12d624e5b9521a",
|
||||
"build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/c5/9b/597a1666729e0a9ad347f8aab67d",
|
||||
"build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/ba/03/4a8dd4bb42754cdd2bbd23949f25",
|
||||
"build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/46/b9/782ed1cea39bc38ae635dc21f4cd",
|
||||
"build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/97/1d/9fdaf892813430d8e9b3ef6628a4"
|
||||
}
|
||||
19
.idea/dictionaries/ericf.xml
generated
19
.idea/dictionaries/ericf.xml
generated
@ -29,8 +29,8 @@
|
||||
<w>achname</w>
|
||||
<w>achs</w>
|
||||
<w>acinstance</w>
|
||||
<w>ack</w>
|
||||
<w>ack'ed</w>
|
||||
<w>ack</w>
|
||||
<w>acked</w>
|
||||
<w>acks</w>
|
||||
<w>acnt</w>
|
||||
@ -82,6 +82,7 @@
|
||||
<w>appkit</w>
|
||||
<w>applescript</w>
|
||||
<w>appletv</w>
|
||||
<w>appmode</w>
|
||||
<w>appname</w>
|
||||
<w>appnameupper</w>
|
||||
<w>appstate</w>
|
||||
@ -150,8 +151,8 @@
|
||||
<w>bacommon</w>
|
||||
<w>badguy</w>
|
||||
<w>bafoundation</w>
|
||||
<w>ballistica</w>
|
||||
<w>ballistica's</w>
|
||||
<w>ballistica</w>
|
||||
<w>ballisticacore</w>
|
||||
<w>ballisticacorecb</w>
|
||||
<w>bamaster</w>
|
||||
@ -330,6 +331,7 @@
|
||||
<w>clionbin</w>
|
||||
<w>clioncode</w>
|
||||
<w>clionroot</w>
|
||||
<w>cloudbuild</w>
|
||||
<w>cloudshell</w>
|
||||
<w>cloudshellbuild</w>
|
||||
<w>cloudtool</w>
|
||||
@ -791,8 +793,8 @@
|
||||
<w>gamedata</w>
|
||||
<w>gameinstance</w>
|
||||
<w>gamemap</w>
|
||||
<w>gamepad</w>
|
||||
<w>gamepad's</w>
|
||||
<w>gamepad</w>
|
||||
<w>gamepadadvanced</w>
|
||||
<w>gamepads</w>
|
||||
<w>gamepadselect</w>
|
||||
@ -949,6 +951,8 @@
|
||||
<w>idevices</w>
|
||||
<w>ifeq</w>
|
||||
<w>ifneq</w>
|
||||
<w>iiarcade</w>
|
||||
<w>iircade</w>
|
||||
<w>ilang</w>
|
||||
<w>ilck</w>
|
||||
<w>ilogput</w>
|
||||
@ -958,6 +962,7 @@
|
||||
<w>imagestacklayer</w>
|
||||
<w>imagewidget</w>
|
||||
<w>imaplib</w>
|
||||
<w>imgdelay</w>
|
||||
<w>imgh</w>
|
||||
<w>imghdr</w>
|
||||
<w>imgw</w>
|
||||
@ -1172,8 +1177,8 @@
|
||||
<w>lsqlite</w>
|
||||
<w>lssl</w>
|
||||
<w>lstart</w>
|
||||
<w>lstr</w>
|
||||
<w>lstr's</w>
|
||||
<w>lstr</w>
|
||||
<w>lstrs</w>
|
||||
<w>lsval</w>
|
||||
<w>ltex</w>
|
||||
@ -1795,8 +1800,8 @@
|
||||
<w>sessionname</w>
|
||||
<w>sessionplayer</w>
|
||||
<w>sessionplayers</w>
|
||||
<w>sessionteam</w>
|
||||
<w>sessionteam's</w>
|
||||
<w>sessionteam</w>
|
||||
<w>sessionteams</w>
|
||||
<w>sessiontype</w>
|
||||
<w>setactivity</w>
|
||||
@ -2126,8 +2131,8 @@
|
||||
<w>txtw</w>
|
||||
<w>typeargs</w>
|
||||
<w>typecheck</w>
|
||||
<w>typechecker</w>
|
||||
<w>typechecker's</w>
|
||||
<w>typechecker</w>
|
||||
<w>typedval</w>
|
||||
<w>typeshed</w>
|
||||
<w>typestr</w>
|
||||
@ -2249,6 +2254,7 @@
|
||||
<w>wiimote</w>
|
||||
<w>wiimotes</w>
|
||||
<w>willeval</w>
|
||||
<w>winbeast</w>
|
||||
<w>wincfg</w>
|
||||
<w>wincount</w>
|
||||
<w>winempty</w>
|
||||
@ -2271,6 +2277,7 @@
|
||||
<w>wref</w>
|
||||
<w>writeclasses</w>
|
||||
<w>writefuncs</w>
|
||||
<w>wslpath</w>
|
||||
<w>wtcolor</w>
|
||||
<w>wtflib</w>
|
||||
<w>wttxt</w>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
### 1.5.26 (20178)
|
||||
- Simplified licensing header on python scripts.
|
||||
- Simplified licensing header on python scripts..
|
||||
|
||||
### 1.5.25 (20176)
|
||||
- Added Venetian language (thanks Federico!)
|
||||
|
||||
@ -1688,6 +1688,10 @@
|
||||
"ba_data/textures/iconRunaround.ktx",
|
||||
"ba_data/textures/iconRunaround.pvr",
|
||||
"ba_data/textures/iconRunaround_preview.png",
|
||||
"ba_data/textures/iircadeLogo.dds",
|
||||
"ba_data/textures/iircadeLogo.ktx",
|
||||
"ba_data/textures/iircadeLogo.pvr",
|
||||
"ba_data/textures/iircadeLogo_preview.png",
|
||||
"ba_data/textures/impactBombColor.dds",
|
||||
"ba_data/textures/impactBombColor.ktx",
|
||||
"ba_data/textures/impactBombColor.pvr",
|
||||
|
||||
@ -5361,6 +5361,7 @@ TEX2D_DDS_TARGETS = \
|
||||
build/ba_data/textures/hockeyStadiumPreview.dds \
|
||||
build/ba_data/textures/iconOnslaught.dds \
|
||||
build/ba_data/textures/iconRunaround.dds \
|
||||
build/ba_data/textures/iircadeLogo.dds \
|
||||
build/ba_data/textures/impactBombColor.dds \
|
||||
build/ba_data/textures/impactBombColorLit.dds \
|
||||
build/ba_data/textures/inventoryIcon.dds \
|
||||
@ -5763,6 +5764,7 @@ TEX2D_PVR_TARGETS = \
|
||||
build/ba_data/textures/hockeyStadiumPreview.pvr \
|
||||
build/ba_data/textures/iconOnslaught.pvr \
|
||||
build/ba_data/textures/iconRunaround.pvr \
|
||||
build/ba_data/textures/iircadeLogo.pvr \
|
||||
build/ba_data/textures/impactBombColor.pvr \
|
||||
build/ba_data/textures/impactBombColorLit.pvr \
|
||||
build/ba_data/textures/inventoryIcon.pvr \
|
||||
@ -6165,6 +6167,7 @@ TEX2D_KTX_TARGETS = \
|
||||
build/ba_data/textures/hockeyStadiumPreview.ktx \
|
||||
build/ba_data/textures/iconOnslaught.ktx \
|
||||
build/ba_data/textures/iconRunaround.ktx \
|
||||
build/ba_data/textures/iircadeLogo.ktx \
|
||||
build/ba_data/textures/impactBombColor.ktx \
|
||||
build/ba_data/textures/impactBombColorLit.ktx \
|
||||
build/ba_data/textures/inventoryIcon.ktx \
|
||||
@ -6567,6 +6570,7 @@ TEX2D_PREVIEW_PNG_TARGETS = \
|
||||
build/ba_data/textures/hockeyStadium_preview.png \
|
||||
build/ba_data/textures/iconOnslaught_preview.png \
|
||||
build/ba_data/textures/iconRunaround_preview.png \
|
||||
build/ba_data/textures/iircadeLogo_preview.png \
|
||||
build/ba_data/textures/impactBombColorLit_preview.png \
|
||||
build/ba_data/textures/impactBombColor_preview.png \
|
||||
build/ba_data/textures/inventoryIcon_preview.png \
|
||||
@ -6990,13 +6994,13 @@ build/ba_data/data/languages/%.json : ../.efrocachemap
|
||||
build/ba_data/data/maps/%.json : ../.efrocachemap
|
||||
@cd .. && tools/pcommand efrocache_get assets/$@
|
||||
|
||||
src/%.tex2d.png : ../.efrocachemap
|
||||
src/ba_data/%.tex2d.png : ../.efrocachemap
|
||||
@cd .. && tools/pcommand efrocache_get assets/$@
|
||||
|
||||
src/%_+x.tex2d.png : ../.efrocachemap
|
||||
src/ba_data/%_+x.tex2d.png : ../.efrocachemap
|
||||
@cd .. && tools/pcommand efrocache_get assets/$@
|
||||
|
||||
build/%_preview.png : ../.efrocachemap
|
||||
build/ba_data/%_preview.png : ../.efrocachemap
|
||||
@cd .. && tools/pcommand efrocache_get assets/$@
|
||||
|
||||
build/%.dds : ../.efrocachemap
|
||||
|
||||
@ -40,12 +40,14 @@ class App:
|
||||
This value increases by at least 1 with each release of the game.
|
||||
It is independent of the human readable ba.App.version string.
|
||||
"""
|
||||
return self._build_number
|
||||
assert isinstance(self._env['build_number'], int)
|
||||
return self._env['build_number']
|
||||
|
||||
@property
|
||||
def config_file_path(self) -> str:
|
||||
"""Where the game's config file is stored on disk."""
|
||||
return self._config_file_path
|
||||
assert isinstance(self._env['config_file_path'], str)
|
||||
return self._env['config_file_path']
|
||||
|
||||
@property
|
||||
def locale(self) -> str:
|
||||
@ -55,7 +57,8 @@ class App:
|
||||
ba.App.language, which is the language the game is using
|
||||
(which may differ from locale if the user sets a language, etc.)
|
||||
"""
|
||||
return self._locale
|
||||
assert isinstance(self._env['locale'], str)
|
||||
return self._env['locale']
|
||||
|
||||
def can_display_language(self, language: str) -> bool:
|
||||
"""Tell whether we can display a particular language.
|
||||
@ -107,7 +110,7 @@ class App:
|
||||
'hi': 'Hindi'
|
||||
}
|
||||
|
||||
# Special case for Chinese: specific variations map to traditional.
|
||||
# Special case for Chinese: map specific variations to traditional.
|
||||
# (otherwise will map to 'Chinese' which is simplified)
|
||||
if self.locale in ('zh_HANT', 'zh_TW'):
|
||||
language = 'ChineseTraditional'
|
||||
@ -130,7 +133,9 @@ class App:
|
||||
@property
|
||||
def user_agent_string(self) -> str:
|
||||
"""String containing various bits of info about OS/device/etc."""
|
||||
return self._user_agent_string
|
||||
# return self._user_agent_string
|
||||
assert isinstance(self._env['user_agent_string'], str)
|
||||
return self._env['user_agent_string']
|
||||
|
||||
@property
|
||||
def version(self) -> str:
|
||||
@ -140,7 +145,8 @@ class App:
|
||||
string elements such as 'alpha', 'beta', 'test', etc.
|
||||
If a numeric version is needed, use 'ba.App.build_number'.
|
||||
"""
|
||||
return self._version
|
||||
assert isinstance(self._env['version'], str)
|
||||
return self._env['version']
|
||||
|
||||
@property
|
||||
def debug_build(self) -> bool:
|
||||
@ -150,7 +156,8 @@ class App:
|
||||
builds due to compiler optimizations being disabled and extra
|
||||
checks being run.
|
||||
"""
|
||||
return self._debug_build
|
||||
assert isinstance(self._env['debug_build'], bool)
|
||||
return self._env['debug_build']
|
||||
|
||||
@property
|
||||
def test_build(self) -> bool:
|
||||
@ -159,22 +166,27 @@ class App:
|
||||
Test mode enables extra checks and features that are useful for
|
||||
release testing but which do not slow the game down significantly.
|
||||
"""
|
||||
return self._test_build
|
||||
assert isinstance(self._env['test_build'], bool)
|
||||
return self._env['test_build']
|
||||
|
||||
@property
|
||||
def python_directory_user(self) -> str:
|
||||
"""Path where the app looks for custom user scripts."""
|
||||
return self._python_directory_user
|
||||
assert isinstance(self._env['python_directory_user'], str)
|
||||
return self._env['python_directory_user']
|
||||
|
||||
@property
|
||||
def python_directory_app(self) -> str:
|
||||
"""Path where the app looks for its bundled scripts."""
|
||||
return self._python_directory_app
|
||||
assert isinstance(self._env['python_directory_app'], str)
|
||||
return self._env['python_directory_app']
|
||||
# return self._python_directory_app
|
||||
|
||||
@property
|
||||
def python_directory_app_site(self) -> str:
|
||||
"""Path containing pip packages bundled with the app."""
|
||||
return self._python_directory_app_site
|
||||
assert isinstance(self._env['python_directory_app_site'], str)
|
||||
return self._env['python_directory_app_site']
|
||||
|
||||
@property
|
||||
def config(self) -> ba.AppConfig:
|
||||
@ -188,7 +200,8 @@ class App:
|
||||
|
||||
Examples are: 'mac', 'windows', android'.
|
||||
"""
|
||||
return self._platform
|
||||
assert isinstance(self._env['platform'], str)
|
||||
return self._env['platform']
|
||||
|
||||
@property
|
||||
def subplatform(self) -> str:
|
||||
@ -197,30 +210,33 @@ class App:
|
||||
Can be empty. For the 'android' platform, subplatform may
|
||||
be 'google', 'amazon', etc.
|
||||
"""
|
||||
return self._subplatform
|
||||
assert isinstance(self._env['subplatform'], str)
|
||||
return self._env['subplatform']
|
||||
|
||||
@property
|
||||
def api_version(self) -> int:
|
||||
"""The game's api version.
|
||||
|
||||
Only python modules and packages associated with the current api
|
||||
version will be detected by the game (see the ba_meta tag). This
|
||||
value will change whenever backward-incompatible changes are
|
||||
introduced to game apis; when that happens, scripts should be updated
|
||||
accordingly and set to target the new api.
|
||||
Only Python modules and packages associated with the current API
|
||||
version number will be detected by the game (see the ba_meta tag).
|
||||
This value will change whenever backward-incompatible changes are
|
||||
introduced to game APIs. When that happens, scripts should be updated
|
||||
accordingly and set to target the new API version number.
|
||||
"""
|
||||
from ba._meta import CURRENT_API_VERSION
|
||||
return CURRENT_API_VERSION
|
||||
|
||||
@property
|
||||
def on_tv(self) -> bool:
|
||||
"""Bool value for if the game is running on a TV."""
|
||||
return self._on_tv
|
||||
"""Whether the game is currently running on a TV."""
|
||||
assert isinstance(self._env['on_tv'], bool)
|
||||
return self._env['on_tv']
|
||||
|
||||
@property
|
||||
def vr_mode(self) -> bool:
|
||||
"""Bool value for if the game is running in VR."""
|
||||
return self._vr_mode
|
||||
"""Whether the game is currently running in VR."""
|
||||
assert isinstance(self._env['vr_mode'], bool)
|
||||
return self._env['vr_mode']
|
||||
|
||||
@property
|
||||
def ui_bounds(self) -> Tuple[float, float, float, float]:
|
||||
@ -237,7 +253,7 @@ class App:
|
||||
the single shared instance.
|
||||
"""
|
||||
# pylint: disable=too-many-statements
|
||||
from ba._music import MusicController
|
||||
from ba._music import MusicSubsystem
|
||||
from ba._ui import UI
|
||||
|
||||
# Config.
|
||||
@ -248,47 +264,19 @@ class App:
|
||||
# refreshed/etc.
|
||||
self.fg_state = 0
|
||||
|
||||
# Environment stuff.
|
||||
# (pulling these into attrs so we can type-check them and provide docs)
|
||||
env = _ba.env()
|
||||
self._build_number: int = env['build_number']
|
||||
assert isinstance(self._build_number, int)
|
||||
self._config_file_path: str = env['config_file_path']
|
||||
assert isinstance(self._config_file_path, str)
|
||||
self._locale: str = env['locale']
|
||||
assert isinstance(self._locale, str)
|
||||
self._user_agent_string: str = env['user_agent_string']
|
||||
assert isinstance(self._user_agent_string, str)
|
||||
self._version: str = env['version']
|
||||
assert isinstance(self._version, str)
|
||||
self._debug_build: bool = env['debug_build']
|
||||
assert isinstance(self._debug_build, bool)
|
||||
self._test_build: bool = env['test_build']
|
||||
assert isinstance(self._test_build, bool)
|
||||
self._python_directory_user: str = env['python_directory_user']
|
||||
assert isinstance(self._python_directory_user, str)
|
||||
self._python_directory_app: str = env['python_directory_app']
|
||||
assert isinstance(self._python_directory_app, str)
|
||||
self._python_directory_app_site: str = env['python_directory_app_site']
|
||||
assert isinstance(self._python_directory_app_site, str)
|
||||
self._platform: str = env['platform']
|
||||
assert isinstance(self._platform, str)
|
||||
self._subplatform: str = env['subplatform']
|
||||
assert isinstance(self._subplatform, str)
|
||||
self._on_tv: bool = env['on_tv']
|
||||
assert isinstance(self._on_tv, bool)
|
||||
self._vr_mode: bool = env['vr_mode']
|
||||
assert isinstance(self._vr_mode, bool)
|
||||
self.protocol_version: int = env['protocol_version']
|
||||
self._env = _ba.env()
|
||||
self.protocol_version: int = self._env['protocol_version']
|
||||
assert isinstance(self.protocol_version, int)
|
||||
self.toolbar_test: bool = env['toolbar_test']
|
||||
self.toolbar_test: bool = self._env['toolbar_test']
|
||||
assert isinstance(self.toolbar_test, bool)
|
||||
self.demo_mode: bool = env['demo_mode']
|
||||
self.demo_mode: bool = self._env['demo_mode']
|
||||
assert isinstance(self.demo_mode, bool)
|
||||
self.arcade_mode: bool = env['arcade_mode']
|
||||
self.arcade_mode: bool = self._env['arcade_mode']
|
||||
assert isinstance(self.arcade_mode, bool)
|
||||
self.headless_build: bool = env['headless_build']
|
||||
assert isinstance(self.headless_build, bool)
|
||||
self.headless_mode: bool = self._env['headless_mode']
|
||||
assert isinstance(self.headless_mode, bool)
|
||||
self.iircade_mode: bool = self._env['iircade_mode']
|
||||
assert isinstance(self.headless_mode, bool)
|
||||
|
||||
# Plugins.
|
||||
self.potential_plugins: List[ba.PotentialPlugin] = []
|
||||
@ -335,7 +323,7 @@ class App:
|
||||
self.attempted_first_ad = False
|
||||
|
||||
# Music.
|
||||
self.music = MusicController()
|
||||
self.music = MusicSubsystem()
|
||||
|
||||
# Language.
|
||||
self.language_target: Optional[_lang.AttrDict] = None
|
||||
@ -493,7 +481,7 @@ class App:
|
||||
self.special_offer = config['pendingSpecialOffer']['o']
|
||||
specialoffer.show_offer()
|
||||
|
||||
if not self.headless_build:
|
||||
if not self.headless_mode:
|
||||
_ba.timer(3.0, check_special_offer, timetype=TimeType.REAL)
|
||||
|
||||
# Start scanning for things exposed via ba_meta.
|
||||
@ -501,7 +489,7 @@ class App:
|
||||
|
||||
# Auto-sign-in to a local account in a moment if we're set to.
|
||||
def do_auto_sign_in() -> None:
|
||||
if self.headless_build or cfg.get('Auto Account State') == 'Local':
|
||||
if self.headless_mode or cfg.get('Auto Account State') == 'Local':
|
||||
_ba.sign_in('Local')
|
||||
|
||||
_ba.pushcall(do_auto_sign_in)
|
||||
|
||||
@ -25,7 +25,7 @@ class CoopSession(Session):
|
||||
the computer and include functionality such as
|
||||
high score lists.
|
||||
|
||||
Attrs:
|
||||
Attributes:
|
||||
|
||||
campaign
|
||||
The ba.Campaign instance this Session represents, or None if
|
||||
|
||||
@ -108,7 +108,7 @@ def get_unowned_maps() -> List[str]:
|
||||
"""
|
||||
from ba import _store
|
||||
unowned_maps: Set[str] = set()
|
||||
if not _ba.app.headless_build:
|
||||
if not _ba.app.headless_mode:
|
||||
for map_section in _store.get_store_layout()['maps']:
|
||||
for mapitem in map_section['items']:
|
||||
if not _ba.get_purchased(mapitem):
|
||||
|
||||
@ -381,7 +381,7 @@ def get_unowned_game_types() -> Set[Type[ba.GameActivity]]:
|
||||
try:
|
||||
from ba import _store
|
||||
unowned_games: Set[Type[ba.GameActivity]] = set()
|
||||
if not _ba.app.headless_build:
|
||||
if not _ba.app.headless_mode:
|
||||
for section in _store.get_store_layout()['minigames']:
|
||||
for mname in section['items']:
|
||||
if not _ba.get_purchased(mname):
|
||||
|
||||
@ -116,8 +116,8 @@ ASSET_SOUNDTRACK_ENTRIES: Dict[MusicType, AssetSoundtrackEntry] = {
|
||||
}
|
||||
|
||||
|
||||
class MusicController:
|
||||
"""Controller for overall music playback in the app.
|
||||
class MusicSubsystem:
|
||||
"""Subsystem for music playback in the app.
|
||||
|
||||
Category: App Classes
|
||||
"""
|
||||
|
||||
@ -29,7 +29,7 @@ class ScoreConfig:
|
||||
|
||||
Category: Gameplay Classes
|
||||
|
||||
Attrs:
|
||||
Attributes:
|
||||
|
||||
label
|
||||
A label show to the user for scores; 'Score', 'Time Survived', etc.
|
||||
|
||||
@ -28,7 +28,7 @@ class Session:
|
||||
ba.Activity instances such as mini-games and score-screens, and for
|
||||
maintaining state between them (players, teams, score tallies, etc).
|
||||
|
||||
Attrs:
|
||||
Attributes:
|
||||
|
||||
sessionteams
|
||||
All the ba.SessionTeams in the Session. Most things should use the
|
||||
|
||||
@ -24,7 +24,7 @@ class PlayerScoredMessage:
|
||||
|
||||
Category: Message Classes
|
||||
|
||||
Attrs:
|
||||
Attributes:
|
||||
|
||||
score
|
||||
The score value.
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Released under the MIT License. See LICENSE for details.
|
||||
#
|
||||
"""User interface functionality."""
|
||||
"""User interface related functionality."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@ -28,7 +28,7 @@ class UI:
|
||||
|
||||
self._uiscale: ba.UIScale
|
||||
|
||||
interfacetype = env['interface_type']
|
||||
interfacetype = env['ui_scale']
|
||||
if interfacetype == 'large':
|
||||
self._uiscale = UIScale.LARGE
|
||||
elif interfacetype == 'medium':
|
||||
@ -36,7 +36,7 @@ class UI:
|
||||
elif interfacetype == 'small':
|
||||
self._uiscale = UIScale.SMALL
|
||||
else:
|
||||
raise RuntimeError('Invalid UIScale value: {interfacetype}')
|
||||
raise RuntimeError(f'Invalid UIScale value: {interfacetype}')
|
||||
|
||||
self.window_states: Dict = {} # FIXME: Kill this.
|
||||
self.main_menu_selection: Optional[str] = None # FIXME: Kill this.
|
||||
|
||||
@ -125,7 +125,7 @@ class FlagPickedUpMessage:
|
||||
|
||||
category: Message Classes
|
||||
|
||||
Attrs:
|
||||
Attributes:
|
||||
|
||||
flag
|
||||
The ba.Flag that has been picked up.
|
||||
@ -143,7 +143,7 @@ class FlagDiedMessage:
|
||||
|
||||
category: Message Classes
|
||||
|
||||
Attrs:
|
||||
Attributes:
|
||||
|
||||
flag
|
||||
The ba.Flag that died.
|
||||
@ -157,7 +157,7 @@ class FlagDroppedMessage:
|
||||
|
||||
category: Message Classes
|
||||
|
||||
Attrs:
|
||||
Attributes:
|
||||
|
||||
flag
|
||||
The ba.Flag that was dropped.
|
||||
|
||||
@ -130,6 +130,24 @@ class MainMenuActivity(ba.Activity[ba.Player, ba.Team]):
|
||||
assert self.version.node
|
||||
ba.animate(self.version.node, 'opacity', {2.3: 0, 3.0: 1.0})
|
||||
|
||||
# Show the iircade logo on our iircade build.
|
||||
if app.iircade_mode:
|
||||
img = ba.NodeActor(
|
||||
ba.newnode('image',
|
||||
attrs={
|
||||
'texture': ba.gettexture('iircadeLogo'),
|
||||
'attach': 'center',
|
||||
'scale': (250, 250),
|
||||
'position': (0, 0),
|
||||
'tilt_translate': 0.21,
|
||||
'absolute_scale': True
|
||||
})).autoretain()
|
||||
imgdelay = 0.0 if app.main_menu_did_initial_transition else 1.0
|
||||
ba.animate(img.node, 'opacity', {
|
||||
imgdelay + 1.5: 0.0,
|
||||
imgdelay + 2.5: 1.0
|
||||
})
|
||||
|
||||
# Throw in test build info.
|
||||
self.beta_info = self.beta_info_2 = None
|
||||
if app.test_build and not (app.demo_mode or app.arcade_mode):
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND -->
|
||||
<h4><em>last updated on 2020-09-11 for Ballistica version 1.5.25 build 20179</em></h4>
|
||||
<h4><em>last updated on 2020-09-17 for Ballistica version 1.5.26 build 20188</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>
|
||||
@ -816,11 +816,11 @@ likely result in errors.</p>
|
||||
<p><span>int</span></p>
|
||||
<p>The game's api version.</p>
|
||||
|
||||
<p> Only python modules and packages associated with the current api
|
||||
version will be detected by the game (see the ba_meta tag). This
|
||||
value will change whenever backward-incompatible changes are
|
||||
introduced to game apis; when that happens, scripts should be updated
|
||||
accordingly and set to target the new api.</p>
|
||||
<p> Only Python modules and packages associated with the current API
|
||||
version number will be detected by the game (see the ba_meta tag).
|
||||
This value will change whenever backward-incompatible changes are
|
||||
introduced to game APIs. When that happens, scripts should be updated
|
||||
accordingly and set to target the new API version number.</p>
|
||||
|
||||
</dd>
|
||||
<dt><h4><a name="attr_ba_App__build_number">build_number</a></h4></dt><dd>
|
||||
@ -869,7 +869,7 @@ likely result in errors.</p>
|
||||
</dd>
|
||||
<dt><h4><a name="attr_ba_App__on_tv">on_tv</a></h4></dt><dd>
|
||||
<p><span>bool</span></p>
|
||||
<p>Bool value for if the game is running on a TV.</p>
|
||||
<p>Whether the game is currently running on a TV.</p>
|
||||
|
||||
</dd>
|
||||
<dt><h4><a name="attr_ba_App__platform">platform</a></h4></dt><dd>
|
||||
@ -933,7 +933,7 @@ likely result in errors.</p>
|
||||
</dd>
|
||||
<dt><h4><a name="attr_ba_App__vr_mode">vr_mode</a></h4></dt><dd>
|
||||
<p><span>bool</span></p>
|
||||
<p>Bool value for if the game is running in VR.</p>
|
||||
<p>Whether the game is currently running in VR.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -48,7 +48,7 @@ class StateData:
|
||||
class Response:
|
||||
"""Response sent from the bacloud server to the client.
|
||||
|
||||
Attrs:
|
||||
Attributes:
|
||||
message: If present, client should print this message before any other
|
||||
response processing (including error handling) occurs.
|
||||
message_end: end arg for message print() call.
|
||||
|
||||
@ -33,11 +33,11 @@ PIP_REQUIREMENTS = [
|
||||
PipRequirement(modulename='mypy', minversion=[0, 782]),
|
||||
PipRequirement(modulename='yapf', minversion=[0, 30, 0]),
|
||||
PipRequirement(modulename='cpplint', minversion=[1, 5, 4]),
|
||||
PipRequirement(modulename='pytest', minversion=[6, 0, 2]),
|
||||
PipRequirement(modulename='typing_extensions'),
|
||||
PipRequirement(modulename='pytz'),
|
||||
PipRequirement(modulename='yaml', pipname='PyYAML'),
|
||||
PipRequirement(modulename='requests'),
|
||||
PipRequirement(modulename='pytest'),
|
||||
]
|
||||
|
||||
# Parts of full-tests suite we only run on particular days.
|
||||
@ -225,7 +225,7 @@ def archive_old_builds(ssh_server: str, builds_dir: str,
|
||||
for old_file in [f for f in files if f.startswith(prefix)][1:]:
|
||||
files_to_archive.add(old_file)
|
||||
|
||||
# Would be faster to package this into a single command but
|
||||
# Would be more efficient to package this into a single command but
|
||||
# this works.
|
||||
for fname in sorted(files_to_archive):
|
||||
print('Archiving ' + fname, file=sys.stderr)
|
||||
@ -252,12 +252,27 @@ def gen_fulltest_buildfile_android() -> None:
|
||||
modes += modes
|
||||
modes.append('prod')
|
||||
|
||||
# By default we cycle through build architectures for each flavor.
|
||||
# However, for minor flavor with low risk of platform-dependent breakage
|
||||
# we stick to a single one to keep disk space costs lower. (build files
|
||||
# amount to several gigs per mode per flavor)
|
||||
# UPDATE: Now that we have CPU time to spare, we simply always do 'arm64'
|
||||
# or 'prod' depending on build type; this results in 1 or 4 architectures
|
||||
# worth of build files per flavor instead of 8 (prod + 4 singles) and
|
||||
# keeps our daily runs identical.
|
||||
lightweight_flavors = {'template', 'arcade', 'demo', 'iircade'}
|
||||
|
||||
lines = []
|
||||
for i, flavor in enumerate(
|
||||
for _i, flavor in enumerate(
|
||||
sorted(os.listdir('ballisticacore-android/BallisticaCore/src'))):
|
||||
if flavor == 'main' or flavor.startswith('.'):
|
||||
continue
|
||||
mode = modes[(dayoffset + i) % len(modes)]
|
||||
|
||||
if flavor in lightweight_flavors:
|
||||
mode = 'arm64'
|
||||
else:
|
||||
# mode = modes[(dayoffset + i) % len(modes)]
|
||||
mode = 'prod'
|
||||
lines.append('ANDROID_PLATFORM=' + flavor + ' ANDROID_MODE=' + mode +
|
||||
' make android-cloud-build')
|
||||
|
||||
@ -314,11 +329,11 @@ def gen_fulltest_buildfile_windows() -> None:
|
||||
cfg3 = 'Release' if (dayoffset + 2) % 7 == 0 else 'Debug'
|
||||
|
||||
lines.append(f'WINDOWS_PROJECT= WINDOWS_PLATFORM={pval1} '
|
||||
f'WINDOWS_CONFIGURATION={cfg1} make windows-build')
|
||||
f'WINDOWS_CONFIGURATION={cfg1} make windows-cloud-build')
|
||||
lines.append(f'WINDOWS_PROJECT=Headless WINDOWS_PLATFORM={pval2} '
|
||||
f'WINDOWS_CONFIGURATION={cfg2} make windows-build')
|
||||
f'WINDOWS_CONFIGURATION={cfg2} make windows-cloud-build')
|
||||
lines.append(f'WINDOWS_PROJECT=Oculus WINDOWS_PLATFORM={pval3} '
|
||||
f'WINDOWS_CONFIGURATION={cfg3} make windows-build')
|
||||
f'WINDOWS_CONFIGURATION={cfg3} make windows-cloud-build')
|
||||
|
||||
# Now add sparse tests that land on today.
|
||||
if DO_SPARSE_TEST_BUILDS:
|
||||
@ -391,7 +406,7 @@ def gen_fulltest_buildfile_apple() -> None:
|
||||
if extra == 'mac.package':
|
||||
lines.append('make mac-package')
|
||||
elif extra == 'mac.package.server':
|
||||
lines.append('make mac-server-package')
|
||||
lines.append('make mac-cloud-server-package')
|
||||
elif extra == 'mac.pylibs':
|
||||
lines.append('tools/pcommand python_build_apple mac')
|
||||
elif extra == 'mac.pylibs.debug':
|
||||
@ -510,7 +525,9 @@ def checkenv() -> None:
|
||||
f'Alternately, "tools/pcommand install_pip_reqs"'
|
||||
f' will update all pip requirements.')
|
||||
if minver is not None:
|
||||
verlines = results.stdout.decode().splitlines()
|
||||
# Note: some modules such as pytest print their version to stderr,
|
||||
# so grab both.
|
||||
verlines = (results.stdout + results.stderr).decode().splitlines()
|
||||
if verlines[0].startswith('Cpplint fork'):
|
||||
verlines = verlines[1:]
|
||||
ver_line = verlines[0]
|
||||
@ -664,6 +681,7 @@ def update_docs_md(check: bool) -> None:
|
||||
for fname in files:
|
||||
if any(fname.endswith(ext) for ext in exts):
|
||||
pysources.append(os.path.join(root, fname))
|
||||
pysources.sort()
|
||||
curhash = get_files_hash(pysources)
|
||||
|
||||
# Extract the current embedded hash.
|
||||
|
||||
@ -179,7 +179,6 @@ class Updater:
|
||||
f'All {unchanged_project_count} project files are up to date.')
|
||||
|
||||
def _apply_line_changes(self) -> None:
|
||||
# pylint: disable=too-many-branches
|
||||
|
||||
# Build a flat list of entries that can and can-not be auto applied.
|
||||
manual_changes: List[Tuple[str, LineChange]] = []
|
||||
@ -201,14 +200,6 @@ class Updater:
|
||||
f'{Clr.RED}{change[0]}:{change[1].line_number + 1}:'
|
||||
f' Expected line to be:\n {change[1].expected}{Clr.RST}')
|
||||
|
||||
# Make a note on copyright lines that this can be disabled.
|
||||
if 'Copyright' in change[1].expected:
|
||||
print(f'{Clr.RED}NOTE: You can disable copyright'
|
||||
f' checks by adding "license_line_checks": false\n'
|
||||
f'to the root dict in config/localconfig.json.\n'
|
||||
f'see https://ballistica.net/wiki'
|
||||
f'/Knowledge-Nuggets#'
|
||||
f'hello-world-creating-a-new-game-type{Clr.RST}')
|
||||
sys.exit(-1)
|
||||
|
||||
# Now, if we've got auto entries, either list or auto-correct them.
|
||||
@ -262,7 +253,7 @@ class Updater:
|
||||
with open(fname) as infile:
|
||||
lines = infile.read().splitlines()
|
||||
|
||||
# Look for copyright/legal-notice line(s)
|
||||
# Look for license line(s)
|
||||
if self._license_line_checks:
|
||||
legal_notice = '// ' + get_legal_notice_private()
|
||||
lnum = 0
|
||||
@ -301,7 +292,7 @@ class Updater:
|
||||
if self._public:
|
||||
raise RuntimeError('FIXME: Check for full license.')
|
||||
|
||||
# Look for copyright/legal-notice line(s)
|
||||
# Look for copyright/legal-notice line(s).
|
||||
line = '// ' + get_legal_notice_private()
|
||||
lnum = 0
|
||||
if lines[lnum] != line:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user