mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2026-08-15 13:04:30 +00:00
few fixes
This commit is contained in:
parent
523dbeb82c
commit
792014425c
14 changed files with 89 additions and 38 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -9,4 +9,7 @@ dist/ba_root/mods/serverdata/*.log
|
|||
dist/ba_root/mods/serverdata/*.log*
|
||||
dist/ba_root/mods/serverdata/*.json
|
||||
dist/ba_root/mods/stats/*.json
|
||||
|
||||
dist/ba_root/cache/*
|
||||
dist/ba_root/*.json
|
||||
dist/ba_root/config.json
|
||||
dist/*.keys
|
||||
|
|
|
|||
41
dist/ba_root/config.json
vendored
41
dist/ba_root/config.json
vendored
|
|
@ -175,6 +175,14 @@
|
|||
}
|
||||
},
|
||||
"Campaigns": {},
|
||||
"CloudVals": {
|
||||
"gct": [
|
||||
"asyncio.trsock.TransportSocket",
|
||||
"asyncio.selector_events._SelectorSocketTransport",
|
||||
"TimeoutError",
|
||||
"asyncio.exceptions.CancelledError"
|
||||
]
|
||||
},
|
||||
"Custom Team Colors": [
|
||||
[
|
||||
0.8,
|
||||
|
|
@ -195,21 +203,35 @@
|
|||
"Client Input Device #1": "__account__"
|
||||
},
|
||||
"FFA Series Length": 24,
|
||||
"Fleet Zone Ping Last Flush Time": 1744468224,
|
||||
"Fleet Zone Ping Last Flush Time": 1784128904,
|
||||
"Fleet Zone Pings": {
|
||||
"prod": {
|
||||
"bangkok.v4": 106.51884313655319,
|
||||
"delhi.v4": 60.29963269479843,
|
||||
"hyderabad.v4": 84.80298814475032,
|
||||
"kolkata.v4": 50.75696343299192,
|
||||
"mumbai.v4": 66.94819074099888
|
||||
"bangkok.v4": 169.84028096308512,
|
||||
"delhi.v4": 217.6381037222891,
|
||||
"helsinki.v4": 181.6233879981155,
|
||||
"hong_kong.v4": 97.65329500078224,
|
||||
"hyderabad.v4": 90.04969035134027,
|
||||
"jakarta.v4": 126.03041445786221,
|
||||
"kolkata.v4": 48.5306748606865,
|
||||
"kuala_lampur.v4": 80.35435232571763,
|
||||
"manila.v4": 82.0402399986051,
|
||||
"mumbai.v4": 71.56822602374099,
|
||||
"seoul.v4": 130.2257630013628,
|
||||
"singapore.v4": 91.58391039609705,
|
||||
"taipei.v4": 101.02094900139491,
|
||||
"tel_aviv.v4": 206.06530000077328,
|
||||
"tokyo.v4": 137.08936700277263,
|
||||
"warsaw.v4": 190.2154919989698
|
||||
}
|
||||
},
|
||||
"Fleet Zone Pings Updated Time": {
|
||||
"prod": 1784187190
|
||||
},
|
||||
"Free-for-All Playlist Randomize": true,
|
||||
"Free-for-All Playlist Selection": "__default__",
|
||||
"Free-for-All Playlists": {},
|
||||
"Idle Exit Minutes": 20.0,
|
||||
"Local Account Name": "Server21364126",
|
||||
"Local Account Name": "Server25997855",
|
||||
"PPM Settings": {
|
||||
"Healing Damage PTG": 72,
|
||||
"Powers Gravity": true,
|
||||
|
|
@ -255,9 +277,6 @@
|
|||
}
|
||||
},
|
||||
"Plugins": {
|
||||
"create_server.EntryPoint": {
|
||||
"enabled": true
|
||||
},
|
||||
"custom_hooks.modSetup": {
|
||||
"enabled": true
|
||||
},
|
||||
|
|
@ -276,7 +295,7 @@
|
|||
"Team Tournament Playlist Selection": "\u041a\u043e\u043f\u0438\u044f \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043f\u043b\u0435\u0439-\u043b\u0438\u0441\u0442 \u0440\u0435\u0436\u0438\u043c\u0430 \u041a\u043e\u043c\u0430\u043d\u0434\u044b",
|
||||
"Team Tournament Playlists": {},
|
||||
"Teams Series Length": 7,
|
||||
"launchCount": 107,
|
||||
"launchCount": 130,
|
||||
"lc14173": 1,
|
||||
"lc14292": 1
|
||||
}
|
||||
8
dist/ba_root/mods/custom_hooks.py
vendored
8
dist/ba_root/mods/custom_hooks.py
vendored
|
|
@ -277,7 +277,7 @@ def on_player_join(self, player) -> None:
|
|||
team_balancer.on_player_join()
|
||||
try:
|
||||
from shop.shop_system import preload_player
|
||||
account_id = player.get_v1_account_id()
|
||||
account_id = player.get_account_id()
|
||||
if account_id:
|
||||
preload_player(account_id)
|
||||
except Exception as e:
|
||||
|
|
@ -366,12 +366,12 @@ def on_player_request(func) -> bool:
|
|||
def wrapper(*args, **kwargs):
|
||||
player = args[1]
|
||||
count = 0
|
||||
if not (player.get_v1_account_id(
|
||||
if not (player.get_account_id(
|
||||
) in serverdata.clients and
|
||||
serverdata.clients[player.get_v1_account_id()]["verified"]):
|
||||
serverdata.clients[player.get_account_id()]["verified"]):
|
||||
return False
|
||||
for current_player in args[0].sessionplayers:
|
||||
if current_player.get_v1_account_id() == player.get_v1_account_id():
|
||||
if current_player.get_account_id() == player.get_account_id():
|
||||
count += 1
|
||||
if count >= settings["maxPlayersPerDevice"]:
|
||||
bs.broadcastmessage("Reached max players limit per device",
|
||||
|
|
|
|||
2
dist/ba_root/mods/features/afk_check.py
vendored
2
dist/ba_root/mods/features/afk_check.py
vendored
|
|
@ -38,7 +38,7 @@ class checkIdle(object):
|
|||
cLastIdle = current
|
||||
|
||||
if afk_time in range(INGAME_TIME, INGAME_TIME + 20):
|
||||
self.warn_player(player.get_v1_account_id(),
|
||||
self.warn_player(player.get_account_id(),
|
||||
"Press any button within " + str(
|
||||
INGAME_TIME + 20 - afk_time) + " secs")
|
||||
if afk_time > INGAME_TIME + 20:
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@ class TeamVictoryScoreScreenActivity(MultiTeamScoreScreenActivity):
|
|||
# 'First to 4'.
|
||||
session = self.session
|
||||
assert isinstance(session, bs.MultiTeamSession)
|
||||
if bs.app.lang.get_resource('bestOfUseFirstToInstead'):
|
||||
best_of_use_first_to_instead = 0
|
||||
if best_of_use_first_to_instead:
|
||||
best_txt = babase.Lstr(resource='firstToSeriesText',
|
||||
subs=[('${COUNT}',
|
||||
str(session.get_series_length() / 2 + 1))
|
||||
|
|
|
|||
5
dist/ba_root/mods/features/hearts.py
vendored
5
dist/ba_root/mods/features/hearts.py
vendored
|
|
@ -112,8 +112,9 @@ class PopupText(bs.Actor):
|
|||
|
||||
# kill ourself
|
||||
self._die_timer = bs.Timer(
|
||||
lifespan, bs.WeakCall(self.handlemessage, bs.DieMessage())
|
||||
)
|
||||
lifespan, bs.WeakCallPartial(
|
||||
self.handlemessage, bs.DieMessage()
|
||||
))
|
||||
|
||||
def handlemessage(self, msg: Any) -> Any:
|
||||
assert not self.expired
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ class BsDataThread(object):
|
|||
True),
|
||||
'inGame': player.in_game,
|
||||
'character': player.character,
|
||||
'account_id': player.get_v1_account_id()
|
||||
'account_id': player.get_account_id()
|
||||
}
|
||||
data[str(team.id)]['players'].append(teamplayer)
|
||||
|
||||
|
|
|
|||
2
dist/ba_root/mods/setting.json
vendored
2
dist/ba_root/mods/setting.json
vendored
|
|
@ -138,7 +138,7 @@
|
|||
"enable": false
|
||||
},
|
||||
"minAgeToChatInHours": 78,
|
||||
"minAgeToJoinInHours": 24,
|
||||
"minAgeToJoinInHours": 0.001,
|
||||
"newResultBoard": true,
|
||||
"playermod": {
|
||||
"default_bomb": "normal",
|
||||
|
|
|
|||
6
dist/ba_root/mods/spazmod/spaz_effects.py
vendored
6
dist/ba_root/mods/spazmod/spaz_effects.py
vendored
|
|
@ -34,7 +34,7 @@ def effect(repeat_interval=0):
|
|||
else:
|
||||
raise
|
||||
|
||||
effect_activation = bs.Timer(repeat_interval, babase.Call(_caller),
|
||||
effect_activation = bs.Timer(repeat_interval, babase.CallStrict(_caller),
|
||||
repeat=repeat_interval > 0)
|
||||
self._activations.append(effect_activation)
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ def node(check_interval=0):
|
|||
node.delete()
|
||||
self._activations = []
|
||||
|
||||
node_activation = bs.Timer(check_interval, babase.Call(_caller),
|
||||
node_activation = bs.Timer(check_interval, babase.CallStrict(_caller),
|
||||
repeat=check_interval > 0)
|
||||
try:
|
||||
self._activations.append(node_activation)
|
||||
|
|
@ -90,7 +90,7 @@ class NewPlayerSpaz(PlayerSpaz):
|
|||
|
||||
async def set_effects(self):
|
||||
try:
|
||||
account_id = self._player._sessionplayer.get_v1_account_id()
|
||||
account_id = self._player._sessionplayer.get_account_id()
|
||||
except:
|
||||
return
|
||||
|
||||
|
|
|
|||
9
dist/ba_root/mods/spazmod/tag.py
vendored
9
dist/ba_root/mods/spazmod/tag.py
vendored
|
|
@ -10,7 +10,7 @@ sett = setting.get_settings_data()
|
|||
|
||||
def addtag(node, player):
|
||||
session_player = player.sessionplayer
|
||||
account_id = session_player.get_v1_account_id()
|
||||
account_id = session_player.get_account_id()
|
||||
customtag_ = pdata.get_custom()
|
||||
customtag = customtag_['customtag']
|
||||
roles = pdata.get_roles()
|
||||
|
|
@ -33,7 +33,7 @@ def addtag(node, player):
|
|||
|
||||
def addrank(node, player):
|
||||
session_player = player.sessionplayer
|
||||
account_id = session_player.get_v1_account_id()
|
||||
account_id = session_player.get_account_id()
|
||||
rank = mystats.getRank(account_id)
|
||||
|
||||
if rank:
|
||||
|
|
@ -48,7 +48,7 @@ def addhp(node, spaz):
|
|||
position=(0, 1.75, 0), shad=1.4)
|
||||
else:
|
||||
spaz.hptimer = None
|
||||
spaz.hptimer = bs.Timer(2, babase.Call(
|
||||
spaz.hptimer = bs.Timer(2, babase.CallStrict(
|
||||
showHP), repeat=True)
|
||||
|
||||
|
||||
|
|
@ -164,5 +164,4 @@ class HitPoint(object):
|
|||
self._Text.delete()
|
||||
m.delete()
|
||||
|
||||
self.timer = bs.Timer(2, babase.Call(
|
||||
a))
|
||||
self.timer = bs.Timer(2, babase.CallStrict(a))
|
||||
|
|
|
|||
2
dist/ba_root/mods/stats/mystats.py
vendored
2
dist/ba_root/mods/stats/mystats.py
vendored
|
|
@ -191,7 +191,7 @@ def update(score_set):
|
|||
player = p_entry.player
|
||||
if player is None:
|
||||
continue
|
||||
account_id = player.get_v1_account_id()
|
||||
account_id = player.get_account_id()
|
||||
if account_id is None:
|
||||
continue
|
||||
name = player.getname(True)
|
||||
|
|
|
|||
15
dist/ba_root/mods/stats/stats.json
vendored
15
dist/ba_root/mods/stats/stats.json
vendored
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"startDate": "25-03-2026",
|
||||
"startDate": "15-07-2026",
|
||||
"stats": {
|
||||
"pb-IF4VAk4a": {
|
||||
"rank": 1,
|
||||
|
|
@ -13,6 +13,19 @@
|
|||
"avg_score": 0.0,
|
||||
"aid": "pb-IF4VAk4a",
|
||||
"last_seen": "2022-04-26 17:01:13.715014"
|
||||
},
|
||||
"pb-IF5cVXEyAA==": {
|
||||
"rank": 2,
|
||||
"name": "Vishyyy",
|
||||
"scores": 639,
|
||||
"total_damage": 0.0,
|
||||
"kills": 0,
|
||||
"deaths": 3,
|
||||
"games": 8,
|
||||
"kd": 0.0,
|
||||
"avg_score": 79.875,
|
||||
"last_seen": "2026-07-16 02:33:01.093212",
|
||||
"aid": "pb-IF5cVXEyAA=="
|
||||
}
|
||||
}
|
||||
}
|
||||
15
dist/ba_root/mods/stats/stats.json.backup
vendored
15
dist/ba_root/mods/stats/stats.json.backup
vendored
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"startDate": "25-03-2026",
|
||||
"startDate": "15-07-2026",
|
||||
"stats": {
|
||||
"pb-IF4VAk4a": {
|
||||
"rank": 1,
|
||||
|
|
@ -13,6 +13,19 @@
|
|||
"avg_score": 0.0,
|
||||
"aid": "pb-IF4VAk4a",
|
||||
"last_seen": "2022-04-26 17:01:13.715014"
|
||||
},
|
||||
"pb-IF5cVXEyAA==": {
|
||||
"rank": 2,
|
||||
"name": "Vishyyy",
|
||||
"scores": 639,
|
||||
"total_damage": 0.0,
|
||||
"kills": 0,
|
||||
"deaths": 3,
|
||||
"games": 8,
|
||||
"kd": 0.0,
|
||||
"avg_score": 79.875,
|
||||
"last_seen": "2026-07-16 02:33:01.093212",
|
||||
"aid": "pb-IF5cVXEyAA=="
|
||||
}
|
||||
}
|
||||
}
|
||||
12
dist/ba_root/mods/tools/servercheck.py
vendored
12
dist/ba_root/mods/tools/servercheck.py
vendored
|
|
@ -14,7 +14,7 @@ import _babase
|
|||
import _bascenev1
|
||||
import babase
|
||||
import bascenev1 as bs
|
||||
from babase._general import Call
|
||||
from babase._general import CallPartial
|
||||
from features import profanity
|
||||
from playersdata import pdata
|
||||
from repository import profiles
|
||||
|
|
@ -28,6 +28,7 @@ blacklist = pdata.get_blacklist()
|
|||
# Get settings
|
||||
settings = setting.get_settings_data()
|
||||
|
||||
ipjoin = {}
|
||||
|
||||
@dataclass
|
||||
class PlayerData:
|
||||
|
|
@ -212,6 +213,7 @@ def on_player_join_server(pbid: str, player_data: Optional[Dict[str, Any]], ip:
|
|||
serverdata.clients[pbid]["lastJoin"] = now
|
||||
|
||||
if player_data is not None:
|
||||
print(player_data)
|
||||
handle_existing_player(pbid, player_data, ip,
|
||||
device_id, client_id, display_string)
|
||||
else:
|
||||
|
|
@ -435,7 +437,7 @@ class LoadProfile(threading.Thread):
|
|||
def run(self) -> None:
|
||||
player_data = pdata.get_info(self.pbid)
|
||||
_babase.pushcall(
|
||||
Call(on_player_join_server, self.pbid,
|
||||
CallPartial(on_player_join_server, self.pbid,
|
||||
player_data, self.ip, self.device_id),
|
||||
from_other_thread=True,
|
||||
)
|
||||
|
|
@ -455,7 +457,7 @@ class FetchThread(threading.Thread):
|
|||
data = self.method(pb_id)
|
||||
if self.callback is not None:
|
||||
_babase.pushcall(
|
||||
Call(self.callback, data, pb_id, display_string),
|
||||
CallPartial(self.callback, data, pb_id, display_string),
|
||||
from_other_thread=True,
|
||||
)
|
||||
|
||||
|
|
@ -559,12 +561,12 @@ def account_check(account_id: str, ip: str, client_id: int) -> None:
|
|||
profiles.upsert_ip(account_id, ip)
|
||||
except urllib.error.URLError:
|
||||
_babase.pushcall(
|
||||
Call(bs.chatmessage, "Click stats button and login your V2 account, to verify your identity", [
|
||||
CallPartial(bs.chatmessage, "Click stats button and login your V2 account, to verify your identity", [
|
||||
client_id]),
|
||||
from_other_thread=True,
|
||||
)
|
||||
_babase.pushcall(
|
||||
Call(bs.disconnect_client, client_id, 2), from_other_thread=True)
|
||||
CallPartial(bs.disconnect_client, client_id, 2), from_other_thread=True)
|
||||
|
||||
|
||||
# Instantiate the server check
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue