From 2552dd07679333d372170c054033cb5558abf3ad Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Sun, 2 Aug 2020 16:19:30 -0700 Subject: [PATCH] Added _ba.can_display_full_unicode() --- .efrocachemap | 24 ++++++++++++------------ .idea/dictionaries/ericf.xml | 1 + CHANGELOG.md | 3 ++- assets/src/ba_data/python/_ba.py | 11 +++++++++++ assets/src/ba_data/python/ba/_app.py | 2 +- docs/ba_module.md | 2 +- 6 files changed, 28 insertions(+), 15 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 1192d95d..ea216131 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3927,16 +3927,16 @@ "assets/build/windows/Win32/ucrtbased.dll": "https://files.ballistica.net/cache/ba1/b5/85/f8b6d0558ddb87267f34254b1450", "assets/build/windows/Win32/vc_redist.x86.exe": "https://files.ballistica.net/cache/ba1/1c/e1/4a1a2eddda2f4aebd5f8b64ab08e", "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/5a/b6/9438d9e41b904ee9eae03cf75c6a", - "build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/fa/69/648eaa2307e930481d970a9a32db", - "build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/46/f8/bc3c101d36d1bb1c47d938ca8d0b", - "build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/00/8c/6d078695eab35493bd0cfd2d3523", - "build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/77/88/8c0de232370da88bff994864423c", - "build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b0/4a/4b393c9ebb03e57fbc9030d4a501", - "build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/16/e1/6e24960e5d0bdccc103ec8f85f37", - "build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/8d/eb/77425b1f9f65f9aa081a5851ea24", - "build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/81/8e/0a81b48a997ae8d2a928ee23b950", - "build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/70/32/de7a5b3c0b1afceaf2e6bc1a3441", - "build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/25/25/9abf87f1717182796a362b733ae3", - "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/9d/fe/b6ae85178385d36d35aad37e584e" + "build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/41/b4/93f8ac61e4b0fad27790b896a79c", + "build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b9/fe/9e8a1711d318c8f446ce42e2c8b4", + "build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/8d/47/ca91d44facaca3201e8b82f487ed", + "build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/64/bc/97857879f57276567e99db0351dc", + "build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/55/54/9725e0bb80d6fbb67e8033eb36a6", + "build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d3/86/aa9ca99515ffa5676c960245659f", + "build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a7/59/1a087718dbcdde6ffd17aa0b2bfa", + "build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ce/aa/17c53dbb9513d5ef3b8c0ccde6cf", + "build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/b5/a5/762949cfbeed5695589f64935731", + "build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/8b/dd/649721def17a01fb687472104826", + "build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/82/0c/0a18430efea41ac56987472aa8ec", + "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/78/5d/00a738e0c764f0cc2427c5efe2f0" } \ No newline at end of file diff --git a/.idea/dictionaries/ericf.xml b/.idea/dictionaries/ericf.xml index 352971d3..79fa7d9d 100644 --- a/.idea/dictionaries/ericf.xml +++ b/.idea/dictionaries/ericf.xml @@ -2091,6 +2091,7 @@ tzinfos uadfc uber + ucrtbased ugrade uibounds uicleanup diff --git a/CHANGELOG.md b/CHANGELOG.md index 96a2fbc0..5a59c5d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ -### 1.5.24 (20160) +### 1.5.24 (20161) - Upgraded Python from version 3.7 to 3.8. This is a substantial change (though nothing like the previous update from 2.7 to 3.7) so please holler if anything is broken. These updates will happen once every year or two now.. - Windows debug builds now use Python debug libraries. This should hopefully catch more errors that would otherwise go undetected and potentially cause crashes. - Switched windows builds to use 'fast' mode math instead of 'strict'. This should make the game run more efficiently (similar modes are already in use on other platforms) but holler if any odd breakage happens such as things falling through floors (more often than the occasional random fluke-y case that happens now). +- Added _ba.can_display_full_unicode() for any code that wants to avoid printing things that won't show up locally. ### 1.5.23 (20146) - Fixed the shebang line in `bombsquad_server` file by using `-S` flag for `/usr/bin/env`. diff --git a/assets/src/ba_data/python/_ba.py b/assets/src/ba_data/python/_ba.py index 9ead9791..597b13fa 100644 --- a/assets/src/ba_data/python/_ba.py +++ b/assets/src/ba_data/python/_ba.py @@ -1357,6 +1357,9 @@ def appnameupper() -> str: """appnameupper() -> str (internal) + + Return whether this build of the game can display full unicode such as + Emoji, Asian languages, etc. """ return str() @@ -1478,6 +1481,14 @@ def camerashake(intensity: float = 1.0) -> None: return None +def can_display_full_unicode() -> bool: + """can_display_full_unicode() -> bool + + (internal) + """ + return bool() + + def can_show_ad() -> bool: """can_show_ad() -> bool diff --git a/assets/src/ba_data/python/ba/_app.py b/assets/src/ba_data/python/ba/_app.py index d3265d40..611189b3 100644 --- a/assets/src/ba_data/python/ba/_app.py +++ b/assets/src/ba_data/python/ba/_app.py @@ -88,7 +88,7 @@ class App: if (language in { 'Chinese', 'ChineseTraditional', 'Persian', 'Korean', 'Arabic', 'Hindi', 'Vietnamese' - } and self.platform in ('windows', 'linux')): + } and not _ba.can_display_full_unicode()): return False return True diff --git a/docs/ba_module.md b/docs/ba_module.md index 33ec1b98..e2ea8d1f 100644 --- a/docs/ba_module.md +++ b/docs/ba_module.md @@ -1,5 +1,5 @@ -

last updated on 2020-07-28 for Ballistica version 1.5.24 build 20159

+

last updated on 2020-08-02 for Ballistica version 1.5.24 build 20160

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!