mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2026-08-15 13:03:08 +00:00
commit
d8de5c4457
2 changed files with 10 additions and 3 deletions
|
|
@ -682,6 +682,12 @@
|
|||
}
|
||||
],
|
||||
"versions": {
|
||||
"1.0.1": {
|
||||
"api_version": 7,
|
||||
"commit_sha": "3ef572f",
|
||||
"released_on": "25-05-2023",
|
||||
"md5sum": "f093c09b3e9439755a515ae6751e1f7e"
|
||||
},
|
||||
"1.0.0": {
|
||||
"api_version": 7,
|
||||
"commit_sha": "d91fea3",
|
||||
|
|
|
|||
|
|
@ -67,11 +67,11 @@ class RandomPlaylist:
|
|||
all_games: list[ba.GameActivity]
|
||||
usable_games: list[ba.GameActivity]
|
||||
|
||||
last_game: ba.GameActivity
|
||||
last_game: str
|
||||
|
||||
def __init__(self, sessiontype):
|
||||
self.sessiontype = sessiontype
|
||||
self.usable_games = [
|
||||
self.usable_games: list[ba.GameActivity] = [
|
||||
gt
|
||||
for gt in RandomPlaylist.all_games
|
||||
if gt.supports_session_type(self.sessiontype)
|
||||
|
|
@ -87,7 +87,7 @@ class RandomPlaylist:
|
|||
|
||||
while True:
|
||||
game = choice(self.usable_games)
|
||||
if game == self.last_game:
|
||||
if game.name == self.last_game:
|
||||
# Don't repeat the same game twice
|
||||
if has_only_one_game:
|
||||
# ...but don't freeze the game when there's only one game
|
||||
|
|
@ -95,6 +95,7 @@ class RandomPlaylist:
|
|||
else:
|
||||
break
|
||||
|
||||
self.last_game = game.name
|
||||
game_map = choice(game.get_supported_maps(self.sessiontype))
|
||||
settings = {
|
||||
s.name: s.default for s in game.get_available_settings(self.sessiontype)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue