From 11f776a5efc19b4e5358ab061d104045c9461949 Mon Sep 17 00:00:00 2001 From: Vishal Date: Sun, 19 May 2024 04:43:10 +0530 Subject: [PATCH 1/7] Fixing an 8 month old mistake. How come no one noticed this, lol. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4929923d..404b8d44 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ PlayStation / My toaster??** * A: The 2.0 update will be the big 'relaunch' release and the plan is to launch on at least iOS and Steam at that time. I'm trying to get there as fast as I can. As far as consoles, I'd love to and hope to at some point but have - nothing to announce just yet. See the + nothing to announce just yet. * Check out [Ballistica Roadmap](https://github.com/efroemling/ballistica/wiki/Roadmap) for more details or the [Ballistica Downloads](https://ballistica.net/downloads) page for early test builds on From 109f0660adfc01df4a9a1dd2ec17d32eeeab9b3a Mon Sep 17 00:00:00 2001 From: Vishal Date: Sun, 19 May 2024 04:44:27 +0530 Subject: [PATCH 2/7] Fixing a few small mistakes. --- CHANGELOG.md | 2 +- src/assets/ba_data/python/bauiv1lib/settings/plugins.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8e14605..6755c0f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ pop-up web dialog to avoid taking users out of the app. This currently works on the native (not cmake) Mac build but will probably expand to others in the future. -- The `ba*.app.env.version` `and ba*.app.env.build_number` values are now +- The `ba*.app.env.version` and `ba*.app.env.build_number` values are now `ba*.app.env.engine_version` and `ba*.app.env.engine_build_number`. At this point any functionality that cares about versions should be looking at engine version anyway. In the future we can add separate `app_version` and diff --git a/src/assets/ba_data/python/bauiv1lib/settings/plugins.py b/src/assets/ba_data/python/bauiv1lib/settings/plugins.py index bcece4e6..c9fec166 100644 --- a/src/assets/ba_data/python/bauiv1lib/settings/plugins.py +++ b/src/assets/ba_data/python/bauiv1lib/settings/plugins.py @@ -388,7 +388,10 @@ class PluginWindow(bui.Window): edit=check, up_widget=self._back_button, left_widget=self._back_button, - right_widget=self._settings_button, + right_widget=( + self._settings_button if button is None else + button + ), ) if button is not None: bui.widget(edit=button, up_widget=self._back_button) From 0b0eb22883aaf3bc6d7ed099f646766b8d435529 Mon Sep 17 00:00:00 2001 From: Vishal Date: Sun, 19 May 2024 04:46:10 +0530 Subject: [PATCH 3/7] Fixing the sticky bomb chaos bug. At last, fixed after 10 years. --- .../ba_data/python/bascenev1lib/game/assault.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/assets/ba_data/python/bascenev1lib/game/assault.py b/src/assets/ba_data/python/bascenev1lib/game/assault.py index fa50f2ca..151ba1f3 100644 --- a/src/assets/ba_data/python/bascenev1lib/game/assault.py +++ b/src/assets/ba_data/python/bascenev1lib/game/assault.py @@ -243,9 +243,23 @@ class AssaultGame(bs.TeamGameActivity[Player, Team]): ) bs.timer(0.5, light.delete) bs.animate(light, 'intensity', {0: 0, 0.1: 1.0, 0.5: 0}) + def teleport( + client: Player, + pos: Sequence[float], + num: float + ) -> None: + if client.actor: + client.actor.handlemessage( + bs.StandMessage(pos,num) + ) if player.actor: + random_num = random.uniform(0, 360) player.actor.handlemessage( - bs.StandMessage(new_pos, random.uniform(0, 360)) + bs.StandMessage(new_pos, random_num) + ) + bs.timer( + 0.01, + bs.Call(teleport, player, new_pos, random_num) ) # Have teammates celebrate. From 18f89a0904979991d0655c97a1373a518780344a Mon Sep 17 00:00:00 2001 From: Vishal Date: Mon, 20 May 2024 04:08:49 +0530 Subject: [PATCH 4/7] adding comments --- .../python/bascenev1lib/game/assault.py | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/assets/ba_data/python/bascenev1lib/game/assault.py b/src/assets/ba_data/python/bascenev1lib/game/assault.py index 151ba1f3..5f303c15 100644 --- a/src/assets/ba_data/python/bascenev1lib/game/assault.py +++ b/src/assets/ba_data/python/bascenev1lib/game/assault.py @@ -243,24 +243,20 @@ class AssaultGame(bs.TeamGameActivity[Player, Team]): ) bs.timer(0.5, light.delete) bs.animate(light, 'intensity', {0: 0, 0.1: 1.0, 0.5: 0}) - def teleport( - client: Player, - pos: Sequence[float], - num: float - ) -> None: - if client.actor: - client.actor.handlemessage( - bs.StandMessage(pos,num) - ) if player.actor: random_num = random.uniform(0, 360) + # A simple hack to work around the chaos caused by + # any sticky bomb's sticky material, if present and + # is sticking to the players. player.actor.handlemessage( bs.StandMessage(new_pos, random_num) ) - bs.timer( - 0.01, - bs.Call(teleport, player, new_pos, random_num) - ) + bs.timer(0.01, bs.Call( + self.teleport, + player, + new_pos, + random_num + )) # Have teammates celebrate. for player in player_team.players: @@ -272,6 +268,15 @@ class AssaultGame(bs.TeamGameActivity[Player, Team]): if player_team.score >= self._score_to_win: self.end_game() + def teleport( + self, + client: Player, + pos: Sequence[float], + num: float + ) -> None: + if client.actor: + client.actor.handlemessage(bs.StandMessage(pos,num)) + @override def end_game(self) -> None: results = bs.GameResults() From 7e8702b2180496b71f748c4bd1c0f65848e58aee Mon Sep 17 00:00:00 2001 From: Vishal Date: Mon, 20 May 2024 04:20:29 +0530 Subject: [PATCH 5/7] making CI Pass --- src/assets/ba_data/python/bascenev1lib/game/assault.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/assets/ba_data/python/bascenev1lib/game/assault.py b/src/assets/ba_data/python/bascenev1lib/game/assault.py index 5f303c15..2e9b4d3e 100644 --- a/src/assets/ba_data/python/bascenev1lib/game/assault.py +++ b/src/assets/ba_data/python/bascenev1lib/game/assault.py @@ -252,7 +252,7 @@ class AssaultGame(bs.TeamGameActivity[Player, Team]): bs.StandMessage(new_pos, random_num) ) bs.timer(0.01, bs.Call( - self.teleport, + self._teleport, player, new_pos, random_num @@ -268,7 +268,7 @@ class AssaultGame(bs.TeamGameActivity[Player, Team]): if player_team.score >= self._score_to_win: self.end_game() - def teleport( + def _teleport( self, client: Player, pos: Sequence[float], From 5cf26361396f84f587529491323be9b5c9b48166 Mon Sep 17 00:00:00 2001 From: Vishal Date: Mon, 20 May 2024 05:08:02 +0530 Subject: [PATCH 6/7] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6755c0f6..bee382cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,7 +60,9 @@ multiple `SockAddr`s; it will attempt to contact the host on all of them and use whichever responds first. This allows us to pass both ipv4 and ipv6 addresses when available and transparently use whichever is more performant. -- Added `docker-build` and `docker-run` targets to Makefile +- Added `docker-build`, `docker-run`, `docker-clean` and `docker-save` targets + to Makefile. +- Finally fixed the very old sticky bomb chaos bug in Assault game. ### 1.7.34 (build 21823, api 8, 2024-04-26) From d52e8d677977b4f6bb14fa95345161511a1303d8 Mon Sep 17 00:00:00 2001 From: Vishal Date: Mon, 20 May 2024 05:13:40 +0530 Subject: [PATCH 7/7] Fixing up few more stuff. --- src/assets/ba_data/python/bascenev1lib/game/assault.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/assets/ba_data/python/bascenev1lib/game/assault.py b/src/assets/ba_data/python/bascenev1lib/game/assault.py index 2e9b4d3e..54a42362 100644 --- a/src/assets/ba_data/python/bascenev1lib/game/assault.py +++ b/src/assets/ba_data/python/bascenev1lib/game/assault.py @@ -248,9 +248,7 @@ class AssaultGame(bs.TeamGameActivity[Player, Team]): # A simple hack to work around the chaos caused by # any sticky bomb's sticky material, if present and # is sticking to the players. - player.actor.handlemessage( - bs.StandMessage(new_pos, random_num) - ) + self._teleport(player, new_pos, random_num) bs.timer(0.01, bs.Call( self._teleport, player,