mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-11-07 17:36:15 +00:00
syncing ballistica 1.7.50
This commit is contained in:
parent
dd4dfed507
commit
3047591b10
187 changed files with 9472 additions and 4302 deletions
105
dist/ba_data/python/bacommon/bs.py
vendored
105
dist/ba_data/python/bacommon/bs.py
vendored
|
|
@ -1,5 +1,6 @@
|
|||
# Released under the MIT License. See LICENSE for details.
|
||||
#
|
||||
# pylint: disable=too-many-lines
|
||||
"""BombSquad specific bits."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
|
@ -20,6 +21,31 @@ TOKENS3_COUNT = 1200
|
|||
TOKENS4_COUNT = 2600
|
||||
|
||||
|
||||
@ioprepped
|
||||
@dataclass
|
||||
class LegacyRequest(Message):
|
||||
"""A generic request for the legacy master server."""
|
||||
|
||||
request: Annotated[str, IOAttrs('r')]
|
||||
request_type: Annotated[str, IOAttrs('t')]
|
||||
user_agent_string: Annotated[str, IOAttrs('u')]
|
||||
data: Annotated[str, IOAttrs('d')]
|
||||
|
||||
@override
|
||||
@classmethod
|
||||
def get_response_types(cls) -> list[type[Response] | None]:
|
||||
return [LegacyResponse]
|
||||
|
||||
|
||||
@ioprepped
|
||||
@dataclass
|
||||
class LegacyResponse(Response):
|
||||
"""Response for generic legacy request."""
|
||||
|
||||
data: Annotated[str | None, IOAttrs('d')]
|
||||
zipped: Annotated[bool, IOAttrs('z')]
|
||||
|
||||
|
||||
@ioprepped
|
||||
@dataclass
|
||||
class PrivatePartyMessage(Message):
|
||||
|
|
@ -44,6 +70,25 @@ class PrivatePartyResponse(Response):
|
|||
datacode: Annotated[str | None, IOAttrs('d')]
|
||||
|
||||
|
||||
@ioprepped
|
||||
@dataclass
|
||||
class GetClassicPurchasesMessage(Message):
|
||||
"""Asking for current account's classic purchases."""
|
||||
|
||||
@override
|
||||
@classmethod
|
||||
def get_response_types(cls) -> list[type[Response] | None]:
|
||||
return [GetClassicPurchasesResponse]
|
||||
|
||||
|
||||
@ioprepped
|
||||
@dataclass
|
||||
class GetClassicPurchasesResponse(Response):
|
||||
"""Here's those classic purchases ya asked for boss."""
|
||||
|
||||
purchases: Annotated[set[str], IOAttrs('p')]
|
||||
|
||||
|
||||
class ClassicChestAppearance(Enum):
|
||||
"""Appearances bombsquad classic chests can have."""
|
||||
|
||||
|
|
@ -108,6 +153,11 @@ class ClassicAccountLiveData:
|
|||
GOLD = 'g'
|
||||
DIAMOND = 'd'
|
||||
|
||||
class Flag(Enum):
|
||||
"""Flags set for our account."""
|
||||
|
||||
ASK_FOR_REVIEW = 'r'
|
||||
|
||||
tickets: Annotated[int, IOAttrs('ti')]
|
||||
|
||||
tokens: Annotated[int, IOAttrs('to')]
|
||||
|
|
@ -131,6 +181,11 @@ class ClassicAccountLiveData:
|
|||
|
||||
chests: Annotated[dict[str, Chest], IOAttrs('c')]
|
||||
|
||||
# State id of our purchases for builds 22459+.
|
||||
purchases_state: Annotated[str | None, IOAttrs('p')]
|
||||
|
||||
flags: Annotated[set[Flag], IOAttrs('f', soft_default_factory=set)]
|
||||
|
||||
|
||||
class DisplayItemTypeID(Enum):
|
||||
"""Type ID for each of our subclasses."""
|
||||
|
|
@ -738,7 +793,7 @@ class ClientEffectScreenMessage(ClientEffect):
|
|||
"""Display a screen-message."""
|
||||
|
||||
message: Annotated[str, IOAttrs('m')]
|
||||
subs: Annotated[list[str], IOAttrs('s')]
|
||||
subs: Annotated[list[str], IOAttrs('s')] = field(default_factory=list)
|
||||
color: Annotated[tuple[float, float, float], IOAttrs('c')] = (1.0, 1.0, 1.0)
|
||||
|
||||
@override
|
||||
|
|
@ -957,3 +1012,51 @@ class ChestActionResponse(Response):
|
|||
effects: Annotated[
|
||||
list[ClientEffect], IOAttrs('fx', store_default=False)
|
||||
] = field(default_factory=list)
|
||||
|
||||
|
||||
@ioprepped
|
||||
@dataclass
|
||||
class GlobalProfileCheckMessage(Message):
|
||||
"""Is this global profile name available?"""
|
||||
|
||||
name: Annotated[str, IOAttrs('n')]
|
||||
|
||||
@override
|
||||
@classmethod
|
||||
def get_response_types(cls) -> list[type[Response] | None]:
|
||||
return [GlobalProfileCheckResponse]
|
||||
|
||||
|
||||
@ioprepped
|
||||
@dataclass
|
||||
class GlobalProfileCheckResponse(Response):
|
||||
"""Here's that profile check ya asked for boss."""
|
||||
|
||||
available: Annotated[bool, IOAttrs('a')]
|
||||
ticket_cost: Annotated[int, IOAttrs('tc')]
|
||||
|
||||
|
||||
@ioprepped
|
||||
@dataclass
|
||||
class SendInfoMessage(Message):
|
||||
"""User is using the send-info function."""
|
||||
|
||||
description: Annotated[str, IOAttrs('c')]
|
||||
|
||||
@override
|
||||
@classmethod
|
||||
def get_response_types(cls) -> list[type[Response] | None]:
|
||||
return [SendInfoResponse]
|
||||
|
||||
|
||||
@ioprepped
|
||||
@dataclass
|
||||
class SendInfoResponse(Response):
|
||||
"""Response to sending info to the server."""
|
||||
|
||||
handled: Annotated[bool, IOAttrs('v')]
|
||||
message: Annotated[str | None, IOAttrs('m', store_default=False)] = None
|
||||
effects: Annotated[
|
||||
list[ClientEffect], IOAttrs('e', store_default=False)
|
||||
] = field(default_factory=list)
|
||||
legacy_code: Annotated[str | None, IOAttrs('l', store_default=False)] = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue