Merge pull request #135 from vishal332008/beta/1.8.0

Beta/1.8.0 stuff (completed? idk, depends if smoothy wanna merge it)
This commit is contained in:
Ayush Saini 2026-08-05 18:03:31 +05:30 committed by GitHub
commit 23eef12e69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
40 changed files with 262 additions and 490 deletions

5
.gitignore vendored
View file

@ -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

View file

@ -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": 81.62017577624344,
"delhi.v4": 63.964672644626035,
"helsinki.v4": 178.44603499997902,
"hong_kong.v4": 84.84311700021863,
"hyderabad.v4": 169.17364551628094,
"jakarta.v4": 120.16353614961386,
"kolkata.v4": 171.5810691091089,
"kuala_lampur.v4": 97.94705339403097,
"manila.v4": 85.0717169996642,
"mumbai.v4": 53.889843160696806,
"seoul.v4": 113.3862230003615,
"singapore.v4": 89.7048506555974,
"taipei.v4": 91.55671799999254,
"tel_aviv.v4": 227.04064399977142,
"tokyo.v4": 119.68682299993816,
"warsaw.v4": 190.9533369998826
}
},
"Fleet Zone Pings Updated Time": {
"prod": 1784222852
},
"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": 155,
"lc14173": 1,
"lc14292": 1
}

View file

@ -372,7 +372,7 @@ def on_player_join(self, player) -> None:
try:
from shop.shop_system import preload_player
account_id = player.get_v1_account_id()
account_id = player.sessionplayer.get_account_id()
if account_id:
preload_player(account_id)
except Exception as e:
@ -459,15 +459,15 @@ ServerController.shutdown = shutdown(ServerController.shutdown)
def on_player_request(func) -> bool:
def wrapper(*args, **kwargs):
player = args[1]
player: bs.SessionPlayer = 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",

View file

@ -15,7 +15,7 @@ cLastIdle = 0
class checkIdle(object):
def start(self):
self.t1 = babase.AppTimer(2, babase.Call(self.check), repeat=True)
self.t1 = babase.AppTimer(2, babase.CallStrict(self.check), repeat=True)
self.lobbies = {}
def check(self):
@ -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:

View file

