From 3aceb6ef66078872b06369ee728e95e525d69bc7 Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Thu, 11 Jun 2020 01:05:07 -0700 Subject: [PATCH] Improved windows support for unicode file paths --- CHANGELOG.md | 3 +++ assets/src/ba_data/python/_ba.py | 2 +- assets/src/ba_data/python/bastd/ui/gather.py | 5 ++++- docs/ba_module.md | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 217c2f4f..5d750f61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 1.5.3 (20065) +- Improved handling of non-ascii characters in file paths on windows. + ### 1.5.2 (20063) - Fixes an issue with controls not working correctly in net-play between 1.4.x and 1.5.x. - Tidied up onslaught code a bit. diff --git a/assets/src/ba_data/python/_ba.py b/assets/src/ba_data/python/_ba.py index 13993284..1c3579ac 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=328357141536767746382612764132666300753 +# SOURCES_HASH=285571727710785006475742404303651213501 # I'm sorry Pylint. I know this file saddens you. Be strong. # pylint: disable=useless-suppression diff --git a/assets/src/ba_data/python/bastd/ui/gather.py b/assets/src/ba_data/python/bastd/ui/gather.py index 98b122a0..f2eba248 100644 --- a/assets/src/ba_data/python/bastd/ui/gather.py +++ b/assets/src/ba_data/python/bastd/ui/gather.py @@ -807,7 +807,10 @@ class GatherWindow(ba.Window): color=(1, 0, 0)) ba.playsound(ba.getsound('error')) return - port = int(cast(str, ba.textwidget(query=port_textwidget))) + try: + port = int(cast(str, ba.textwidget(query=port_textwidget))) + except ValueError: + port = -1 if port > 65535 or port < 0: ba.screenmessage( ba.Lstr(resource='internal.invalidPortErrorText'), diff --git a/docs/ba_module.md b/docs/ba_module.md index f8791bb1..cc401a8c 100644 --- a/docs/ba_module.md +++ b/docs/ba_module.md @@ -1,5 +1,5 @@ -

last updated on 2020-06-09 for Ballistica version 1.5.2 build 20064

+

last updated on 2020-06-11 for Ballistica version 1.5.3 build 20065

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!