This commit is contained in:
Eric Froemling 2020-06-21 03:09:54 -07:00
parent 1aadb77d8c
commit 13937d4777
10 changed files with 74 additions and 112 deletions

View File

@ -4135,16 +4135,16 @@
"assets/build/windows/x64/vc_redist.x64.exe": "https://files.ballistica.net/cache/ba1/ea/19/8b8787d81abcdce158ba608cd24f", "assets/build/windows/x64/vc_redist.x64.exe": "https://files.ballistica.net/cache/ba1/ea/19/8b8787d81abcdce158ba608cd24f",
"assets/build/windows/x64/vcruntime140_1d.dll": "https://files.ballistica.net/cache/ba1/11/d8/ff6344b429b00c24d9a1930d4338", "assets/build/windows/x64/vcruntime140_1d.dll": "https://files.ballistica.net/cache/ba1/11/d8/ff6344b429b00c24d9a1930d4338",
"assets/build/windows/x64/vcruntime140d.dll": "https://files.ballistica.net/cache/ba1/20/33/0825e11e6518f87ece3009309933", "assets/build/windows/x64/vcruntime140d.dll": "https://files.ballistica.net/cache/ba1/20/33/0825e11e6518f87ece3009309933",
"build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4f/2f/e3b29f02f19fa7e8f2fc14b1fd7b", "build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/48/94/a726a87b0601df96b34e457f406f",
"build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3c/f1/514a1c22aaf3e78b13c745ad4306", "build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/93/f4/1de7a2a7b25e9797cdeb8fbdbd4a",
"build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b4/5b/6884ab37847e1cc7f849629dcec7", "build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ed/6f/8d356c4b4aacb83ef227498a0c5c",
"build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/2a/1a/6503edbce03557e4dc91509578f3", "build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a8/76/4bf599bdab77331350d0da8a5714",
"build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c0/26/ad827bb61a7d6768092c0bcc3989", "build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3a/36/ebcc874f5b681e4fc22b0512f31b",
"build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f8/5c/d21d74a56e8e06dc2f7c8ad8916c", "build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b3/5f/c2b1ff67661b855f93a201fe78fd",
"build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/6a/c2/4675f86966169552fa5712eaf182", "build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/d6/ea/bc68af318e0100d2d4cde351591b",
"build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ee/d1/68f419fe8daea2c7bccf07f6bae1", "build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/da/08/6913f20d7c0a6f77369f3ade467a",
"build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/39/c6/fff4fe2694e30a95675f0de5bcbd", "build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/36/af/73e96b1008e2a34b43a482534c04",
"build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/59/98/f578939a40efe49320b7768d1df7", "build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/19/3b/ee02640ca173b63aa1805fe3b82b",
"build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/d3/cd/a4e3ac5b10a081701c348c721d3d", "build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/15/d1/c79915d092932b4019ad086d93dc",
"build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/36/c6/6fb17e0267c5e40d2ed6f72aa134" "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/83/c1/73811083cdfbd86f7365001a0ccb"
} }

View File

@ -881,6 +881,7 @@
<w>hmac</w> <w>hmac</w>
<w>hmmm</w> <w>hmmm</w>
<w>hmmmm</w> <w>hmmmm</w>
<w>hmph</w>
<w>hoffs</w> <w>hoffs</w>
<w>holdingflag</w> <w>holdingflag</w>
<w>holdingteam</w> <w>holdingteam</w>
@ -1622,6 +1623,7 @@
<w>respawned</w> <w>respawned</w>
<w>respawnicon</w> <w>respawnicon</w>
<w>responsetype</w> <w>responsetype</w>
<w>resultstr</w>
<w>returncode</w> <w>returncode</w>
<w>returnfuncptrs</w> <w>returnfuncptrs</w>
<w>returnspc</w> <w>returnspc</w>
@ -1900,6 +1902,8 @@
<w>sysctl</w> <w>sysctl</w>
<w>syslogmodule</w> <w>syslogmodule</w>
<w>tabval</w> <w>tabval</w>
<w>tagargs</w>
<w>tagversion</w>
<w>taobao</w> <w>taobao</w>
<w>taobaomascot</w> <w>taobaomascot</w>
<w>targ</w> <w>targ</w>

View File

@ -1,3 +1,9 @@
### 1.5.8 (20079)
- Fixed an issue where touch controls or sound settings values could look like 0.8999999999. Please holler if you see this anywhere else.
- Fixed a potential crash when tapping the screen before the game is fully inited.
- Restored the correct error message in the 'Google Play' connection tab from 1.4 (I am actively working on a replacement)
- Other minor bug fixes.
### 1.5.7 (20077) ### 1.5.7 (20077)
- Fixed an issue where co-op score screen rating could look like '3.9999999999999' - Fixed an issue where co-op score screen rating could look like '3.9999999999999'
- Other minor bug fixes. - Other minor bug fixes.

View File

