From 5db98e37f445b0f2cc81bf4ccdf9ba1ea55e6ea9 Mon Sep 17 00:00:00 2001 From: ! Freaku <92618708+Freaku17@users.noreply.github.com> Date: Fri, 16 Feb 2024 01:05:27 +0530 Subject: [PATCH 1/5] Update some gamemodes for co-op support (these games were made to also be played in co-op, during 1.6 Eric forgot to add the ability to register games in Campaign. Those a mod was required to play such gamemodes in co-op. But thanks to now added Campaign support, there's no more need of such a mod.) --- plugins/minigames/bot_chase.py | 21 +++++------ plugins/minigames/explodo_run.py | 31 ++++++++------- plugins/minigames/extinction.py | 32 ++++++++-------- plugins/minigames/lame_fight.py | 23 ++++++------ plugins/minigames/you_vs_bombsquad.py | 54 +++++++++++++-------------- 5 files changed, 78 insertions(+), 83 deletions(-) diff --git a/plugins/minigames/bot_chase.py b/plugins/minigames/bot_chase.py index 7ef9e80..8beabad 100644 --- a/plugins/minigames/bot_chase.py +++ b/plugins/minigames/bot_chase.py @@ -16,17 +16,6 @@ if TYPE_CHECKING: from typing import Any, List, Type, Optional -def ba_get_api_version(): - return 8 - - -def ba_get_levels(): - return [bs._level.Level( - 'Bot Chase', gametype=BotChaseGame, - settings={}, - preview_texture_name='footballStadiumPreview')] - - class Player(bs.Player['Team']): """Our player type for this game""" @@ -221,3 +210,13 @@ class BotChaseGame(bs.TeamGameActivity[Player, Team]): results.set_team_score(team, int(1000.0 * longest_life)) self.end(results=results) + + +# ba_meta export plugin +class plugin(babase.Plugin): + def __init__(self): + ## Campaign support ## + babase.app.classic.add_coop_practice_level(bs.Level( + name = 'Bot Chase', gametype=BotChaseGame, + settings={}, + preview_texture_name='footballStadiumPreview')) diff --git a/plugins/minigames/explodo_run.py b/plugins/minigames/explodo_run.py index b6bd60d..b9705dc 100644 --- a/plugins/minigames/explodo_run.py +++ b/plugins/minigames/explodo_run.py @@ -18,22 +18,6 @@ if TYPE_CHECKING: from typing import Any, Type, Dict, List, Optional -def ba_get_api_version(): - return 8 - - -def ba_get_levels(): - return [bs._level.Level( - 'Explodo Run', - gametype=ExplodoRunGame, - settings={}, - preview_texture_name='rampagePreview'), bs._level.Level( - 'Epic Explodo Run', - gametype=ExplodoRunGame, - settings={'Epic Mode': True}, - preview_texture_name='rampagePreview')] - - class Player(bs.Player['Team']): """Our player type for this game.""" @@ -142,3 +126,18 @@ class ExplodoRunGame(bs.TeamGameActivity[Player, Team]): # Ends the activity. self.end(results) + + +# ba_meta export plugin +class plugin(babase.Plugin): + def __init__(self): + ## Campaign support ## + babase.app.classic.add_coop_practice_level(bs.Level( + name = 'Explodo Run', + gametype=ExplodoRunGame, + settings={}, + preview_texture_name='rampagePreview')) + babase.app.classic.add_coop_practice_level(bs.Level('Epic Explodo Run', + gametype=ExplodoRunGame, + settings={'Epic Mode': True}, + preview_texture_name='rampagePreview')) diff --git a/plugins/minigames/extinction.py b/plugins/minigames/extinction.py index 436a631..443ead5 100644 --- a/plugins/minigames/extinction.py +++ b/plugins/minigames/extinction.py @@ -18,23 +18,6 @@ if TYPE_CHECKING: from typing import Any, Sequence, Optional, Type -def ba_get_api_version(): - return 8 - - -def ba_get_levels(): - return [bs._level.Level( - 'Extinction', - gametype=NewMeteorShowerGame, - settings={'Epic Mode': False}, - preview_texture_name='footballStadiumPreview'), - bs._level.Level( - 'Epic Extinction', - gametype=NewMeteorShowerGame, - settings={'Epic Mode': True}, - preview_texture_name='footballStadiumPreview')] - - class Meteor(bs.Actor): """A giant meteor instead of bombs.""" @@ -255,3 +238,18 @@ class NewMeteorShowerGame(bs.TeamGameActivity[Player, Team]): results.set_team_score(team, int(1000.0 * longest_life)) self.end(results=results) + + +# ba_meta export plugin +class plugin(babase.Plugin): + def __init__(self): + ## Campaign support ## + babase.app.classic.add_coop_practice_level(bs.Level( + name = 'Extinction', + gametype=NewMeteorShowerGame, + settings={'Epic Mode': False}, + preview_texture_name='footballStadiumPreview')) + babase.app.classic.add_coop_practice_level(bs.Level('Epic Extinction', + gametype=NewMeteorShowerGame, + settings={'Epic Mode': True}, + preview_texture_name='footballStadiumPreview')) diff --git a/plugins/minigames/lame_fight.py b/plugins/minigames/lame_fight.py index 6b69d13..2ef629c 100644 --- a/plugins/minigames/lame_fight.py +++ b/plugins/minigames/lame_fight.py @@ -18,18 +18,6 @@ if TYPE_CHECKING: from typing import Any, Type, Dict, List, Optional -def ba_get_api_version(): - return 6 - - -def ba_get_levels(): - return [babase._level.Level( - 'Lame Fight', - gametype=LameFightGame, - settings={}, - preview_texture_name='courtyardPreview')] - - class Player(bs.Player['Team']): """Our player type for this game.""" @@ -168,3 +156,14 @@ class LameFightGame(bs.TeamGameActivity[Player, Team]): # Ends the activity. self.end(results) + + +# ba_meta export plugin +class plugin(babase.Plugin): + def __init__(self): + ## Campaign support ## + babase.app.classic.add_coop_practice_level(bs.Level( + name = 'Lame Fight', + gametype=LameFightGame, + settings={}, + preview_texture_name='courtyardPreview')) diff --git a/plugins/minigames/you_vs_bombsquad.py b/plugins/minigames/you_vs_bombsquad.py index c28a539..09be08d 100644 --- a/plugins/minigames/you_vs_bombsquad.py +++ b/plugins/minigames/you_vs_bombsquad.py @@ -33,33 +33,6 @@ else: name_hard = 'You vs BS Hard' name_hard_epic = 'You vs BS Hard Epic' -# def ba_get_api_version(): -# return 6 - - -def ba_get_levels(): - return [babase._level.Level( - name_easy, - gametype=TUvsBombSquad, - settings={}, - preview_texture_name='footballStadiumPreview'), - babase._level.Level( - name_easy_epic, - gametype=TUvsBombSquad, - settings={'Epic Mode': True}, - preview_texture_name='footballStadiumPreview'), - - babase._level.Level( - name_hard, - gametype=TUvsBombSquad, - settings={'Hard Mode': True}, - preview_texture_name='footballStadiumPreview'), - babase._level.Level( - name_hard_epic, - gametype=TUvsBombSquad, - settings={'Hard Mode': True, - 'Epic Mode': True}, - preview_texture_name='footballStadiumPreview')] #### BOTS #### @@ -503,3 +476,30 @@ class TUvsBombSquad(bs.TeamGameActivity[Player, Team]): # Ends the activity. self.end(results) + + +# ba_meta export plugin +class plugin(babase.Plugin): + def __init__(self): + ## Campaign support ## + babase.app.classic.add_coop_practice_level(bs.Level( + name = name_easy, + gametype=TUvsBombSquad, + settings={}, + preview_texture_name='footballStadiumPreview')) + babase.app.classic.add_coop_practice_level(bs.Level( + name_easy_epic, + gametype=TUvsBombSquad, + settings={'Epic Mode': True}, + preview_texture_name='footballStadiumPreview')) + babase.app.classic.add_coop_practice_level(bs.Level( + name = name_hard, + gametype=TUvsBombSquad, + settings={'Hard Mode': True}, + preview_texture_name='footballStadiumPreview')) + babase.app.classic.add_coop_practice_level(bs.Level( + name = name_hard_epic, + gametype=TUvsBombSquad, + settings={'Hard Mode': True, + 'Epic Mode': True}, + preview_texture_name='footballStadiumPreview')) From cedc80a58edb8ce6711909d14228fee9063ca115 Mon Sep 17 00:00:00 2001 From: ! Freaku <92618708+Freaku17@users.noreply.github.com> Date: Fri, 16 Feb 2024 01:05:46 +0530 Subject: [PATCH 2/5] Update JSON file --- plugins/minigames.json | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/plugins/minigames.json b/plugins/minigames.json index 2e85b5a..5efafa5 100644 --- a/plugins/minigames.json +++ b/plugins/minigames.json @@ -1083,7 +1083,7 @@ } }, "you_vs_bombsquad": { - "description": "You against bombsquad solo or with friends", + "description": "You against bombsquad solo or with friends. Playable in co-op", "external_url": "", "authors": [ { @@ -1093,6 +1093,7 @@ } ], "versions": { + "1.0.1": null, "1.0.0": { "api_version": 8, "commit_sha": "718039b", @@ -1121,7 +1122,7 @@ } }, "lame_fight": { - "description": "Save World With Super Powers", + "description": "Save World With Super Powers. Playable in co-op", "external_url": "", "authors": [ { @@ -1131,6 +1132,7 @@ } ], "versions": { + "1.0.1": null, "1.0.0": { "api_version": 8, "commit_sha": "4941d0c", @@ -1178,7 +1180,7 @@ } }, "bot_chase": { - "description": "Try to survive from bots!", + "description": "Try to survive from bots! Playable in co-op", "external_url": "", "authors": [ { @@ -1188,6 +1190,7 @@ } ], "versions": { + "1.0.1": null, "1.0.0": { "api_version": 8, "commit_sha": "5063690", @@ -1273,7 +1276,7 @@ } }, "explodo_run": { - "description": "Cursed meteor shower of crazy Captain Jack trying take your soul", + "description": "Cursed meteor shower of crazy Captain Jack trying take your soul. Playable in co-op", "external_url": "", "authors": [ { @@ -1283,6 +1286,7 @@ } ], "versions": { + "1.0.1": null, "1.0.0": { "api_version": 8, "commit_sha": "ec6286e", @@ -1292,7 +1296,7 @@ } }, "extinction": { - "description": "Survive the Extinction.", + "description": "Survive the Extinction. Playable in co-op", "external_url": "", "authors": [ { @@ -1302,6 +1306,7 @@ } ], "versions": { + "1.0.1: null," "1.0.0": { "api_version": 8, "commit_sha": "5063690", From bbb6cb3a1333b42d180987bcb3d58d21397ac51c Mon Sep 17 00:00:00 2001 From: Freaku17 Date: Thu, 15 Feb 2024 19:39:53 +0000 Subject: [PATCH 3/5] [ci] auto-format --- plugins/minigames/bot_chase.py | 2 +- plugins/minigames/explodo_run.py | 14 +++++------ plugins/minigames/extinction.py | 8 +++---- plugins/minigames/lame_fight.py | 2 +- plugins/minigames/you_vs_bombsquad.py | 34 +++++++++++++-------------- 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/plugins/minigames/bot_chase.py b/plugins/minigames/bot_chase.py index 8beabad..6738bf1 100644 --- a/plugins/minigames/bot_chase.py +++ b/plugins/minigames/bot_chase.py @@ -217,6 +217,6 @@ class plugin(babase.Plugin): def __init__(self): ## Campaign support ## babase.app.classic.add_coop_practice_level(bs.Level( - name = 'Bot Chase', gametype=BotChaseGame, + name='Bot Chase', gametype=BotChaseGame, settings={}, preview_texture_name='footballStadiumPreview')) diff --git a/plugins/minigames/explodo_run.py b/plugins/minigames/explodo_run.py index b9705dc..6d41f4d 100644 --- a/plugins/minigames/explodo_run.py +++ b/plugins/minigames/explodo_run.py @@ -133,11 +133,11 @@ class plugin(babase.Plugin): def __init__(self): ## Campaign support ## babase.app.classic.add_coop_practice_level(bs.Level( - name = 'Explodo Run', - gametype=ExplodoRunGame, - settings={}, - preview_texture_name='rampagePreview')) + name='Explodo Run', + gametype=ExplodoRunGame, + settings={}, + preview_texture_name='rampagePreview')) babase.app.classic.add_coop_practice_level(bs.Level('Epic Explodo Run', - gametype=ExplodoRunGame, - settings={'Epic Mode': True}, - preview_texture_name='rampagePreview')) + gametype=ExplodoRunGame, + settings={'Epic Mode': True}, + preview_texture_name='rampagePreview')) diff --git a/plugins/minigames/extinction.py b/plugins/minigames/extinction.py index 443ead5..6f671cf 100644 --- a/plugins/minigames/extinction.py +++ b/plugins/minigames/extinction.py @@ -245,11 +245,11 @@ class plugin(babase.Plugin): def __init__(self): ## Campaign support ## babase.app.classic.add_coop_practice_level(bs.Level( - name = 'Extinction', + name='Extinction', gametype=NewMeteorShowerGame, settings={'Epic Mode': False}, preview_texture_name='footballStadiumPreview')) babase.app.classic.add_coop_practice_level(bs.Level('Epic Extinction', - gametype=NewMeteorShowerGame, - settings={'Epic Mode': True}, - preview_texture_name='footballStadiumPreview')) + gametype=NewMeteorShowerGame, + settings={'Epic Mode': True}, + preview_texture_name='footballStadiumPreview')) diff --git a/plugins/minigames/lame_fight.py b/plugins/minigames/lame_fight.py index 2ef629c..b9bce21 100644 --- a/plugins/minigames/lame_fight.py +++ b/plugins/minigames/lame_fight.py @@ -163,7 +163,7 @@ class plugin(babase.Plugin): def __init__(self): ## Campaign support ## babase.app.classic.add_coop_practice_level(bs.Level( - name = 'Lame Fight', + name='Lame Fight', gametype=LameFightGame, settings={}, preview_texture_name='courtyardPreview')) diff --git a/plugins/minigames/you_vs_bombsquad.py b/plugins/minigames/you_vs_bombsquad.py index 09be08d..9fbd7e1 100644 --- a/plugins/minigames/you_vs_bombsquad.py +++ b/plugins/minigames/you_vs_bombsquad.py @@ -483,23 +483,23 @@ class plugin(babase.Plugin): def __init__(self): ## Campaign support ## babase.app.classic.add_coop_practice_level(bs.Level( - name = name_easy, - gametype=TUvsBombSquad, - settings={}, - preview_texture_name='footballStadiumPreview')) + name=name_easy, + gametype=TUvsBombSquad, + settings={}, + preview_texture_name='footballStadiumPreview')) babase.app.classic.add_coop_practice_level(bs.Level( - name_easy_epic, - gametype=TUvsBombSquad, - settings={'Epic Mode': True}, - preview_texture_name='footballStadiumPreview')) + name_easy_epic, + gametype=TUvsBombSquad, + settings={'Epic Mode': True}, + preview_texture_name='footballStadiumPreview')) babase.app.classic.add_coop_practice_level(bs.Level( - name = name_hard, - gametype=TUvsBombSquad, - settings={'Hard Mode': True}, - preview_texture_name='footballStadiumPreview')) + name=name_hard, + gametype=TUvsBombSquad, + settings={'Hard Mode': True}, + preview_texture_name='footballStadiumPreview')) babase.app.classic.add_coop_practice_level(bs.Level( - name = name_hard_epic, - gametype=TUvsBombSquad, - settings={'Hard Mode': True, - 'Epic Mode': True}, - preview_texture_name='footballStadiumPreview')) + name=name_hard_epic, + gametype=TUvsBombSquad, + settings={'Hard Mode': True, + 'Epic Mode': True}, + preview_texture_name='footballStadiumPreview')) From 9ca60394aee40cdf1828de32b6e9746f2b6efe83 Mon Sep 17 00:00:00 2001 From: ! Freaku <92618708+Freaku17@users.noreply.github.com> Date: Fri, 16 Feb 2024 01:12:16 +0530 Subject: [PATCH 4/5] Fix JSON oops --- plugins/minigames.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/minigames.json b/plugins/minigames.json index 5efafa5..d2d953a 100644 --- a/plugins/minigames.json +++ b/plugins/minigames.json @@ -1306,7 +1306,7 @@ } ], "versions": { - "1.0.1: null," + "1.0.1": null, "1.0.0": { "api_version": 8, "commit_sha": "5063690", @@ -1354,4 +1354,4 @@ } } } -} \ No newline at end of file +} From 30e4fd2e85f7d354b00a0973ce3f4f5230f63547 Mon Sep 17 00:00:00 2001 From: Freaku17 Date: Thu, 15 Feb 2024 19:42:36 +0000 Subject: [PATCH 5/5] [ci] apply-version-metadata --- plugins/minigames.json | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/plugins/minigames.json b/plugins/minigames.json index d2d953a..1863190 100644 --- a/plugins/minigames.json +++ b/plugins/minigames.json @@ -1093,7 +1093,12 @@ } ], "versions": { - "1.0.1": null, + "1.0.1": { + "api_version": 8, + "commit_sha": "9ca6039", + "released_on": "15-02-2024", + "md5sum": "cb4698e70fd94402eca199250564ffba" + }, "1.0.0": { "api_version": 8, "commit_sha": "718039b", @@ -1132,7 +1137,12 @@ } ], "versions": { - "1.0.1": null, + "1.0.1": { + "api_version": 8, + "commit_sha": "9ca6039", + "released_on": "15-02-2024", + "md5sum": "9072f98eef0739474b2839a0866be969" + }, "1.0.0": { "api_version": 8, "commit_sha": "4941d0c", @@ -1190,7 +1200,12 @@ } ], "versions": { - "1.0.1": null, + "1.0.1": { + "api_version": 8, + "commit_sha": "9ca6039", + "released_on": "15-02-2024", + "md5sum": "209ddaa4c4e128650730771db4d0588c" + }, "1.0.0": { "api_version": 8, "commit_sha": "5063690", @@ -1286,7 +1301,12 @@ } ], "versions": { - "1.0.1": null, + "1.0.1": { + "api_version": 8, + "commit_sha": "9ca6039", + "released_on": "15-02-2024", + "md5sum": "4d711d5eb874cd63a81e9499abb74dd1" + }, "1.0.0": { "api_version": 8, "commit_sha": "ec6286e", @@ -1306,7 +1326,12 @@ } ], "versions": { - "1.0.1": null, + "1.0.1": { + "api_version": 8, + "commit_sha": "9ca6039", + "released_on": "15-02-2024", + "md5sum": "1e74b3d2e38ac310a1b3fc28e13833dd" + }, "1.0.0": { "api_version": 8, "commit_sha": "5063690", @@ -1354,4 +1379,4 @@ } } } -} +} \ No newline at end of file