mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-11-07 17:36:15 +00:00
updated bacommon
This commit is contained in:
parent
162b04b6b5
commit
a5321fd1a0
9 changed files with 48 additions and 26 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
dist/ba_data/python/bacommon/__pycache__/net.cpython-38.pyc
vendored
Normal file
BIN
dist/ba_data/python/bacommon/__pycache__/net.cpython-38.pyc
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
30
dist/ba_data/python/bacommon/assets.py
vendored
30
dist/ba_data/python/bacommon/assets.py
vendored
|
|
@ -4,10 +4,13 @@
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import TYPE_CHECKING
|
from dataclasses import dataclass, field
|
||||||
|
from typing import TYPE_CHECKING, Dict, Optional, List
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
from efro import entity
|
from typing_extensions import Annotated
|
||||||
|
|
||||||
|
from efro.dataclassio import ioprepped, IOAttrs
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
pass
|
pass
|
||||||
|
|
@ -33,26 +36,27 @@ class AssetType(Enum):
|
||||||
COLLISION_MESH = 'collision_mesh'
|
COLLISION_MESH = 'collision_mesh'
|
||||||
|
|
||||||
|
|
||||||
class AssetPackageFlavorManifestValue(entity.CompoundValue):
|
@ioprepped
|
||||||
|
@dataclass
|
||||||
|
class AssetPackageFlavorManifest:
|
||||||
"""A manifest of asset info for a specific flavor of an asset package."""
|
"""A manifest of asset info for a specific flavor of an asset package."""
|
||||||
assetfiles = entity.DictField('assetfiles', str, entity.StringValue())
|
assetfiles: Annotated[Dict[str, str],
|
||||||
|
IOAttrs('assetfiles')] = field(default_factory=dict)
|
||||||
|
|
||||||
|
|
||||||
class AssetPackageFlavorManifest(entity.EntityMixin,
|
@ioprepped
|
||||||
AssetPackageFlavorManifestValue):
|
@dataclass
|
||||||
"""A self contained AssetPackageFlavorManifestValue."""
|
class AssetPackageBuildState:
|
||||||
|
|
||||||
|
|
||||||
class AssetPackageBuildState(entity.Entity):
|
|
||||||
"""Contains info about an in-progress asset cloud build."""
|
"""Contains info about an in-progress asset cloud build."""
|
||||||
|
|
||||||
# Asset names still being built.
|
# Asset names still being built.
|
||||||
in_progress_builds = entity.ListField('b', entity.StringValue())
|
in_progress_builds: Annotated[List[str],
|
||||||
|
IOAttrs('b')] = field(default_factory=list)
|
||||||
|
|
||||||
# The initial number of assets needing to be built.
|
# The initial number of assets needing to be built.
|
||||||
initial_build_count = entity.Field('c', entity.IntValue())
|
initial_build_count: Annotated[int, IOAttrs('c')] = 0
|
||||||
|
|
||||||
# Build error string. If this is present, it should be presented
|
# Build error string. If this is present, it should be presented
|
||||||
# to the user and they should required to explicitly restart the build
|
# to the user and they should required to explicitly restart the build
|
||||||
# in some way if desired.
|
# in some way if desired.
|
||||||
error = entity.Field('e', entity.OptionalStringValue())
|
error: Annotated[Optional[str], IOAttrs('e')] = None
|
||||||
|
|
|
||||||
32
dist/ba_data/python/bacommon/net.py
vendored
32
dist/ba_data/python/bacommon/net.py
vendored
|
|
@ -5,32 +5,37 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import TYPE_CHECKING, Optional, List, Dict, Any, Tuple
|
from typing import TYPE_CHECKING, Optional, List, Dict, Any, Tuple
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass, field
|
||||||
|
|
||||||
from efro import entity
|
from typing_extensions import Annotated
|
||||||
from efro.dataclassio import ioprepped
|
|
||||||
|
from efro.dataclassio import ioprepped, IOAttrs
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class ServerNodeEntry(entity.CompoundValue):
|
@ioprepped
|
||||||
|
@dataclass
|
||||||
|
class ServerNodeEntry:
|
||||||
"""Information about a specific server."""
|
"""Information about a specific server."""
|
||||||
region = entity.Field('r', entity.StringValue())
|
region: Annotated[str, IOAttrs('r')]
|
||||||
address = entity.Field('a', entity.StringValue())
|
address: Annotated[str, IOAttrs('a')]
|
||||||
port = entity.Field('p', entity.IntValue())
|
port: Annotated[int, IOAttrs('p')]
|
||||||
|
|
||||||
|
|
||||||
class ServerNodeQueryResponse(entity.Entity):
|
@ioprepped
|
||||||
|
@dataclass
|
||||||
|
class ServerNodeQueryResponse:
|
||||||
"""A response to a query about server-nodes."""
|
"""A response to a query about server-nodes."""
|
||||||
|
|
||||||
# If present, something went wrong, and this describes it.
|
# If present, something went wrong, and this describes it.
|
||||||
error = entity.Field('e', entity.OptionalStringValue(store_default=False))
|
error: Annotated[Optional[str], IOAttrs('e', store_default=False)] = None
|
||||||
|
|
||||||
# The set of servernodes.
|
# The set of servernodes.
|
||||||
servers = entity.CompoundListField('s',
|
servers: Annotated[List[ServerNodeEntry],
|
||||||
ServerNodeEntry(),
|
IOAttrs('s', store_default=False)] = field(
|
||||||
store_default=False)
|
default_factory=list)
|
||||||
|
|
||||||
|
|
||||||
@ioprepped
|
@ioprepped
|
||||||
|
|
@ -56,6 +61,9 @@ class PrivateHostingConfig:
|
||||||
custom_team_colors: Optional[Tuple[Tuple[float, float, float],
|
custom_team_colors: Optional[Tuple[Tuple[float, float, float],
|
||||||
Tuple[float, float, float]]] = None
|
Tuple[float, float, float]]] = None
|
||||||
playlist: Optional[List[Dict[str, Any]]] = None
|
playlist: Optional[List[Dict[str, Any]]] = None
|
||||||
|
exit_minutes: float = 120.0
|
||||||
|
exit_minutes_unclean: float = 180.0
|
||||||
|
exit_minutes_idle: float = 10.0
|
||||||
|
|
||||||
|
|
||||||
@ioprepped
|
@ioprepped
|
||||||
|
|
|
||||||
12
dist/ba_data/python/bacommon/servermanager.py
vendored
12
dist/ba_data/python/bacommon/servermanager.py
vendored
|
|
@ -51,10 +51,11 @@ class ServerConfig:
|
||||||
# exposed but I'll try to add that soon.
|
# exposed but I'll try to add that soon.
|
||||||
max_party_size: int = 6
|
max_party_size: int = 6
|
||||||
|
|
||||||
# Options here are 'ffa' (free-for-all) and 'teams'
|
# Options here are 'ffa' (free-for-all), 'teams' and 'coop' (cooperative)
|
||||||
# This value is ignored if you supply a playlist_code (see below).
|
# This value is ignored if you supply a playlist_code (see below).
|
||||||
session_type: str = 'ffa'
|
session_type: str = 'ffa'
|
||||||
|
|
||||||
|
# Playlist-code for teams or free-for-all mode sessions.
|
||||||
# To host your own custom playlists, use the 'share' functionality in the
|
# To host your own custom playlists, use the 'share' functionality in the
|
||||||
# playlist editor in the regular version of the game.
|
# playlist editor in the regular version of the game.
|
||||||
# This will give you a numeric code you can enter here to host that
|
# This will give you a numeric code you can enter here to host that
|
||||||
|
|
@ -72,6 +73,15 @@ class ServerConfig:
|
||||||
# (teams mode only).
|
# (teams mode only).
|
||||||
auto_balance_teams: bool = True
|
auto_balance_teams: bool = True
|
||||||
|
|
||||||
|
# The campaign used when in co-op session mode.
|
||||||
|
# Do print(ba.app.campaigns) to see available campaign names.
|
||||||
|
coop_campaign: str = 'Easy'
|
||||||
|
|
||||||
|
# The level name within the campaign used in co-op session mode.
|
||||||
|
# For campaign name FOO, do print(ba.app.campaigns['FOO'].levels) to see
|
||||||
|
# available level names.
|
||||||
|
coop_level: str = 'Onslaught Training'
|
||||||
|
|
||||||
# Whether to enable telnet access.
|
# Whether to enable telnet access.
|
||||||
# IMPORTANT: This option is no longer available, as it was being used
|
# IMPORTANT: This option is no longer available, as it was being used
|
||||||
# for exploits. Live access to the running server is still possible through
|
# for exploits. Live access to the running server is still possible through
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue