mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-10-20 00:00:39 +00:00
added some hooks and user custom tag , effects
This commit is contained in:
parent
be7e8c63de
commit
91af4a8027
12 changed files with 131 additions and 4 deletions
2
dist/ba_data/python/ba/_activitytypes.py
vendored
2
dist/ba_data/python/ba/_activitytypes.py
vendored
|
|
@ -168,6 +168,8 @@ class ScoreScreenActivity(Activity[EmptyPlayer, EmptyTeam]):
|
|||
from bastd.actor.text import Text
|
||||
from ba import _language
|
||||
super().on_begin()
|
||||
import custom_hooks as chook
|
||||
chook.score_screen_on_begin(self._stats)
|
||||
|
||||
# Pop up a 'press any button to continue' statement after our
|
||||
# min-view-time show a 'press any button to continue..'
|
||||
|
|
|
|||
2
dist/ba_data/python/ba/_app.py
vendored
2
dist/ba_data/python/ba/_app.py
vendored
|
|
@ -279,6 +279,8 @@ class App:
|
|||
from bastd import maps as stdmaps
|
||||
from bastd.actor import spazappearance
|
||||
from ba._enums import TimeType
|
||||
import custom_hooks
|
||||
custom_hooks.on_app_launch()
|
||||
|
||||
cfg = self.config
|
||||
|
||||
|
|
|
|||
8
dist/ba_data/python/ba/_hooks.py
vendored
8
dist/ba_data/python/ba/_hooks.py
vendored
|
|
@ -308,6 +308,7 @@ def party_invite_revoke(invite_id: str) -> None:
|
|||
transition='out_right')
|
||||
|
||||
import privateserver as pvt
|
||||
import custom_hooks as chooks
|
||||
def filter_chat_message(msg: str, client_id: int) -> Optional[str]:
|
||||
"""Intercept/filter chat messages.
|
||||
|
||||
|
|
@ -316,9 +317,10 @@ def filter_chat_message(msg: str, client_id: int) -> Optional[str]:
|
|||
Should filter and return the string to be displayed, or return None
|
||||
to ignore the message.
|
||||
"""
|
||||
pvt.handlechat(msg,client_id);
|
||||
del client_id # Unused by default.
|
||||
return msg
|
||||
pvt.handlechat(msg,client_id)
|
||||
return chooks.filter_chat_message(msg,client_id)
|
||||
|
||||
|
||||
|
||||
|
||||
def local_chat_message(msg: str) -> None:
|
||||
|
|
|
|||
|
|
@ -70,6 +70,8 @@ class PlayerSpaz(Spaz):
|
|||
self.last_player_held_by: Optional[ba.Player] = None
|
||||
self._player = player
|
||||
self._drive_player_position()
|
||||
import custom_hooks
|
||||
custom_hooks.playerspaz_init(self._player)
|
||||
|
||||
# Overloads to tell the type system our return type based on doraise val.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue