mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
[ci] auto-format
This commit is contained in:
parent
d2e9830d8c
commit
87b302a50f
20 changed files with 703 additions and 685 deletions
|
|
@ -284,7 +284,8 @@ def replay(player, stunt_name):
|
|||
else:
|
||||
bs.timer(
|
||||
move["time"],
|
||||
babase.Call(player.actor.move_map[move["move"]["action"]], move["move"]["value"])
|
||||
babase.Call(player.actor.move_map[move["move"]
|
||||
["action"]], move["move"]["value"])
|
||||
)
|
||||
last_move_time = move["time"]
|
||||
time_to_hide_controls = last_move_time + 1
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ class _cmds:
|
|||
except:
|
||||
pass
|
||||
|
||||
|
||||
def _handle():
|
||||
messages = get_chat_messages()
|
||||
if len(messages) > 1:
|
||||
|
|
@ -544,13 +543,16 @@ class _cmds:
|
|||
cmsg(u'\U0001F95A Nazz are past/present/future \U0001F95A')
|
||||
cmsg(u'\U0001F95A everything is Nazz \U0001F95A')
|
||||
|
||||
|
||||
class NewMainMenuWindow(mainmenu.MainMenuWindow):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
# Display chat icon, but if user open/close gather it may disappear
|
||||
bui.set_party_icon_always_visible(True)
|
||||
|
||||
|
||||
# bs.timer(0.05, _update, repeat=True)
|
||||
|
||||
|
||||
def same():
|
||||
# bs.timer(0.5, _cmds._process_cmd, True)
|
||||
_cmds._process_cmd()
|
||||
|
|
@ -558,10 +560,7 @@ def same():
|
|||
|
||||
|
||||
class _enableee(babase.Plugin):
|
||||
timer = bs.AppTimer(0.5, same,repeat=True)
|
||||
|
||||
timer = bs.AppTimer(0.5, same, repeat=True)
|
||||
|
||||
def on_app_running(self):
|
||||
mainmenu.MainMenuWindow = NewMainMenuWindow
|
||||
|
||||
|
||||
|
||||
|
|
@ -55,7 +55,8 @@ def is_game_version_lower_than(version):
|
|||
version is lower than the passed version. Useful for addressing
|
||||
any breaking changes within game versions.
|
||||
"""
|
||||
game_version = tuple(map(int, babase.app.version if build_number < 21282 else babase.app.env.split(".")))
|
||||
game_version = tuple(map(int, babase.app.version if build_number <
|
||||
21282 else babase.app.env.split(".")))
|
||||
version = tuple(map(int, version.split(".")))
|
||||
return game_version < version
|
||||
|
||||
|
|
@ -103,23 +104,23 @@ def partyLight(switch=True):
|
|||
b = random.choice([0.5, 1])
|
||||
light = NodeActor(
|
||||
bs.newnode('light',
|
||||
attrs={
|
||||
'position': (positions[i][0], 0, positions[i][1]),
|
||||
'radius': 1.0,
|
||||
'lights_volumes': False,
|
||||
'height_attenuated': False,
|
||||
'color': (r, g, b)
|
||||
}))
|
||||
attrs={
|
||||
'position': (positions[i][0], 0, positions[i][1]),
|
||||
'radius': 1.0,
|
||||
'lights_volumes': False,
|
||||
'height_attenuated': False,
|
||||
'color': (r, g, b)
|
||||
}))
|
||||
sval = 1.87
|
||||
iscale = 1.3
|
||||
tcombine = bs.newnode('combine',
|
||||
owner=light.node,
|
||||
attrs={
|
||||
'size': 3,
|
||||
'input0': positions[i][0],
|
||||
'input1': 0,
|
||||
'input2': positions[i][1]
|
||||
})
|
||||
owner=light.node,
|
||||
attrs={
|
||||
'size': 3,
|
||||
'input0': positions[i][0],
|
||||
'input1': 0,
|
||||
'input2': positions[i][1]
|
||||
})
|
||||
assert light.node
|
||||
tcombine.connectattr('output', light.node, 'position')
|
||||
xval = positions[i][0]
|
||||
|
|
@ -154,7 +155,7 @@ def partyLight(switch=True):
|
|||
offset=times[i])
|
||||
if not switch:
|
||||
bs.timer(0.1,
|
||||
light.node.delete)
|
||||
light.node.delete)
|
||||
activity.camera_flash_data.append(light) # type: ignore
|
||||
|
||||
|
||||
|
|
@ -163,12 +164,12 @@ def rainbow(self) -> None:
|
|||
"""Create RGB tint."""
|
||||
c_existing = self.globalsnode.tint
|
||||
cnode = bs.newnode('combine',
|
||||
attrs={
|
||||
'input0': c_existing[0],
|
||||
'input1': c_existing[1],
|
||||
'input2': c_existing[2],
|
||||
'size': 3
|
||||
})
|
||||
attrs={
|
||||
'input0': c_existing[0],
|
||||
'input1': c_existing[1],
|
||||
'input2': c_existing[2],
|
||||
'size': 3
|
||||
})
|
||||
|
||||
_gameutils.animate(cnode, 'input0',
|
||||
{0.0: 1.0, 1.0: 1.0, 2.0: 1.0, 3.0: 1.0,
|
||||
|
|
@ -199,12 +200,12 @@ def stop_rainbow(self):
|
|||
tint = (1, 1, 1)
|
||||
|
||||
cnode = bs.newnode('combine',
|
||||
attrs={
|
||||
'input0': c_existing[0],
|
||||
'input1': c_existing[1],
|
||||
'input2': c_existing[2],
|
||||
'size': 3
|
||||
})
|
||||
attrs={
|
||||
'input0': c_existing[0],
|
||||
'input1': c_existing[1],
|
||||
'input2': c_existing[2],
|
||||
'size': 3
|
||||
})
|
||||
|
||||
_gameutils.animate(cnode, 'input0', {0: c_existing[0], 1.0: tint[0]})
|
||||
_gameutils.animate(cnode, 'input1', {0: c_existing[1], 1.0: tint[1]})
|
||||
|
|
@ -268,12 +269,14 @@ def new_chat_message(msg: Union[str, babase.Lstr], clients: Sequence[int] = None
|
|||
if msg == '/disco off':
|
||||
stop()
|
||||
|
||||
|
||||
class NewMainMenuWindow(mainmenu.MainMenuWindow):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
# Display chat icon, but if user open/close gather it may disappear
|
||||
bui.set_party_icon_always_visible(True)
|
||||
|
||||
|
||||
|
||||
# Replace new chat func to the original game codes.
|
||||
bs.chatmessage = new_chat_message
|
||||
|
||||
|
|
@ -282,4 +285,3 @@ bs.chatmessage = new_chat_message
|
|||
class ByCrossJoy(babase.Plugin):
|
||||
def on_app_running(self):
|
||||
mainmenu.MainMenuWindow = NewMainMenuWindow
|
||||
|
||||
|
|
@ -370,7 +370,8 @@ def get_event_loop(force_fresh=False):
|
|||
|
||||
def _generate_join_secret(self):
|
||||
# resp = requests.get('https://legacy.ballistica.net/bsAccessCheck').text
|
||||
connection_info = bs.get_connection_to_host_info() if build_number < 21697 else bs.get_connection_to_host_info_2()
|
||||
connection_info = bs.get_connection_to_host_info(
|
||||
) if build_number < 21697 else bs.get_connection_to_host_info_2()
|
||||
if connection_info:
|
||||
addr = _last_server_addr
|
||||
port = _last_server_port
|
||||
|
|
@ -794,7 +795,7 @@ class DiscordRP(babase.Plugin):
|
|||
def on_app_running(self) -> None:
|
||||
if not ANDROID:
|
||||
self.rpc_thread.start()
|
||||
|
||||
|
||||
self.update_timer = bs.AppTimer(
|
||||
1, bs.WeakCall(self.update_status), repeat=True
|
||||
)
|
||||
|
|
@ -803,7 +804,7 @@ class DiscordRP(babase.Plugin):
|
|||
self.update_timer = bs.AppTimer(
|
||||
4, bs.WeakCall(self.update_status), repeat=True
|
||||
)
|
||||
|
||||
|
||||
def has_settings_ui(self):
|
||||
return True
|
||||
|
||||
|
|
@ -870,7 +871,8 @@ class DiscordRP(babase.Plugin):
|
|||
|
||||
def update_status(self) -> None:
|
||||
roster = bs.get_game_roster()
|
||||
connection_info = bs.get_connection_to_host_info() if build_number < 21697 else bs.get_connection_to_host_info_2()
|
||||
connection_info = bs.get_connection_to_host_info(
|
||||
) if build_number < 21697 else bs.get_connection_to_host_info_2()
|
||||
|
||||
self.rpc_thread.large_image_key = "bombsquadicon"
|
||||
self.rpc_thread.large_image_text = "BombSquad"
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ class SettingsMaxPlayers(PopupWindow):
|
|||
icon=bui.gettexture('crossOut'),
|
||||
iconscale=1.2)
|
||||
bui.containerwidget(edit=self.root_widget,
|
||||
cancel_button=self._cancel_button)
|
||||
cancel_button=self._cancel_button)
|
||||
|
||||
bui.textwidget(
|
||||
parent=self.root_widget,
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class SettingWindow(bui.Window):
|
|||
try:
|
||||
if Udefault >= 29 and self.selected == "upper":
|
||||
bui.textwidget(edit=self.warn_text,
|
||||
text="Careful!You risk get blind beyond this point")
|
||||
text="Careful!You risk get blind beyond this point")
|
||||
elif self.selected == "lower" and Ldefault >= -20 or self.selected == "upper" and Udefault <= 30:
|
||||
bui.textwidget(edit=self.warn_text, text="")
|
||||
if self.selected == "lower":
|
||||
|
|
@ -78,7 +78,7 @@ class SettingWindow(bui.Window):
|
|||
try:
|
||||
if Ldefault <= -19 and self.selected == "lower":
|
||||
bui.textwidget(edit=self.warn_text,
|
||||
text="DON'T BE AFRAID OF DARK,IT'S A PLACE WHERE YOU CAN HIDE")
|
||||
text="DON'T BE AFRAID OF DARK,IT'S A PLACE WHERE YOU CAN HIDE")
|
||||
elif (self.selected == "upper" and Udefault <= 30) or (self.selected == "lower" and Ldefault >= -20):
|
||||
bui.textwidget(edit=self.warn_text, text="")
|
||||
if self.selected == "lower":
|
||||
|
|
@ -218,23 +218,25 @@ class SettingWindow(bui.Window):
|
|||
|
||||
# ++++++++++++++++for keyboard navigation++++++++++++++++
|
||||
bui.widget(edit=self.enable_button, up_widget=decrease_button,
|
||||
down_widget=self.lower_text, left_widget=save_button, right_widget=save_button)
|
||||
down_widget=self.lower_text, left_widget=save_button, right_widget=save_button)
|
||||
bui.widget(edit=save_button, up_widget=self.close_button, down_widget=self.upper_text,
|
||||
left_widget=self.enable_button, right_widget=self.enable_button)
|
||||
left_widget=self.enable_button, right_widget=self.enable_button)
|
||||
bui.widget(edit=self.close_button, up_widget=increase_button, down_widget=save_button,
|
||||
left_widget=self.enable_button, right_widget=save_button)
|
||||
left_widget=self.enable_button, right_widget=save_button)
|
||||
bui.widget(edit=self.lower_text, up_widget=self.enable_button, down_widget=decrease_button,
|
||||
left_widget=self.upper_text, right_widget=self.upper_text)
|
||||
left_widget=self.upper_text, right_widget=self.upper_text)
|
||||
bui.widget(edit=self.upper_text, up_widget=save_button, down_widget=increase_button,
|
||||
left_widget=self.lower_text, right_widget=self.lower_text)
|
||||
left_widget=self.lower_text, right_widget=self.lower_text)
|
||||
bui.widget(edit=decrease_button, up_widget=self.lower_text, down_widget=self.enable_button,
|
||||
left_widget=increase_button, right_widget=increase_button)
|
||||
left_widget=increase_button, right_widget=increase_button)
|
||||
bui.widget(edit=increase_button, up_widget=self.upper_text, down_widget=self.close_button,
|
||||
left_widget=decrease_button, right_widget=decrease_button)
|
||||
left_widget=decrease_button, right_widget=decrease_button)
|
||||
# --------------------------------------------------------------------------------------------------
|
||||
|
||||
bui.textwidget(edit=self.upper_text, on_activate_call=babase.Call(self.on_text_click, "upper"))
|
||||
bui.textwidget(edit=self.lower_text, on_activate_call=babase.Call(self.on_text_click, "lower"))
|
||||
bui.textwidget(edit=self.upper_text, on_activate_call=babase.Call(
|
||||
self.on_text_click, "upper"))
|
||||
bui.textwidget(edit=self.lower_text, on_activate_call=babase.Call(
|
||||
self.on_text_click, "lower"))
|
||||
|
||||
def on_enableButton_press(self):
|
||||
global loop
|
||||
|
|
@ -275,12 +277,14 @@ def new_chat_message(msg: Union[str, babase.Lstr], clients: Sequence[int] = None
|
|||
except Exception as err:
|
||||
Print(err, "-from new_chat_message")
|
||||
|
||||
|
||||
class NewMainMenuWindow(MainMenuWindow):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
# Display chat icon, but if user open/close gather it may disappear
|
||||
bui.set_party_icon_always_visible(True)
|
||||
|
||||
|
||||
|
||||
old_fcm = bs.chatmessage
|
||||
bs.chatmessage = new_chat_message
|
||||
Map._old_init = Map.__init__
|
||||
|
|
|
|||
|
|
@ -135,15 +135,15 @@ class SelectGameWindow(PlaylistAddGameWindow):
|
|||
stack_offset=(0, 1) if uiscale is babase.UIScale.SMALL else (0, 0))
|
||||
|
||||
self._back_button = bui.buttonwidget(parent=self._root_widget,
|
||||
position=(58 + x_inset,
|
||||
self._height - 53),
|
||||
size=(165, 70),
|
||||
scale=0.75,
|
||||
text_scale=1.2,
|
||||
label=babase.Lstr(resource='backText'),
|
||||
autoselect=True,
|
||||
button_type='back',
|
||||
on_activate_call=self._back)
|
||||
position=(58 + x_inset,
|
||||
self._height - 53),
|
||||
size=(165, 70),
|
||||
scale=0.75,
|
||||
text_scale=1.2,
|
||||
label=babase.Lstr(resource='backText'),
|
||||
autoselect=True,
|
||||
button_type='back',
|
||||
on_activate_call=self._back)
|
||||
self._select_button = select_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(self._width - (172 + x_inset), self._height - 50),
|
||||
|
|
@ -156,17 +156,17 @@ class SelectGameWindow(PlaylistAddGameWindow):
|
|||
|
||||
if bui.app.ui_v1.use_toolbars:
|
||||
bui.widget(edit=select_button,
|
||||
right_widget=bui.get_special_widget('party_button'))
|
||||
right_widget=bui.get_special_widget('party_button'))
|
||||
|
||||
bui.textwidget(parent=self._root_widget,
|
||||
position=(self._width * 0.5, self._height - 28),
|
||||
size=(0, 0),
|
||||
scale=1.0,
|
||||
text=babase.Lstr(resource=self._r + '.titleText'),
|
||||
h_align='center',
|
||||
color=bui.app.ui_v1.title_color,
|
||||
maxwidth=250,
|
||||
v_align='center')
|
||||
position=(self._width * 0.5, self._height - 28),
|
||||
size=(0, 0),
|
||||
scale=1.0,
|
||||
text=babase.Lstr(resource=self._r + '.titleText'),
|
||||
h_align='center',
|
||||
color=bui.app.ui_v1.title_color,
|
||||
maxwidth=250,
|
||||
v_align='center')
|
||||
v = self._height - 64
|
||||
|
||||
self._selected_title_text = bui.textwidget(
|
||||
|
|
@ -194,32 +194,32 @@ class SelectGameWindow(PlaylistAddGameWindow):
|
|||
v = self._height - 60
|
||||
|
||||
self._scrollwidget = bui.scrollwidget(parent=self._root_widget,
|
||||
position=(x_inset + 61,
|
||||
v - scroll_height),
|
||||
size=(self._scroll_width,
|
||||
scroll_height),
|
||||
highlight=False)
|
||||
position=(x_inset + 61,
|
||||
v - scroll_height),
|
||||
size=(self._scroll_width,
|
||||
scroll_height),
|
||||
highlight=False)
|
||||
bui.widget(edit=self._scrollwidget,
|
||||
up_widget=self._back_button,
|
||||
left_widget=self._back_button,
|
||||
right_widget=select_button)
|
||||
up_widget=self._back_button,
|
||||
left_widget=self._back_button,
|
||||
right_widget=select_button)
|
||||
self._column: Optional[bui.Widget] = None
|
||||
|
||||
v -= 35
|
||||
bui.containerwidget(edit=self._root_widget,
|
||||
cancel_button=self._back_button,
|
||||
start_button=select_button)
|
||||
cancel_button=self._back_button,
|
||||
start_button=select_button)
|
||||
self._selected_game_type: Optional[Type[bs.GameActivity]] = None
|
||||
|
||||
bui.containerwidget(edit=self._root_widget,
|
||||
selected_child=self._scrollwidget)
|
||||
selected_child=self._scrollwidget)
|
||||
|
||||
self._game_types: list[type[bs.GameActivity]] = []
|
||||
|
||||
# Get actual games loading in the bg.
|
||||
babase.app.meta.load_exported_classes(bs.GameActivity,
|
||||
self._on_game_types_loaded,
|
||||
completion_cb_in_bg_thread=True)
|
||||
self._on_game_types_loaded,
|
||||
completion_cb_in_bg_thread=True)
|
||||
|
||||
# Refresh with our initial empty list. We'll refresh again once
|
||||
# game loading is complete.
|
||||
|
|
@ -240,29 +240,29 @@ class SelectGameWindow(PlaylistAddGameWindow):
|
|||
self._column.delete()
|
||||
|
||||
self._column = bui.columnwidget(parent=self._scrollwidget,
|
||||
border=2,
|
||||
margin=0)
|
||||
border=2,
|
||||
margin=0)
|
||||
|
||||
for i, gametype in enumerate(self._game_types):
|
||||
|
||||
def _doit() -> None:
|
||||
if self._select_button:
|
||||
bs.apptimer(0.1,
|
||||
self._select_button.activate)
|
||||
self._select_button.activate)
|
||||
|
||||
txt = bui.textwidget(parent=self._column,
|
||||
position=(0, 0),
|
||||
size=(self._width - 88, 24),
|
||||
text=gametype.get_display_string(),
|
||||
h_align='left',
|
||||
v_align='center',
|
||||
color=(0.8, 0.8, 0.8, 1.0),
|
||||
maxwidth=self._scroll_width * 0.8,
|
||||
on_select_call=babase.Call(
|
||||
self._set_selected_game_type, gametype),
|
||||
always_highlight=True,
|
||||
selectable=True,
|
||||
on_activate_call=_doit)
|
||||
position=(0, 0),
|
||||
size=(self._width - 88, 24),
|
||||
text=gametype.get_display_string(),
|
||||
h_align='left',
|
||||
v_align='center',
|
||||
color=(0.8, 0.8, 0.8, 1.0),
|
||||
maxwidth=self._scroll_width * 0.8,
|
||||
on_select_call=babase.Call(
|
||||
self._set_selected_game_type, gametype),
|
||||
always_highlight=True,
|
||||
selectable=True,
|
||||
on_activate_call=_doit)
|
||||
if i == 0:
|
||||
bui.widget(edit=txt, up_widget=self._back_button)
|
||||
|
||||
|
|
@ -276,8 +276,8 @@ class SelectGameWindow(PlaylistAddGameWindow):
|
|||
size=(178, 50))
|
||||
if select_get_more_games_button:
|
||||
bui.containerwidget(edit=self._column,
|
||||
selected_child=self._get_more_games_button,
|
||||
visible_child=self._get_more_games_button)
|
||||
selected_child=self._get_more_games_button,
|
||||
visible_child=self._get_more_games_button)
|
||||
|
||||
def _add(self) -> None:
|
||||
_babase.lock_all_input() # Make sure no more commands happen.
|
||||
|
|
@ -364,7 +364,7 @@ def _restore_state(self) -> None:
|
|||
return # ensure that our monkey patched init ran
|
||||
if self.__class__.__name__ not in bui.app.ui_v1.window_states:
|
||||
bui.containerwidget(edit=self._root_widget,
|
||||
selected_child=self._coop_button)
|
||||
selected_child=self._coop_button)
|
||||
return
|
||||
sel = states(self).get(
|
||||
bui.app.ui_v1.window_states[self.__class__.__name__], None)
|
||||
|
|
@ -372,7 +372,7 @@ def _restore_state(self) -> None:
|
|||
bui.containerwidget(edit=self._root_widget, selected_child=sel)
|
||||
else:
|
||||
bui.containerwidget(edit=self._root_widget,
|
||||
selected_child=self._coop_button)
|
||||
selected_child=self._coop_button)
|
||||
babase.print_exception(f'Error restoring state for {self}.')
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -132,7 +132,8 @@ class Quickturn(babase.Plugin):
|
|||
|
||||
func(*args, **kwargs)
|
||||
return wrapper
|
||||
bascenev1lib.actor.spaz.Spaz.handlemessage = new_handlemessage(bascenev1lib.actor.spaz.Spaz.handlemessage)
|
||||
bascenev1lib.actor.spaz.Spaz.handlemessage = new_handlemessage(
|
||||
bascenev1lib.actor.spaz.Spaz.handlemessage)
|
||||
|
||||
def new_on_run(func):
|
||||
def wrapper(*args, **kwargs):
|
||||
|
|
|
|||
|
|
@ -119,4 +119,5 @@ class RagdollBGone(babase.Plugin):
|
|||
|
||||
# Finally we """travel through the game files""" to replace the function we want with our own version.
|
||||
# We transplant the old function's arguments into our version.
|
||||
bascenev1lib.actor.spaz.Spaz.handlemessage = new_handlemessage(bascenev1lib.actor.spaz.Spaz.handlemessage)
|
||||
bascenev1lib.actor.spaz.Spaz.handlemessage = new_handlemessage(
|
||||
bascenev1lib.actor.spaz.Spaz.handlemessage)
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class NewPublicGatherTab(PublicGatherTab, PingThread):
|
|||
on_activate_call=bs.WeakCall(self._join_random_server),
|
||||
)
|
||||
bui.widget(edit=self._random_join_button, up_widget=self._host_text,
|
||||
left_widget=self._filter_text)
|
||||
left_widget=self._filter_text)
|
||||
|
||||
# We could place it somewhere under plugin settings which is kind of
|
||||
# official way to customise plugins. Although it's too deep:
|
||||
|
|
@ -100,7 +100,7 @@ class NewPublicGatherTab(PublicGatherTab, PingThread):
|
|||
|
||||
if not parties:
|
||||
bui.screenmessage('No suitable servers found; wait',
|
||||
color=(1, 0, 0))
|
||||
color=(1, 0, 0))
|
||||
bui.getsound('error').play()
|
||||
return
|
||||
|
||||
|
|
@ -228,7 +228,7 @@ class RandomJoinSettingsPopup(bui.Window):
|
|||
bui.textwidget(query=self._minimum_players_edit))
|
||||
except ValueError:
|
||||
bui.screenmessage('"Minimum players" should be integer',
|
||||
color=(1, 0, 0))
|
||||
color=(1, 0, 0))
|
||||
bui.getsound('error').play()
|
||||
errored = True
|
||||
try:
|
||||
|
|
@ -236,7 +236,7 @@ class RandomJoinSettingsPopup(bui.Window):
|
|||
bui.textwidget(query=self._maximum_ping_edit))
|
||||
except ValueError:
|
||||
bui.screenmessage('"Maximum ping" should be integer',
|
||||
color=(1, 0, 0))
|
||||
color=(1, 0, 0))
|
||||
bui.getsound('error').play()
|
||||
errored = True
|
||||
if errored:
|
||||
|
|
@ -247,16 +247,16 @@ class RandomJoinSettingsPopup(bui.Window):
|
|||
|
||||
if minimum_players < 0:
|
||||
bui.screenmessage('"Minimum players" should be at least 0',
|
||||
color=(1, 0, 0))
|
||||
color=(1, 0, 0))
|
||||
bui.getsound('error').play()
|
||||
errored = True
|
||||
|
||||
if maximum_ping <= 0:
|
||||
bui.screenmessage('"Maximum ping" should be greater than 0',
|
||||
color=(1, 0, 0))
|
||||
color=(1, 0, 0))
|
||||
bui.getsound('error').play()
|
||||
bui.screenmessage('(use 9999 as dont-care value)',
|
||||
color=(1, 0, 0))
|
||||
color=(1, 0, 0))
|
||||
errored = True
|
||||
|
||||
if errored:
|
||||
|
|
@ -294,7 +294,7 @@ class RandomJoin:
|
|||
self.minimum_players = cfg['minimum_players']
|
||||
except KeyError:
|
||||
bui.screenmessage('Error: RandomJoin config is broken, resetting..',
|
||||
color=(1, 0, 0), log=True)
|
||||
color=(1, 0, 0), log=True)
|
||||
bui.getsound('error').play()
|
||||
self.commit_config()
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,8 @@ class TNTRespawnText(babase.Plugin):
|
|||
args[0]._tnt.node.add_death_action(tnt_callback)
|
||||
return wrapper
|
||||
# Let's replace the original init function with our modified version.
|
||||
bascenev1lib.actor.bomb.TNTSpawner.__init__ = new_init(bascenev1lib.actor.bomb.TNTSpawner.__init__)
|
||||
bascenev1lib.actor.bomb.TNTSpawner.__init__ = new_init(
|
||||
bascenev1lib.actor.bomb.TNTSpawner.__init__)
|
||||
|
||||
# Our modified update function.
|
||||
# This gets called every 1.1s. Check the TNTSpawner class in the game's code for details.
|
||||
|
|
@ -215,4 +216,5 @@ class TNTRespawnText(babase.Plugin):
|
|||
return wrapper
|
||||
|
||||
# Let's replace the original update function with our modified version.
|
||||
bascenev1lib.actor.bomb.TNTSpawner._update = new_update(bascenev1lib.actor.bomb.TNTSpawner._update)
|
||||
bascenev1lib.actor.bomb.TNTSpawner._update = new_update(
|
||||
bascenev1lib.actor.bomb.TNTSpawner._update)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue