Merge branch 'master' into master

This commit is contained in:
Benefit-Zebra 2020-07-06 09:38:00 +05:30 committed by GitHub
commit 155638a40d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 57 additions and 47 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/ce/31/b04472c4ec3f900d319b4522ab0d", "build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b8/7d/8fb23522c5431b80f43518d52bc1",
"build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/81/6e/971bfc46e8d4f0e4ba685c60f121", "build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2b/1b/a7c5f57925c5af6c4af7fb144f03",
"build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/13/9c/c6dffeceff4ce4e8e2f80c0bb3e2", "build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/84/e3/a6538c8ae4861d182eeb435d9918",
"build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/fb/83/ef6633a278dc7ecdb8be9f63591e", "build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/18/7a/02301ecf6287c8103d72a18702a5",
"build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4d/02/906eb5da3a0ec6ca227cf9ba4265", "build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ee/07/cf35aa850c673b3c505d62ec4435",
"build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/50/17/ddbde947f50be43aa94630188107", "build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9e/5c/64299df2b8eb147cc19e1d3035a1",
"build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/62/d0/d2370a7c96901b6a2af7eca8dbdb", "build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f4/ed/216d2257dd2b421c4e4d060c0d33",
"build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/0c/54/ae9513cdcb60d2c9e5845cde909e", "build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/07/6f/ec5b94e8089a56a01f97c90fb2f9",
"build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/41/dd/b2d6cb0e1471b34d506072ff7785", "build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/f4/09/8c42bebbfb28b1ebb060a7e9f0c7",
"build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/ef/fb/1c681f24e04862b1dcef345d7063", "build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/ff/43/ec16a091f0b9cfb77e9f7bab1f25",
"build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a0/2c/65a719c19570f05428a5fc68bd76", "build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/20/42/1f9000faf46cb8de8db34aac2178",
"build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/1f/db/b4c059aae0ef1d79c6dcaf521c62" "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/b7/86/f2da432d7b177d9556c577fa6391"
} }

View File

@ -1,6 +1,6 @@
### 1.5.18 (20106) ### 1.5.18 (20108)
- A bit of project cleanup; tools/snippets is now tools/pcommand, etc. - A bit of project cleanup; tools/snippets is now tools/pcommand, etc.
- More code improvement - More minor bug fixes and crash/bug-logging improvements.
### 1.5.17 (20102) ### 1.5.17 (20102)
- More cleanup to logging and crash reporting system. - More cleanup to logging and crash reporting system.

View File

@ -591,28 +591,32 @@ class Session:
lobby = chooser.lobby lobby = chooser.lobby
activity = self._activity_weak() activity = self._activity_weak()
# It seems this can happen..
if activity is None:
print('_on_player_ready called with no activity.')
return
# In joining-activities, we wait till all choosers are ready # In joining-activities, we wait till all choosers are ready
# and then create all players at once. # and then create all players at once.
if activity is not None and activity.is_joining_activity: if activity.is_joining_activity:
if lobby.check_all_ready(): if not lobby.check_all_ready():
choosers = lobby.get_choosers()
min_players = self.min_players
if len(choosers) >= min_players:
for lch in lobby.get_choosers():
self._add_chosen_player(lch)
lobby.remove_all_choosers()
# Get our next activity going.
self._complete_end_activity(activity, {})
else:
_ba.screenmessage(
Lstr(resource='notEnoughPlayersText',
subs=[('${COUNT}', str(min_players))]),
color=(1, 1, 0),
)
_ba.playsound(_ba.getsound('error'))
else:
return return
choosers = lobby.get_choosers()
min_players = self.min_players
if len(choosers) >= min_players:
for lch in lobby.get_choosers():
self._add_chosen_player(lch)
lobby.remove_all_choosers()
# Get our next activity going.
self._complete_end_activity(activity, {})
else:
_ba.screenmessage(
Lstr(resource='notEnoughPlayersText',
subs=[('${COUNT}', str(min_players))]),
color=(1, 1, 0),
)
_ba.playsound(_ba.getsound('error'))
# Otherwise just add players on the fly. # Otherwise just add players on the fly.
else: else:

View File

@ -426,16 +426,16 @@ class CaptureTheFlagGame(ba.TeamGameActivity[Player, Team]):
'loop': True 'loop': True
})) }))
flag = team.flag flag = team.flag
assert flag.touch_return_time is not None if flag.touch_return_time is not None:
flag.touch_return_time -= 0.1 flag.touch_return_time -= 0.1
if flag.counter: if flag.counter:
flag.counter.text = f'{flag.touch_return_time:.1f}' flag.counter.text = f'{flag.touch_return_time:.1f}'
flag.counter.color = (1, 1, 0, 1) flag.counter.color = (1, 1, 0, 1)
flag.counter.scale = 0.02 flag.counter.scale = 0.02
if flag.touch_return_time <= 0.0: if flag.touch_return_time <= 0.0:
self._award_players_touching_own_flag(team) self._award_players_touching_own_flag(team)
flag.handlemessage(ba.DieMessage()) flag.handlemessage(ba.DieMessage())
def _award_players_touching_own_flag(self, team: Team) -> None: def _award_players_touching_own_flag(self, team: Team) -> None:
for player in team.players: for player in team.players:

View File

@ -1668,7 +1668,7 @@ class GatherWindow(ba.Window):
# Ignore harmless errors. # Ignore harmless errors.
if exc.errno in { if exc.errno in {
errno.EHOSTUNREACH, errno.ENETUNREACH, errno.EHOSTUNREACH, errno.ENETUNREACH,
errno.EINVAL errno.EINVAL, errno.EPERM
}: }:
pass pass
elif exc.errno == 10022: elif exc.errno == 10022:

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-07-03 for Ballistica version 1.5.17 build 20104</em></h4> <h4><em>last updated on 2020-07-05 for Ballistica version 1.5.18 build 20108</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

@ -672,7 +672,13 @@ def efro_gradle() -> None:
target_words = [w.lower() for w in _camel_case_split(args[-1])] target_words = [w.lower() for w in _camel_case_split(args[-1])]
if 'google' in target_words: if 'google' in target_words:
enabled_tags = {'google', 'crashlytics'} enabled_tags = {'google', 'crashlytics'}
filter_gradle_file('BallisticaCore/build.gradle', enabled_tags)
buildfilename = 'BallisticaCore/build.gradle'
# Backup the original file, preserving timestamps and whatnot so as to not
# trip modification tests.
subprocess.run(['cp', '-p', buildfilename, f'{buildfilename}.prev'],
check=True)
filter_gradle_file(buildfilename, enabled_tags)
try: try:
subprocess.run(args, check=True) subprocess.run(args, check=True)
@ -680,8 +686,8 @@ def efro_gradle() -> None:
except BaseException: except BaseException:
errored = True errored = True
# Put things back to default state. # Restore the original.
filter_gradle_file('BallisticaCore/build.gradle', set()) subprocess.run(['mv', f'{buildfilename}.prev', buildfilename], check=True)
if errored: if errored:
sys.exit(1) sys.exit(1)