@ -519,11 +519,6 @@ class App:
# If there's a leftover log file, attempt to upload # If there's a leftover log file, attempt to upload
# it to the server and/or get rid of it. # it to the server and/or get rid of it.
_apputils.handle_leftover_log_file() _apputils.handle_leftover_log_file()
try:
_apputils.handle_leftover_log_file()
except Exception:
from ba import _error
_error.print_exception('Error handling leftover log file')
# Notify the user if we're using custom system scripts. # Notify the user if we're using custom system scripts.
# FIXME: This no longer works since sys-scripts is an absolute path; # FIXME: This no longer works since sys-scripts is an absolute path;

View File

@ -136,26 +136,36 @@ def handle_log() -> None:
def handle_leftover_log_file() -> None: def handle_leftover_log_file() -> None:
"""Handle an un-uploaded log from a previous run.""" """Handle an un-uploaded log from a previous run."""
import json try:
from ba._netutils import serverput import json
from ba._netutils import serverput
if os.path.exists(_ba.get_log_file_path()): if os.path.exists(_ba.get_log_file_path()):
with open(_ba.get_log_file_path()) as infile: with open(_ba.get_log_file_path()) as infile:
info = json.loads(infile.read()) info = json.loads(infile.read())
infile.close() infile.close()
do_send = should_submit_debug_info() do_send = should_submit_debug_info()
if do_send: if do_send:
def response(data: Any) -> None: def response(data: Any) -> None:
# Non-None response means we were successful; # Non-None response means we were successful;
# lets kill it. # lets kill it.
if data is not None: if data is not None:
os.remove(_ba.get_log_file_path()) try:
os.remove(_ba.get_log_file_path())
except FileNotFoundError:
# Saw this in the wild. The file just existed
# a moment ago but I suppose something could have
# killed it since. ¯\_(ツ)_/¯
pass
serverput('bsLog', info, response) serverput('bsLog', info, response)
else: else:
# If they don't want logs uploaded just kill it. # If they don't want logs uploaded just kill it.
os.remove(_ba.get_log_file_path()) os.remove(_ba.get_log_file_path())
except Exception:
from ba import _error
_error.print_exception('Error handling leftover log file.')
def garbage_collect(session_end: bool = True) -> None: def garbage_collect(session_end: bool = True) -> None:

View File

@ -127,23 +127,23 @@ class ConfigNumberEdit:
text=displayname, text=displayname,
maxwidth=160 + xoffset, maxwidth=160 + xoffset,
color=(0.8, 0.8, 0.8, 1.0), color=(0.8, 0.8, 0.8, 1.0),
h_align="left", h_align='left',
v_align="center", v_align='center',
scale=textscale) scale=textscale)
self.valuetext = ba.textwidget(parent=parent, self.valuetext = ba.textwidget(parent=parent,
position=(246 + xoffset, position[1]), position=(246 + xoffset, position[1]),
size=(60, 28), size=(60, 28),
editable=False, editable=False,
color=(0.3, 1.0, 0.3, 1.0), color=(0.3, 1.0, 0.3, 1.0),
h_align="right", h_align='right',
v_align="center", v_align='center',
text=str(self._value), text=str(self._value),
padding=2) padding=2)
self.minusbutton = ba.buttonwidget( self.minusbutton = ba.buttonwidget(
parent=parent, parent=parent,
position=(330 + xoffset, position[1]), position=(330 + xoffset, position[1]),
size=(28, 28), size=(28, 28),
label="-", label='-',
autoselect=True, autoselect=True,
on_activate_call=ba.Call(self._down), on_activate_call=ba.Call(self._down),
repeat=True, repeat=True,
@ -152,12 +152,12 @@ class ConfigNumberEdit:
position=(380 + xoffset, position=(380 + xoffset,
position[1]), position[1]),
size=(28, 28), size=(28, 28),
label="+", label='+',
autoselect=True, autoselect=True,
on_activate_call=ba.Call(self._up), on_activate_call=ba.Call(self._up),
repeat=True, repeat=True,
enable_sound=changesound) enable_sound=changesound)
# complain if we outlive our widgets # Complain if we outlive our widgets.
ba.uicleanupcheck(self, self.nametext) ba.uicleanupcheck(self, self.nametext)
self._update_display() self._update_display()
@ -177,4 +177,4 @@ class ConfigNumberEdit:
ba.app.config.apply_and_commit() ba.app.config.apply_and_commit()
def _update_display(self) -> None: def _update_display(self) -> None:
ba.textwidget(edit=self.valuetext, text=str(round(self._value, 2))) ba.textwidget(edit=self.valuetext, text=f'{self._value:.1f}')

View File

@ -348,8 +348,6 @@ class GatherWindow(ba.Window):
elif tab == 'google_play': elif tab == 'google_play':
c_width = self._scroll_width c_width = self._scroll_width
c_height = 380.0 c_height = 380.0
b_width = 250.0
b_width2 = 230.0
self._tab_container = cnt = ba.containerwidget( self._tab_container = cnt = ba.containerwidget(
parent=self._root_widget, parent=self._root_widget,
position=(scroll_left, scroll_bottom + position=(scroll_left, scroll_bottom +
@ -357,71 +355,17 @@ class GatherWindow(ba.Window):
size=(c_width, c_height), size=(c_width, c_height),
background=False, background=False,
selection_loop_to_parent=True) selection_loop_to_parent=True)
img_size = 100 v = c_height - 30.0
v = c_height - 30 ba.textwidget(
ba.textwidget(parent=cnt,
position=(c_width * 0.5, v),
color=(0.6, 1.0, 0.6),
scale=1.3,
size=(0, 0),
maxwidth=c_width * 0.9,
h_align='center',
v_align='center',
text=ba.Lstr(resource=self._r +
'.googlePlayDescriptionText'))
v -= 35
ba.textwidget(parent=cnt,
position=(c_width * 0.5, v),
color=(0.6, 1.0, 0.6),
scale=0.7,
size=(0, 0),
maxwidth=c_width * 0.9,
h_align='center',
v_align='center',
text=ba.Lstr(resource=self._r +
'.worksWithGooglePlayDevicesText'))
v -= 125
btn = ba.buttonwidget(
parent=cnt, parent=cnt,
label='', position=(c_width * 0.5, v - 140.0),
position=(c_width * 0.5 - b_width * 0.5, v - b_width * 0.5), color=(0.6, 1.0, 0.6),
size=(b_width, b_width * 0.9), scale=1.3,
button_type='square', size=(0.0, 0.0),
on_activate_call=self._on_google_play_invite_press, maxwidth=c_width * 0.9,
autoselect=True, h_align='center',
up_widget=self._tab_buttons[tab]) v_align='center',
ba.imagewidget(parent=cnt, text=ba.Lstr(resource='googleMultiplayerDiscontinuedText'))
position=(c_width * 0.5 - img_size * 0.5, v - 35),
size=(img_size, img_size),
draw_controller=btn,
texture=ba.gettexture('googlePlayGamesIcon'),
color=(0, 1, 0))
ba.textwidget(parent=cnt,
text=ba.Lstr(resource=self._r +
'.googlePlayInviteText'),
maxwidth=b_width * 0.8,
draw_controller=btn,
color=(0, 1, 0),
flatness=1.0,
position=(c_width * 0.5, v - 60),
scale=1.6,
size=(0, 0),
h_align='center',
v_align='center')
v -= 180
ba.buttonwidget(
parent=cnt,
label=ba.Lstr(resource=self._r + '.googlePlaySeeInvitesText'),
color=(0.5, 0.5, 0.6),
textcolor=(0.75, 0.7, 0.8),
autoselect=True,
position=(c_width * 0.5 - b_width2 * 0.5, v),
size=(b_width2, 60),
on_activate_call=lambda: ba.timer(
0.1,
self._on_google_play_show_invites_press,
timetype=ba.TimeType.REAL),
)
elif tab == 'internet': elif tab == 'internet':
c_width = self._scroll_width c_width = self._scroll_width
@ -1717,6 +1661,9 @@ class GatherWindow(ba.Window):
self._call, self._address, self._port, self._call, self._address, self._port,
ping if accessible else None), ping if accessible else None),
from_other_thread=True) from_other_thread=True)
except ConnectionRefusedError:
# Fine, server; sorry we pinged you. Hmph.
pass
except OSError as exc: except OSError as exc:
import errno import errno

View File

@ -206,7 +206,7 @@ class AudioSettingsWindow(ba.Window):
else: else:
self._soundtrack_button = None self._soundtrack_button = None
# tweak a few navigation bits # Tweak a few navigation bits.
try: try:
ba.widget(edit=back_button, down_widget=svne.minusbutton) ba.widget(edit=back_button, down_widget=svne.minusbutton)
except Exception: except Exception:

View File

@ -1,5 +1,5 @@
<!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND --> <!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND -->
<h4><em>last updated on 2020-06-19 for Ballistica version 1.5.6 build 20076</em></h4> <h4><em>last updated on 2020-06-21 for Ballistica version 1.5.8 build 20079</em></h4>
<p>This page documents the Python classes and functions in the 'ba' module, <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> 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> <hr>

View File

@ -47,9 +47,9 @@ class PipRequirement:
PIP_REQUIREMENTS = [ PIP_REQUIREMENTS = [
PipRequirement(modulename='pylint', minversion=[2, 5, 3]), PipRequirement(modulename='pylint', minversion=[2, 5, 3]),
PipRequirement(modulename='mypy', minversion=[0, 780]), PipRequirement(modulename='mypy', minversion=[0, 781]),
PipRequirement(modulename='yapf', minversion=[0, 30, 0]), PipRequirement(modulename='yapf', minversion=[0, 30, 0]),
PipRequirement(modulename='cpplint', minversion=[1, 5, 0]), PipRequirement(modulename='cpplint', minversion=[1, 5, 1]),
PipRequirement(modulename='typing_extensions'), PipRequirement(modulename='typing_extensions'),
PipRequirement(modulename='pytz'), PipRequirement(modulename='pytz'),
PipRequirement(modulename='yaml', pipname='PyYAML'), PipRequirement(modulename='yaml', pipname='PyYAML'),