@ -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))
@ -62,7 +63,7 @@ class TeamVictoryScoreScreenActivity(MultiTeamScoreScreenActivity):
for team in self.session.sessionteams:
bs.timer(
i * 0.15 + 0.15,
bs.WeakCall(self._show_team_name, vval - i * height, team,
bs.WeakCallPartial(self._show_team_name, vval - i * height, team,
i * 0.2, shift_time - (i * 0.150 + 0.150)))
bs.timer(i * 0.150 + 0.5, self._score_display_sound_small.play)
scored = (team is self._winner)
@ -71,13 +72,13 @@ class TeamVictoryScoreScreenActivity(MultiTeamScoreScreenActivity):
delay = 1.2
bs.timer(
i * 0.150 + 0.2,
bs.WeakCall(self._show_team_old_score, vval - i * height,
bs.WeakCallPartial(self._show_team_old_score, vval - i * height,
team, shift_time - (i * 0.15 + 0.2)))
bs.timer(i * 0.15 + 1.5, self._score_display_sound.play)
bs.timer(
i * 0.150 + delay,
bs.WeakCall(self._show_team_score, vval - i * height, team,
bs.WeakCallPartial(self._show_team_score, vval - i * height, team,
scored, i * 0.2 + 0.1,
shift_time - (i * 0.15 + delay)))
i += 1

View file

@ -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

View file

@ -41,7 +41,7 @@ class textonmap:
self.season_reset(_babase.season_ends_in_days)
if setti["leaderboard"]["enable"]:
self.leaderBoard()
self.timer = bs.timer(8, babase.Call(self.highlights_), repeat=True)
self.timer = bs.timer(8, babase.CallStrict(self.highlights_), repeat=True)
def highlights_(self):
if setti["textonmap"]['center highlights']["randomColor"]:

View file

@ -78,7 +78,10 @@ def vote(pb_id, client_id, vote_type):
try:
activity = bs.get_foreground_host_activity()
with activity.context:
bs.get_foreground_host_activity().end()
results = bs.GameResults()
for team in activity.teams:
results.set_team_score(team, team.score)
bs.get_foreground_host_activity().end(results=results)
except:
pass
elif vote_type == "nv":

View file

@ -1,9 +1,8 @@
# Porting to api 8 made easier by baport.(https://github.com/bombsquad-community/baport)
# Released under the MIT License. See LICENSE for details.
# BY Stary_Agent
"""Hockey game and support classes."""
"""Air soccer game."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations
@ -40,7 +39,7 @@ def create_slope(self):
class Puck(bs.Actor):
"""A lovely giant hockey puck."""
"""A lovely ball."""
def __init__(self, position: Sequence[float] = (0.0, 13.0, 0.0)):
super().__init__()
@ -52,7 +51,6 @@ class Puck(bs.Actor):
self.last_players_to_touch: Dict[int, Player] = {}
self.scored = False
assert activity is not None
assert isinstance(activity, HockeyGame)
pmats = [shared.object_material, activity.puck_material]
self.node = bs.newnode('prop',
delegate=self,
@ -117,7 +115,7 @@ class Team(bs.Team[Player]):
# ba_meta export bascenev1.GameActivity
class AirSoccerGame(bs.TeamGameActivity[Player, Team]):
"""Ice hockey game."""
"""Air soccer game."""
name = 'Epic Air Soccer'
description = 'Score some goals.'
@ -656,6 +654,6 @@ class CreativeThoughts(bs.Map):
try:
bs._map.register_map(CreativeThoughts)
bs.register_map(CreativeThoughts)
except:
pass

View file

@ -2,12 +2,13 @@
#
"""Elimination mini-game."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations
from typing import TYPE_CHECKING
import logging
import babase
import bascenev1 as bs
@ -184,7 +185,7 @@ class AllianceEliminationGame(bs.TeamGameActivity[Player, Team]):
@classmethod
def get_available_settings(
cls, sessiontype: Type[bs.Session]) -> List[babase.Setting]:
cls, sessiontype: Type[bs.Session]) -> List[bs.Setting]:
settings = [
bs.IntSetting(
'Lives Per Player',
@ -448,7 +449,7 @@ class AllianceEliminationGame(bs.TeamGameActivity[Player, Team]):
player.lives -= 1
if player.lives < 0:
babase.print_error(
logging.error(
"Got lives < 0 in Alliance Elimination; this shouldn't happen.")
player.lives = 0

View file

@ -1,10 +1,4 @@
# Ported by your friend: Freaku
# Join BCS:
# https://discord.gg/ucyaesh
# ba_meta require api 8
# ba_meta require api 9
from __future__ import annotations
@ -37,7 +31,7 @@ class State:
enable_bomb=self.bomb,
enable_pickup=self.grab)
if self.curse:
spaz.curse_time = -1
spaz.curse_time = None
spaz.curse()
if self.bomb:
spaz.bomb_type = self.bomb
@ -82,7 +76,7 @@ class ArmsRaceGame(bs.TeamGameActivity[Player, Team]):
@classmethod
def get_available_settings(
cls, sessiontype: Type[bs.Session]) -> List[babase.Setting]:
cls, sessiontype: Type[bs.Session]) -> List[bs.Setting]:
settings = [
bs.IntChoiceSetting(
'Time Limit',
@ -149,7 +143,6 @@ class ArmsRaceGame(bs.TeamGameActivity[Player, Team]):
def on_begin(self) -> None:
super().on_begin()
self.setup_standard_time_limit(self._time_limit)
# self.setup_standard_powerup_drops()
def on_player_join(self, player):
if player.state is None:

View file

@ -1,7 +1,6 @@
# Porting to api 8 made easier by baport.(https://github.com/bombsquad-community/baport)
"""Avalancha mini-game."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations
@ -26,12 +25,12 @@ randomPic = ["lakeFrigidPreview", "hockeyStadiumPreview"]
def ba_get_api_version():
return 8
return 9
def ba_get_levels():
return [
bs._level.Level(
bs.Level(
"Icy Emits",
gametype=IcyEmitsGame,
settings={},
@ -127,7 +126,7 @@ class AvalanchaGame(MeteorShowerGame):
pos = (pos[0], pos[1] + 0.4, pos[2])
dropdir = -1.0 if pos[0] > 0 else 1.0
vel = (random.randrange(-4, 4), 7.0, random.randrange(0, 4))
bs.timer(delay, babase.Call(self._drop_bomb, pos, vel))
bs.timer(delay, babase.CallPartial(self._drop_bomb, pos, vel))
delay += 0.1
self._set_meteor_timer()

View file

@ -1,19 +1,14 @@
# Porting to api 8 made easier by baport.(https://github.com/bombsquad-community/baport)
# Released under the MIT License. See LICENSE for details.
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations
from typing import TYPE_CHECKING
import babase
import bauiv1 as bui
import bascenev1 as bs
import _babase
from bascenev1lib.actor.playerspaz import PlayerSpaz
from bascenev1lib.actor.scoreboard import Scoreboard
from bascenev1lib.actor.powerupbox import PowerupBoxFactory
from bascenev1lib.gameutils import SharedObjects
from bascenev1lib.actor import playerspaz as ps
from bascenev1lib import maps
@ -558,9 +553,6 @@ class Cuadro(bs.Actor):
'materials': [self.collision,
shared.footing_material]})
# self.shield = bs.newnode('shield', attrs={'radius': 1.0, 'color': (0,10,0)})
# self.region.connectattr('position', self.shield, 'position')
position = (position[0], position[1], position[2]+0.09)
pos = list(position)
oldpos = list(position)
@ -770,5 +762,5 @@ class BasketMapV2(maps.HockeyStadium):
]
bs._map.register_map(BasketMap)
bs._map.register_map(BasketMapV2)
bs.register_map(BasketMap)
bs.register_map(BasketMapV2)

View file

@ -1,10 +1,9 @@
# Ported to api 8 by brostos using baport.(https://github.com/bombsquad-community/baport)
# BetterDeathMatch
# Made by your friend: @[Just] Freak#4999
"""Defines a very-customisable DeathMatch mini-game"""
# ba_meta require api 8
# ba_meta require api 9
from __future__ import annotations
@ -17,7 +16,7 @@ from bascenev1lib.actor.playerspaz import PlayerSpaz
from bascenev1lib.actor.scoreboard import Scoreboard
if TYPE_CHECKING:
from typing import Any, Type, List, Dict, Tuple, Union, Sequence, Optional
from typing import Any, Type, List, Union, Sequence, Optional
class Player(bs.Player['Team']):
@ -43,7 +42,7 @@ class BetterDeathMatchGame(bs.TeamGameActivity[Player, Team]):
@classmethod
def get_available_settings(
cls, sessiontype: Type[bs.Session]) -> List[babase.Setting]:
cls, sessiontype: Type[bs.Session]) -> List[bs.Setting]:
settings = [
bs.IntSetting(
'Kills to Win Per Player',
@ -138,19 +137,16 @@ class BetterDeathMatchGame(bs.TeamGameActivity[Player, Team]):
bs.MusicType.TO_THE_DEATH)
def get_instance_description(self) -> Union[str, Sequence]:
return 'Crush ${ARG1} of your enemies. byFREAK', self._score_to_win
return 'Crush ${ARG1} of your enemies.', self._score_to_win
def get_instance_description_short(self) -> Union[str, Sequence]:
return 'kill ${ARG1} enemies. byFREAK', self._score_to_win
return 'kill ${ARG1} enemies.', self._score_to_win
def on_team_join(self, team: Team) -> None:
if self.has_begun():
self._update_scoreboard()
## Run settings related: IcyFloor ##
def on_transition_in(self) -> None:
super().on_transition_in()
activity = bs.getactivity()
@ -164,7 +160,6 @@ class BetterDeathMatchGame(bs.TeamGameActivity[Player, Team]):
super().on_begin()
self.setup_standard_time_limit(self._time_limit)
## Run settings related: NightMode,Powerups ##
if self._night_mode:
bs.getactivity().globalsnode.tint = (0.5, 0.7, 1)

View file

@ -1,4 +1,3 @@
# Ported to api 8 by brostos using baport.(https://github.com/bombsquad-community/baport)
# BetterElimination
# Made by your friend: @[Just] Freak#4999
@ -7,11 +6,12 @@
"""Defines a very-customisable Elimination mini-game"""
# ba_meta require api 8
# ba_meta require api 9
from __future__ import annotations
from typing import TYPE_CHECKING
import logging
import babase
import bauiv1 as bui
@ -20,8 +20,7 @@ from bascenev1lib.actor.spazfactory import SpazFactory
from bascenev1lib.actor.scoreboard import Scoreboard
if TYPE_CHECKING:
from typing import (Any, Tuple, Dict, Type, List, Sequence, Optional,
Union)
from typing import Any, Tuple, Type, List, Sequence, Optional, Union
class Icon(bs.Actor):
@ -187,7 +186,7 @@ class BetterEliminationGame(bs.TeamGameActivity[Player, Team]):
@classmethod
def get_available_settings(
cls, sessiontype: Type[bs.Session]) -> List[babase.Setting]:
cls, sessiontype: Type[bs.Session]) -> List[bs.Setting]:
settings = [
bs.IntSetting(
'Life\'s Per Player',
@ -590,7 +589,7 @@ class BetterEliminationGame(bs.TeamGameActivity[Player, Team]):
player.lives -= 1
if player.lives < 0:
babase.print_error(
logging.error(
"Got lives < 0 in Elim; this shouldn't happen. solo:" +
str(self._solo_mode))
player.lives = 0

View file

@ -1,8 +1,6 @@
# Made by MythB
# Ported by: MysteriousBoi
# ba_meta require api 8
# ba_meta require api 9
from __future__ import annotations
from typing import TYPE_CHECKING
@ -25,8 +23,6 @@ class PuckDiedMessage:
# goalpost
class FlagKale(bs.Actor):
def __init__(self, position=(0, 2.5, 0), color=(1, 1, 1)):
super().__init__()
@ -305,8 +301,8 @@ class BBGame(bs.TeamGameActivity[Player, Team]):
def get_instance_description_short(self) -> Union[str, Sequence]:
if self._score_to_win == 1:
return 'score a goal'
return 'score ${ARG1} goals', self._score_to_win
return 'Score a goal'
return 'Score ${ARG1} goals', self._score_to_win
def on_begin(self) -> None:
super().on_begin()
@ -437,7 +433,7 @@ class BBGame(bs.TeamGameActivity[Player, Team]):
if self._grant_power:
for player in team.players:
try:
player.actor.node.handlemessage(
player.node.handlemessage(
bs.PowerupMessage('punch'))
except:
pass
@ -463,7 +459,7 @@ class BBGame(bs.TeamGameActivity[Player, Team]):
if self._grant_power:
for player in team.players:
try:
player.actor.node.handlemessage(
player.node.handlemessage(
bs.PowerupMessage('shield'))
except:
pass

View file

@ -1,4 +1,4 @@
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations
@ -64,7 +64,7 @@ class NewPlayerSpaz(PlayerSpaz):
self.check_avalible_bombs()
self._bomb_check_timer = bs.timer(
0.5,
bs.WeakCall(self.check_avalible_bombs),
bs.WeakCallStrict(self.check_avalible_bombs),
repeat=True)
def drop_bomb(self) -> stdbomb.Bomb | None:
@ -95,7 +95,7 @@ class NewPlayerSpaz(PlayerSpaz):
self.bomb_count -= 1
bomb.node.add_death_action(
bs.WeakCall(self.handlemessage, BombDiedMessage())
bs.WeakCallPartial(self.handlemessage, BombDiedMessage())
)
self._pick_up(bomb.node)
@ -133,7 +133,7 @@ class BombOnMyHeadGame(bs.TeamGameActivity[Player, Team]):
@classmethod
def get_available_settings(
cls, sessiontype: type[bs.Session]
) -> list[babase.Setting]:
) -> list[bs.Setting]:
settings = [
bs.IntChoiceSetting(
maxbomblimit,
@ -194,6 +194,7 @@ class BombOnMyHeadGame(bs.TeamGameActivity[Player, Team]):
self.setup_standard_time_limit(self._time_limit)
self._timer = OnScreenTimer()
self._timer.start()
bs.timer(5.0, self._check_end_game)
def spawn_player(self, player: Player) -> bs.Actor:
from babase import _math
@ -236,7 +237,7 @@ class BombOnMyHeadGame(bs.TeamGameActivity[Player, Team]):
animate(light, 'intensity', {0: 0, 0.25: 1, 0.5: 0})
bs.timer(0.5, light.delete)
bs.timer(1.0, bs.WeakCall(spaz.start_bomb_checking))
bs.timer(1.0, bs.WeakCallStrict(spaz.start_bomb_checking))
spaz.set_bomb_count(self._max_bomb_limit)
def handlemessage(self, msg: Any) -> Any:

View file

@ -1,4 +1,4 @@
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations
@ -52,8 +52,8 @@ class NewPlayerSpaz(PlayerSpaz):
self.super_jump_material.add_actions(
conditions=('they_have_material', shared.footing_material),
actions=(
('call', 'at_connect', babase.Call(self.jump_state, True)),
('call', 'at_disconnect', babase.Call(self.jump_state, False))
('call', 'at_connect', babase.CallPartial(self.jump_state, True)),
('call', 'at_disconnect', babase.CallPartial(self.jump_state, False))
),
)
self.node.roller_materials += (self.super_jump_material,)
@ -98,7 +98,7 @@ class BoxingGame(DeathMatchGame):
@classmethod
def get_available_settings(
cls, sessiontype: type[bs.Session]
) -> list[babase.Setting]:
) -> list[bs.Setting]:
settings = [
bs.IntSetting(
'Kills to Win Per Player',

View file

@ -1,236 +0,0 @@
from __future__ import annotations
from typing import TYPE_CHECKING
import babase
import bauiv1 as bui
import bascenev1 as bs
from bascenev1lib.gameutils import SharedObjects
from bascenev1lib.actor.playerspaz import PlayerSpaz
import random
if TYPE_CHECKING:
from typing import Any, List, Dict
class mapdefs:
points = {}
# noinspection PyDictCreation
boxes = {}
boxes['area_of_interest_bounds'] = (0.0, 1.185751251, 0.4326226188) + (
0.0, 0.0, 0.0) + (29.8180273, 11.57249038, 18.89134176)
boxes['edge_box'] = (-0.103873591, 0.4133341891, 0.4294651013) + (
0.0, 0.0, 0.0) + (22.48295719, 1.290242794, 8.990252454)
points['ffa_spawn1'] = (-0.08015551329, 0.02275111462,
-4.373674593) + (8.895057015, 1.0, 0.444350722)
points['ffa_spawn2'] = (-0.08015551329, 0.02275111462,
4.076288941) + (8.895057015, 1.0, 0.444350722)
points['flag1'] = (-10.99027878, 0.05744967453, 0.1095578275)
points['flag2'] = (11.01486398, 0.03986567039, 0.1095578275)
points['flag_default'] = (-0.1001374046, 0.04180340146, 0.1095578275)
boxes['goal1'] = (12.22454533, 1.0,
0.1087926362) + (0.0, 0.0, 0.0) + (2.0, 2.0, 12.97466313)
boxes['goal2'] = (-12.15961605, 1.0,
0.1097860203) + (0.0, 0.0, 0.0) + (2.0, 2.0, 13.11856424)
boxes['map_bounds'] = (0.0, 1.185751251, 0.4326226188) + (0.0, 0.0, 0.0) + (
42.09506485, 22.81173179, 29.76723155)
points['powerup_spawn1'] = (5.414681236, 0.9515026107, -5.037912441)
points['powerup_spawn2'] = (-5.555402285, 0.9515026107, -5.037912441)
points['powerup_spawn3'] = (5.414681236, 0.9515026107, 5.148223181)
points['powerup_spawn4'] = (-5.737266365, 0.9515026107, 5.148223181)
points['spawn1'] = (-10.03866341, 0.02275111462, 0.0) + (0.5, 1.0, 4.0)
points['spawn2'] = (9.823107149, 0.01092306765, 0.0) + (0.5, 1.0, 4.0)
points['tnt1'] = (-0.08421587483, 0.9515026107, -0.7762602271)
class BridgitMash(bs.Map):
"""Stadium map for football games."""
defs = mapdefs
defs.points['spawn1'] = (-12.03866341, 0.02275111462,
0.0) + (0.5, 1.0, 4.0)
defs.points['spawn2'] = (
12.823107149, 0.01092306765, 0.0) + (0.5, 1.0, 4.0)
defs.points["flag1"] = (-9.6, 0.747, -2.949)
defs.points["flag2"] = (9.6, 0.747, 3.15)
defs.points["flag3"] = (-9.6, 0.747, 3.15)
defs.points["flag4"] = (-0.1, 0.747, -2.949)
defs.points["flag5"] = (-0.1, 0.747, 0.152)
defs.points["flag6"] = (-0.1, 0.747, 3.15)
defs.points["flag7"] = (9.6, 0.747, -2.949)
defs.points["flag8"] = (9.6, 0.747, 0.152)
defs.points["flag9"] = (-9.6, 0.747, 0.152)
defs.points["spawn_by_flag1"] = (-9.6, 0.747, -2.949)
defs.points["spawn_by_flag2"] = (9.6, 0.747, 3.15)
defs.points["spawn_by_flag3"] = (-9.6, 0.747, 3.15)
defs.points["spawn_by_flag4"] = (-0.1, 0.747, -2.949)
defs.points["spawn_by_flag5"] = (-0.1, 0.747, 0.152)
defs.points["spawn_by_flag6"] = (-0.1, 0.747, 3.15)
defs.points["spawn_by_flag7"] = (9.6, 0.747, -2.949)
defs.points["spawn_by_flag8"] = (9.6, 0.747, 0.152)
defs.points["spawn_by_flag9"] = (-9.6, 0.747, 0.152)
name = 'Bridgit Mash'
@classmethod
def get_play_types(cls) -> list[str]:
"""Return valid play types for this map."""
return ['melee', 'football', 'team_flag', 'keep_away', 'conquest']
@classmethod
def get_preview_texture_name(cls) -> str:
return 'footballStadiumPreview'
@classmethod
def on_preload(cls) -> Any:
data: dict[str, Any] = {
'mesh': bs.getmesh('footballStadium'),
'vr_fill_mesh': bs.getmesh('footballStadiumVRFill'),
'collision_mesh': bs.getcollisionmesh('footballStadiumCollide'),
'tex': bs.gettexture('footballStadium')
}
return data
def __init__(self) -> None:
super().__init__()
shared = SharedObjects.get()
# TODO vr fill data
gnode = bs.getactivity().globalsnode
gnode.tint = (1.3, 1.2, 1.0)
gnode.ambient_color = (1.3, 1.2, 1.0)
gnode.vignette_outer = (0.57, 0.57, 0.57)
gnode.vignette_inner = (0.9, 0.9, 0.9)
gnode.vr_camera_offset = (0, -0.8, -1.1)
gnode.vr_near_clip = 0.5
cols = [(0.10, 0.3, 0.5), (0.6, 0.3, 0.6), (0.6, 0.3, 0.1),
(0.2, 0.4, 0.1), (0.4, 0.3, 0.7), (0.10, 0.3, 0.5)]
self.background = bs.newnode(
'terrain',
attrs={
'mesh': bs.getmesh('natureBackground'),
'lighting': False,
'background': True,
'color': cols[random.randrange(0, 6)]
})
self.map_extend()
def is_point_near_edge(self,
point: babase.Vec3,
running: bool = False) -> bool:
box_position = self.defs.boxes['edge_box'][0:3]
box_scale = self.defs.boxes['edge_box'][6:9]
xpos = (point.x - box_position[0]) / box_scale[0]
zpos = (point.z - box_position[2]) / box_scale[2]
return xpos < -0.5 or xpos > 0.5 or zpos < -0.5 or zpos > 0.5
def map_extend(self):
self.create_ramp(0, 0)
self.create_ramp(10.9, 0)
self.create_ramp(0, -3)
self.create_ramp(10.9, -2.8)
self.create_ramp(0, 3.0)
self.create_ramp(10.9, 3.2)
self.ground()
# _babase.prop_axis(1, 0, 0)
def ground(self):
shared = SharedObjects.get()
self._real_wall_material = bs.Material()
self._real_wall_material.add_actions(
actions=(
('modify_part_collision', 'collide', True),
('modify_part_collision', 'physical', True)
))
self.mat = bs.Material()
self.mat.add_actions(
actions=(('modify_part_collision', 'physical', False),
('modify_part_collision', 'collide', False))
)
def create_ramp(self, loc, z_marg):
# try:
# _babase.prop_axis(0, 0, 0)
# except:
# pass
shared = SharedObjects.get()
self._real_wall_material = bs.Material()
self._real_wall_material.add_actions(
actions=(
('modify_part_collision', 'collide', True),
('modify_part_collision', 'physical', True)
))
self.mat = bs.Material()
self.mat.add_actions(
actions=(('modify_part_collision', 'physical', False),
('modify_part_collision', 'collide', False))
)
spaz_collide_mat = bs.Material()
# spaz_collide_mat.add_actions(
# conditions=('they_have_material',shared.player_material),
# actions=(
# ('modify_part_collision', 'collide', True),
# ( 'call','at_connect',babase.Call(self._handle_player_pad_collide,real )),
# ),
# )
pos = (-5.3 + loc, 0.7, 1.1+z_marg)
self.ud_1_r = bs.newnode('region', attrs={'position': pos, 'scale': (
2, 1, 2), 'type': 'box', 'materials': [shared.footing_material, spaz_collide_mat]})
self.node = bs.newnode('prop',
owner=self.ud_1_r,
attrs={
'mesh': bs.getmesh('bridgitLevelTop'),
'light_mesh': bs.getmesh('powerupSimple'),
'position': (2, 7, 2),
'body': 'puck',
'shadow_size': 0.0,
'velocity': (0, 0, 0),
'color_texture': bs.gettexture('bridgitLevelColor'),
'mesh_scale': 0.72,
'reflection_scale': [1.5],
'materials': [self.mat, shared.object_material, shared.footing_material],
'density': 9000000000
})
self.node.changerotation(0, 0, 0)
mnode = bs.newnode('math',
owner=self.ud_1_r,
attrs={
'input1': (0, -2.9, 0),
'operation': 'add'
})
self.ud_1_r.connectattr('position', mnode, 'input2')
mnode.connectattr('output', self.node, 'position')
# /// region to stand long bar ===============
pos = (-9.67+loc, 0.1, 0+z_marg)
self.left_region = bs.newnode('region', attrs={'position': pos, 'scale': (2.4, 0.7, 3.2), 'type': 'box', 'materials': [
shared.footing_material, self._real_wall_material, spaz_collide_mat]})
pos = (-5.67+loc, 0.1, 0+z_marg)
self.center_region = bs.newnode('region', attrs={'position': pos, 'scale': (
8, 0.7, 1), 'type': 'box', 'materials': [shared.footing_material, self._real_wall_material, spaz_collide_mat]})
pos = (-1.3+loc, 0.1, 0+z_marg)
self.right_region = bs.newnode('region', attrs={'position': pos, 'scale': (2.4, 0.7, 3.2), 'type': 'box', 'materials': [
shared.footing_material, self._real_wall_material, spaz_collide_mat]})
def _handle_player_collide(self):
try:
player = bs.getcollision().opposingnode.getdelegate(
PlayerSpaz, True)
except bs.NotFoundError:
return
if player.is_alive():
player.shatter(True)
bs._map.register_map(BridgitMash)

View file

@ -1,9 +1,8 @@
# Porting to api 8 made easier by baport.(https://github.com/bombsquad-community/baport)
# Released under the MIT License. See LICENSE for details.
#
"""DeathMatch game and support classes."""
"""Cannon Fight game and support classes."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations
@ -24,9 +23,6 @@ if TYPE_CHECKING:
from typing import Any, Union, Sequence, Optional
# ba_meta export bascenev1.GameActivity
class CanonFightGame(DeathMatchGame):
"""A game type based on acquiring kills."""
@ -39,7 +35,7 @@ class CanonFightGame(DeathMatchGame):
@classmethod
def get_available_settings(
cls, sessiontype: type[bs.Session]) -> list[babase.Setting]:
cls, sessiontype: type[bs.Session]) -> list[bs.Setting]:
settings = [
bs.IntSetting(
'Kills to Win Per Player',
@ -111,7 +107,7 @@ class CanonFightGame(DeathMatchGame):
bs.MusicType.TO_THE_DEATH)
self.wtindex=0
self.wttimer = bs.timer(5, babase.Call(self.wt_), repeat=True)
self.wttimer = bs.timer(5, babase.CallStrict(self.wt_), repeat=True)
self.wthighlights=["Created by Mr.Smoothy","hey smoothy youtube","smoothy#multiverse"]
def wt_(self):
@ -155,10 +151,6 @@ class CanonFightGame(DeathMatchGame):
def handlemessage(self, msg: Any) -> Any:
if isinstance(msg, bs.PlayerDiedMessage):
# Augment standard behavior.
super().handlemessage(msg)
player = msg.getplayer(Player)
self.respawn_player(player)
@ -264,7 +256,7 @@ class CanonFightGame(DeathMatchGame):
self.fake_explosion( (-5.708631629943848, 7.437141418457031, -4.525400638580322))
Bomb(position=(-6,7.5,-4),bomb_type=type,owner=owner,source_player=source_player,velocity=(19,y,z)).autoretain()
bs.timer(0.6,babase.Call(self.launch_bomb_byA,owner,type,source_player,count-1))
bs.timer(0.6,babase.CallPartial(self.launch_bomb_byA,owner,type,source_player,count-1))
else:
return
def launch_bomb_byB(self,owner,type,source_player,count):
@ -274,7 +266,7 @@ class CanonFightGame(DeathMatchGame):
self.fake_explosion( (5.708631629943848, 7.437141418457031, -4.525400638580322))
Bomb(position=(6,7.5,-4),bomb_type=type,owner=owner,source_player=source_player,velocity=(-19,y,z)).autoretain()
bs.timer(0.6,babase.Call(self.launch_bomb_byB,owner,type,source_player,count-1))
bs.timer(0.6,babase.CallPartial(self.launch_bomb_byB,owner,type,source_player,count-1))
else:
return
@ -306,7 +298,7 @@ class CanonFightGame(DeathMatchGame):
actions=(
('modify_part_collision', 'collide', True),
('modify_part_collision', 'physical', True),
('call','at_connect',babase.Call(self._handle_canon_load_A))
('call','at_connect',babase.CallStrict(self._handle_canon_load_A))
),
)
self.ud_1_r=bs.newnode('region',attrs={'position': (-8.908631629943848, 7.337141418457031, -4.525400638580322),'scale': (2,1,1),'type': 'box','materials': [canon_load_mat ]})
@ -368,7 +360,7 @@ class CanonFightGame(DeathMatchGame):
actions=(
('modify_part_collision', 'collide', True),
('modify_part_collision', 'physical', True),
('call','at_connect',babase.Call(self._handle_canon_load_B))
('call','at_connect',babase.CallStrict(self._handle_canon_load_B))
),
)
self.ud_1_r2=bs.newnode('region',attrs={'position': (8.908631629943848+0.81, 7.327141418457031, -4.525400638580322),'scale': (2,1,1),'type': 'box','materials': [canon_load_mat ]})

View file

@ -1,4 +1,4 @@
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
'''
@ -128,7 +128,7 @@ class CollectorGame(bs.TeamGameActivity[Player, Team]):
@classmethod
def get_available_settings(
cls, sessiontype: type[bs.Session]
) -> list[babase.Setting]:
) -> list[bs.Setting]:
settings = [
bs.IntSetting(
capsules_to_win,
@ -223,12 +223,12 @@ class CollectorGame(bs.TeamGameActivity[Player, Team]):
(
'call',
'at_connect',
babase.Call(self._handle_player_flag_region_collide, True),
babase.CallPartial(self._handle_player_flag_region_collide, True),
),
(
'call',
'at_disconnect',
babase.Call(self._handle_player_flag_region_collide, False),
babase.CallPartial(self._handle_player_flag_region_collide, False),
),
),
)

View file

@ -1,4 +1,4 @@
# ba_meta require api 8
# ba_meta require api 9
"""
DemolitionWar - BombFight on wooden floor flying in air.
Author: Mr.Smoothy
@ -25,10 +25,8 @@ if TYPE_CHECKING:
# ba_meta export bascenev1.GameActivity
class DemolitionWar(EliminationGame):
name = 'DemolitionWar'
name = 'Demolition War'
description = 'Last remaining alive wins.'
scoreconfig = bs.ScoreConfig(
label='Survived', scoretype=bs.ScoreType.SECONDS, none_is_winner=True
@ -41,7 +39,7 @@ class DemolitionWar(EliminationGame):
@classmethod
def get_available_settings(
cls, sessiontype: type[bs.Session]
) -> list[babase.Setting]:
) -> list[bs.Setting]:
settings = [
bs.IntSetting(
'Lives Per Player',
@ -124,7 +122,7 @@ class DemolitionWar(EliminationGame):
node = bs.getcollision().sourcenode
bs.emitfx((node.position[0], 0.9, node.position[2]),
(0, 2, 0), 30, 1, spread=1, chunk_type='splinter')
bs.timer(0.1, babase.Call(node.delete))
bs.timer(0.1, babase.CallStrict(node.delete))
def map_extend(self):
# TODO need to improve here , so we can increase size of map easily with settings
@ -137,7 +135,7 @@ class DemolitionWar(EliminationGame):
actions=(
('modify_part_collision', 'collide', True),
('modify_part_collision', 'physical', True),
('call', 'at_connect', babase.Call(self.on_blast))
('call', 'at_connect', babase.CallStrict(self.on_blast))
))
self.ramps = []
for i in p:
@ -309,6 +307,6 @@ class WoodenFloor(
try:
bs._map.register_map(WoodenFloor)
bs.register_map(WoodenFloor)
except:
pass

View file

@ -6,7 +6,7 @@
# Feel free to edit.
# ba_meta require api 8
# ba_meta require api 9
from __future__ import annotations
from enum import Enum
@ -57,7 +57,7 @@ class Ball(bs.Actor):
def __init__(self,
position: Sequence[float],
velocity: Sequence[float],
texture: babase.Texture,
texture: bs.Texture,
body_scale: float = 1.0,
gravity_scale: float = 1.0,
) -> NoReturn:
@ -99,7 +99,7 @@ class Ball(bs.Actor):
)
# die the ball manually incase the ball doesn't fall the outside of the map
bs.timer(2.5, bs.WeakCall(self.handlemessage, bs.DieMessage()))
bs.timer(2.5, bs.WeakCallPartial(self.handlemessage, bs.DieMessage()))
# i am not handling anything in this ball Class(except for diemessage).
# all game things and logics going to be in the box class
@ -213,7 +213,7 @@ class Box(bs.Actor):
self.force_shoot_speed: float = 0.0
self.ball_mag = 3000
self.ball_gravity: float = 1.0
self.ball_tex: babase.Texture | None = None
self.ball_tex: bs.Texture | None = None
# only for Hard ball_type
self.player_facing_direction: list[float, float] = [0.0, 0.0]
# ball shoot soound.
@ -384,7 +384,7 @@ class Box(bs.Actor):
# And a circle outline with ugly animation.
circle_outline = bs.newnode(
"locator",
owner=player.actor.node,
owner=player.node,
attrs={
'shape': 'circleOutline',
'color': (1.0, 0.0, 0.0),
@ -409,8 +409,8 @@ class Box(bs.Actor):
)
# coonect it and...
player.actor.node.connectattr("position", light, "position")
player.actor.node.connectattr("position", circle_outline, "position")
player.node.connectattr("position", light, "position")
player.node.connectattr("position", circle_outline, "position")
# immediately delete the node after another player has been targeted.
self.shoot_speed = 0.5 if self.shoot_speed == 0.0 else self.shoot_speed
@ -424,8 +424,11 @@ class Box(bs.Actor):
# and i got it how analog stick values are works.
# just need to store analog stick facing direction and need some calculation according how far player pushed analog stick.
# Notice that how vertical direction is inverted, so we need to put a minus infront of veriable.(so ball isn't shoot at wrong direction).
self.player_facing_direction[0] = player.actor.node.move_left_right
self.player_facing_direction[1] = -player.actor.node.move_up_down
try:
self.player_facing_direction[0] = player.node.move_left_right
self.player_facing_direction[1] = -player.node.move_up_down
except:
pass
# if player is too close and the player pushing his analog stick fully the ball shoot's too far away to player.
# so, we need to reduce the value of "self.player_facing_direction" to fix this problem.
@ -485,8 +488,6 @@ class Team(bs.Team[Player]):
# and main thing don't allow player to camp inside of box are going in this class.
# ba_meta export bascenev1.GameActivity
class DodgeTheBall(bs.TeamGameActivity[Player, Team]):
# defining name, description and settings..
name = 'Dodge the ball'

View file

@ -1,5 +1,4 @@
# Ported to api 8 by brostos using baport.(https://github.com/bombsquad-community/baport)
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations
@ -11,7 +10,6 @@ import bauiv1 as bui
import bascenev1 as bs
import _babase
import random
from bascenev1._map import register_map
from bascenev1lib.actor.spaz import PickupMessage
from bascenev1lib.actor.playerspaz import PlayerSpaz
from bascenev1lib.actor.spazfactory import SpazFactory
@ -59,74 +57,6 @@ else:
hint_use_punch = 'You can punch your enemies now!'
class AbyssMap(bs.Map):
from bascenev1lib.mapdata import happy_thoughts as defs
# Add the y-dimension space for players
defs.boxes['map_bounds'] = (-0.8748348681, 9.212941713, -9.729538885) \
+ (0.0, 0.0, 0.0) \
+ (36.09666006, 26.19950145, 20.89541168)
name = 'Abyss Unhappy'
@classmethod
def get_play_types(cls) -> list[str]:
"""Return valid play types for this map."""
return ['abyss']
@classmethod
def get_preview_texture_name(cls) -> str:
return 'alwaysLandPreview'
@classmethod
def on_preload(cls) -> Any:
data: dict[str, Any] = {
'mesh': bs.getmesh('alwaysLandLevel'),
'bottom_mesh': bs.getmesh('alwaysLandLevelBottom'),
'bgmesh': bs.getmesh('alwaysLandBG'),
'collision_mesh': bs.getcollisionmesh('alwaysLandLevelCollide'),
'tex': bs.gettexture('alwaysLandLevelColor'),
'bgtex': bs.gettexture('alwaysLandBGColor'),
'vr_fill_mound_mesh': bs.getmesh('alwaysLandVRFillMound'),
'vr_fill_mound_tex': bs.gettexture('vrFillMound')
}
return data
@classmethod
def get_music_type(cls) -> bs.MusicType:
return bs.MusicType.FLYING
def __init__(self) -> None:
super().__init__(vr_overlay_offset=(0, -3.7, 2.5))
self.background = bs.newnode(
'terrain',
attrs={
'mesh': self.preloaddata['bgmesh'],
'lighting': False,
'background': True,
'color_texture': self.preloaddata['bgtex']
})
bs.newnode('terrain',
attrs={
'mesh': self.preloaddata['vr_fill_mound_mesh'],
'lighting': False,
'vr_only': True,
'color': (0.2, 0.25, 0.2),
'background': True,
'color_texture': self.preloaddata['vr_fill_mound_tex']
})
gnode = bs.getactivity().globalsnode
gnode.happy_thoughts_mode = True
gnode.shadow_offset = (0.0, 8.0, 5.0)
gnode.tint = (1.3, 1.23, 1.0)
gnode.ambient_color = (1.3, 1.23, 1.0)
gnode.vignette_outer = (0.64, 0.59, 0.69)
gnode.vignette_inner = (0.95, 0.95, 0.93)
gnode.vr_near_clip = 1.0
self.is_flying = True
register_map(AbyssMap)
class SpazTouchFoothold:
pass
@ -491,7 +421,7 @@ class AbyssGame(bs.TeamGameActivity[Player, Team]):
@classmethod
def get_available_settings(
cls, sessiontype: type[bs.Session]) -> list[babase.Setting]:
cls, sessiontype: type[bs.Session]) -> list[bs.Setting]:
settings = [
bs.FloatChoiceSetting(
peaceTime,

75
dist/ba_root/mods/maps/abyss.py vendored Normal file
View file

@ -0,0 +1,75 @@
from typing import TYPE_CHECKING
import bascenev1 as bs
from bascenev1._map import register_map
if TYPE_CHECKING:
from typing import Any
class AbyssMap(bs.Map):
from bascenev1lib.mapdata import happy_thoughts as defs
# Add the y-dimension space for players
defs.boxes['map_bounds'] = (-0.8748348681, 9.212941713, -9.729538885) \
+ (0.0, 0.0, 0.0) \
+ (36.09666006, 26.19950145, 20.89541168)
name = 'Abyss Unhappy'
@classmethod
def get_play_types(cls) -> list[str]:
"""Return valid play types for this map."""
return ['abyss']
@classmethod
def get_preview_texture_name(cls) -> str:
return 'alwaysLandPreview'
@classmethod
def on_preload(cls) -> Any:
data: dict[str, Any] = {
'mesh': bs.getmesh('alwaysLandLevel'),
'bottom_mesh': bs.getmesh('alwaysLandLevelBottom'),
'bgmesh': bs.getmesh('alwaysLandBG'),
'collision_mesh': bs.getcollisionmesh('alwaysLandLevelCollide'),
'tex': bs.gettexture('alwaysLandLevelColor'),
'bgtex': bs.gettexture('alwaysLandBGColor'),
'vr_fill_mound_mesh': bs.getmesh('alwaysLandVRFillMound'),
'vr_fill_mound_tex': bs.gettexture('vrFillMound')
}
return data
@classmethod
def get_music_type(cls) -> bs.MusicType:
return bs.MusicType.FLYING
def __init__(self) -> None:
super().__init__(vr_overlay_offset=(0, -3.7, 2.5))
self.background = bs.newnode(
'terrain',
attrs={
'mesh': self.preloaddata['bgmesh'],
'lighting': False,
'background': True,
'color_texture': self.preloaddata['bgtex']
})
bs.newnode('terrain',
attrs={
'mesh': self.preloaddata['vr_fill_mound_mesh'],
'lighting': False,
'vr_only': True,
'color': (0.2, 0.25, 0.2),
'background': True,
'color_texture': self.preloaddata['vr_fill_mound_tex']
})
gnode = bs.getactivity().globalsnode
gnode.happy_thoughts_mode = True
gnode.shadow_offset = (0.0, 8.0, 5.0)
gnode.tint = (1.3, 1.23, 1.0)
gnode.ambient_color = (1.3, 1.23, 1.0)
gnode.vignette_outer = (0.64, 0.59, 0.69)
gnode.vignette_inner = (0.95, 0.95, 0.93)
gnode.vr_near_clip = 1.0
self.is_flying = True
register_map(AbyssMap)

View file

@ -3,13 +3,12 @@ from __future__ import annotations
from typing import TYPE_CHECKING
import babase
import bauiv1 as bui
import bascenev1 as bs
from bascenev1lib.gameutils import SharedObjects
from bascenev1lib.actor.playerspaz import PlayerSpaz
import random
if TYPE_CHECKING:
from typing import Any, List, Dict
from typing import Any
class mapdefs:
@ -131,7 +130,6 @@ class BridgitMash(bs.Map):
self.create_ramp(0, 3.0)
self.create_ramp(10.9, 3.2)
self.ground()
# _babase.prop_axis(1, 0, 0)
def ground(self):
shared = SharedObjects.get()
@ -151,10 +149,6 @@ class BridgitMash(bs.Map):
)
def create_ramp(self, loc, z_marg):
# try:
# _babase.prop_axis(0, 0, 0)
# except:
# pass
shared = SharedObjects.get()
self._real_wall_material = bs.Material()
@ -172,13 +166,6 @@ class BridgitMash(bs.Map):
('modify_part_collision', 'collide', False))
)
spaz_collide_mat = bs.Material()
# spaz_collide_mat.add_actions(
# conditions=('they_have_material',shared.player_material),
# actions=(
# ('modify_part_collision', 'collide', True),
# ( 'call','at_connect',babase.Call(self._handle_player_pad_collide,real )),
# ),
# )
pos = (-5.3 + loc, 0.7, 1.1+z_marg)
self.ud_1_r = bs.newnode('region', attrs={'position': pos, 'scale': (
2, 1, 2), 'type': 'box', 'materials': [shared.footing_material, spaz_collide_mat]})
@ -233,4 +220,4 @@ class BridgitMash(bs.Map):
player.shatter(True)
bs._map.register_map(BridgitMash)
bs.register_map(BridgitMash)

View file

@ -6,7 +6,7 @@ tests since they are widely used in live client and server code.
license : MIT, see LICENSE for more details.
"""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations
@ -19,6 +19,6 @@ if TYPE_CHECKING:
pass
# ba_meta export plugin
# ba_meta export babase.Plugin
class Init(babase.Plugin): # pylint: disable=too-few-public-methods
"""Initializes all of the plugins in the directory."""

View file

@ -1,4 +1,4 @@
# ba_meta require api 8
# ba_meta require api 9
# AutoStunt mod by - Mr.Smoothy x Rikko
# https://discord.gg/ucyaesh
# https://bombsquad.ga
@ -553,7 +553,7 @@ def on_begin(self, *args, **kwargs) -> None:
return original_on_begin(self, *args, **kwargs)
# ba_meta export plugin
# ba_meta export babase.Plugin
class byHeySmoothy(babase.Plugin):
def on_app_running(self):
try:

View file

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# coding: utf-8
# ba_meta require api 8
# ba_meta require api 9
# from gunicorn.app.base import BaseApplication
# from gunicorn.workers import ggevent as gevent_worker

View file

@ -33,9 +33,9 @@ class BsDataThread(object):
)["ballistica_web"]["discord_link"]
stats["vapidKey"] = notification_manager.get_vapid_keys()["public_key"]
self.refresh_stats_cache_timer = bs.AppTimer(8, babase.Call(
self.refresh_stats_cache_timer = bs.AppTimer(8, babase.CallStrict(
self.refreshStats), repeat=True)
self.refresh_leaderboard_cache_timer = bs.AppTimer(10, babase.Call(
self.refresh_leaderboard_cache_timer = bs.AppTimer(10, babase.CallStrict(
self.refreshLeaderboard), repeat=True)
def startThread(self):
@ -111,14 +111,14 @@ 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)
return data
v = bs.AppTimer(8, babase.Call(
v = bs.AppTimer(8, babase.CallStrict(
BsDataThread))
@ -282,10 +282,10 @@ def update_server_config(config):
def do_action(action, value):
if action == "message":
_babase.pushcall(babase.Call(bs.chatmessage, value),
_babase.pushcall(babase.CallPartial(bs.chatmessage, value),
from_other_thread=True)
elif action == "quit":
_babase.pushcall(babase.Call(_babase.quit), from_other_thread=True)
_babase.pushcall(babase.CallStrict(_babase.quit), from_other_thread=True)
def subscribe_player(sub, account_id, name):

View file

@ -1,6 +1,6 @@
"""Define a simple example plugin."""
# ba_meta require api 8
# ba_meta require api 9
from __future__ import annotations

View file

@ -1,4 +1,4 @@
# ba_meta require api 8
# ba_meta require api 9
from __future__ import annotations
import setting
from bascenev1lib.actor.bomb import BombFactory

View file

@ -1,6 +1,6 @@
"""Module to update `setting.json`."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View file

@ -4,7 +4,7 @@
"""
# ba_meta require api 8
# ba_meta require api 9
from __future__ import annotations

View file

@ -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

View file

@ -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))

View file

@ -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)

View file

@ -26,6 +26,19 @@
"avg_score": 0.0,
"last_seen": "2026-07-15 08:46:34.946691",
"aid": "a-1828"
},
"pb-IF5cVXEyAA==": {
"rank": 3,
"name": "Vishyyy",
"scores": 93,
"total_damage": 0.0,
"kills": 0,
"deaths": 1,
"games": 4,
"kd": 0.0,
"avg_score": 23.25,
"last_seen": "2026-07-16 16:21:28.671836",
"aid": "pb-IF5cVXEyAA=="
}
}
}

View file

@ -26,6 +26,19 @@
"avg_score": 0.0,
"last_seen": "2026-07-15 08:46:34.946691",
"aid": "a-1828"
},
"pb-IF5cVXEyAA==": {
"rank": 3,
"name": "Vishyyy",
"scores": 93,
"total_damage": 0.0,
"kills": 0,
"deaths": 1,
"games": 4,
"kd": 0.0,
"avg_score": 23.25,
"last_seen": "2026-07-16 16:21:28.671836",
"aid": "pb-IF5cVXEyAA=="
}
}
}

View file

@ -17,7 +17,6 @@ import _babase
import _bascenev1
import babase
import bascenev1 as bs
from babase._general import Call
from features import profanity
from playersdata import pdata
@ -64,7 +63,7 @@ class ServerCheck:
self.ip_client_map: Dict[str, List[int]] = {}
self.device_client_map: Dict[str, List[int]] = {}
self.ip_join: Dict[str, IPJoin] = {}
self.timer = bs.AppTimer(1, babase.Call(self.check), repeat=True)
self.timer = bs.AppTimer(1, babase.CallStrict(self.check), repeat=True)
def check(self) -> None:
"""
@ -566,7 +565,7 @@ class LoadProfile(threading.Thread):
def run(self) -> None:
player_data = pdata.get_info(self.pbid)
_babase.pushcall(
Call(_on_profile_loaded, self.pbid, player_data, self.ip, self.device_id, self.client_id, self.display_string),
babase.CallPartial(_on_profile_loaded, self.pbid, player_data, self.ip, self.device_id, self.client_id, self.display_string),
from_other_thread=True,
)
@ -585,7 +584,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),
babase.CallPartial(self.callback, data, pb_id, display_string),
from_other_thread=True,
)
@ -698,12 +697,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", [
babase.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)
babase.CallPartial(bs.disconnect_client, client_id, 2), from_other_thread=True)
# Instantiate the server check