[ci] auto-format

This commit is contained in:
rikkolovescats 2023-08-03 15:21:30 +00:00 committed by github-actions[bot]
parent 93ab4f7422
commit f7ae806295

View file

@ -82,6 +82,7 @@ SPAZ_PRESET = {
"style": "spaz" "style": "spaz"
} }
class Player(bs.Player['Team']): class Player(bs.Player['Team']):
"""Our player type for this game.""" """Our player type for this game."""
@ -223,7 +224,6 @@ class CharacterBuilder(bs.TeamGameActivity[Player, Team]):
color=(0.9, 0.2, 0.2, 0.9), color=(0.9, 0.2, 0.2, 0.9),
position=(452, 190)) position=(452, 190))
self._host = Text( self._host = Text(
"Originally created by \ue020HeySmoothy\nhttps://youtu.be/q0KxY1hfMPQ\nhttps://youtu.be/3l2dxWEhrzE\n\nModified for multiplayer by \ue047Nyaa! :3", "Originally created by \ue020HeySmoothy\nhttps://youtu.be/q0KxY1hfMPQ\nhttps://youtu.be/3l2dxWEhrzE\n\nModified for multiplayer by \ue047Nyaa! :3",
flash=False, flash=False,
@ -548,7 +548,8 @@ class CharacterBuilder(bs.TeamGameActivity[Player, Team]):
"main_color": [(0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1), (1, 1, 0), (1, 0, 1), (0, 1, 1), (1, 1, 1)], "main_color": [(0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1), (1, 1, 0), (1, 0, 1), (0, 1, 1), (1, 1, 1)],
"highlight_color": [(0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1), (1, 1, 0), (1, 0, 1), (0, 1, 1), (1, 1, 1)], "highlight_color": [(0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1), (1, 1, 0), (1, 0, 1), (0, 1, 1), (1, 1, 1)],
} }
chars = ["neoSpaz","zoe","ninja","kronk","mel","jack","santa","frosty","bones","bear","penguin","ali","cyborg","agent","wizard","pixie","bunny"] chars = ["neoSpaz", "zoe", "ninja", "kronk", "mel", "jack", "santa", "frosty",
"bones", "bear", "penguin", "ali", "cyborg", "agent", "wizard", "pixie", "bunny"]
for char in chars: for char in chars:
self.cache["head"].append(char + "Head") self.cache["head"].append(char + "Head")
@ -661,7 +662,10 @@ def register_character_json(name, character):
appearance.fall_sounds = character['fall_sounds'] appearance.fall_sounds = character['fall_sounds']
appearance.style = character['style'] appearance.style = character['style']
cm = bs.chatmessage cm = bs.chatmessage
def _new_chatmessage(msg: str | babase.Lstr, *args, **kwargs): def _new_chatmessage(msg: str | babase.Lstr, *args, **kwargs):
activity = bs.get_foreground_host_activity() activity = bs.get_foreground_host_activity()
if not activity: if not activity:
@ -728,8 +732,10 @@ def _new_chatmessage(msg: str | babase.Lstr, *args, **kwargs):
cm(msg, *args, **kwargs) cm(msg, *args, **kwargs)
bs.chatmessage = _new_chatmessage bs.chatmessage = _new_chatmessage
def get_player(msg, activity): def get_player(msg, activity):
client_id = -1 client_id = -1
words = msg.split(" ") words = msg.split(" ")
@ -742,6 +748,8 @@ def get_player(msg, activity):
return player return player
# ba_meta export plugin # ba_meta export plugin
class bySmoothy(babase.Plugin): class bySmoothy(babase.Plugin):
def __init__(self): def __init__(self):
bui.set_party_icon_always_visible(True) bui.set_party_icon_always_visible(True)
@ -755,4 +763,3 @@ class bySmoothy(babase.Plugin):
with open(os.path.join(CUSTOM_CHARACTERS, character_file), "r") as fin: with open(os.path.join(CUSTOM_CHARACTERS, character_file), "r") as fin:
character = json.load(fin) character = json.load(fin)
register_character_json(name, character) register_character_json(name, character)