binaries update to 1.6.4

This commit is contained in:
imayushsaini 2021-06-26 13:48:13 +05:30
parent 02ec976174
commit d26d5a2102
986 changed files with 218181 additions and 206 deletions

View file

@ -35,6 +35,8 @@ if TYPE_CHECKING:
VERSION_STR = '1.3'
# Version history:
# 1.3.1
# Windows binary is now named BombSquadHeadless.exe
# 1.3:
# Added show_tutorial config option
# Added team_names config option
@ -573,7 +575,7 @@ class ServerManagerApp:
os.environ['BA_SERVER_WRAPPER_MANAGED'] = '1'
print(f'{Clr.CYN}Launching server subprocess...{Clr.RST}', flush=True)
binary_name = ('bombsquad_headless.exe'
binary_name = ('BombSquadHeadless.exe'
if os.name == 'nt' else './bombsquad_headless')
assert self._ba_root_path is not None
self._subprocess = None

View file

@ -35,6 +35,8 @@ if TYPE_CHECKING:
VERSION_STR = '1.3'
# Version history:
# 1.3.1
# Windows binary is now named BombSquadHeadless.exe
# 1.3:
# Added show_tutorial config option
# Added team_names config option
@ -573,7 +575,7 @@ class ServerManagerApp:
os.environ['BA_SERVER_WRAPPER_MANAGED'] = '1'
print(f'{Clr.CYN}Launching server subprocess...{Clr.RST}', flush=True)
binary_name = ('bombsquad_headless.exe'
binary_name = ('BombSquadHeadless.exe'
if os.name == 'nt' else './bombsquad_headless')
assert self._ba_root_path is not None
self._subprocess = None

BIN
dist/BombSquadHeadless.exe vendored Normal file

Binary file not shown.

View file

@ -1,5 +1,5 @@
# Released under the MIT License. See LICENSE for details.
"""Enums generated by tools/update_python_enums_module in ba-internal."""
"""Enum vals generated by batools.pythonenumsmodule; do not edit by hand."""
from enum import Enum

View file

@ -29,6 +29,27 @@ def get_device_value(device: ba.InputDevice, name: str) -> Any:
subplatform = app.subplatform
appconfig = _ba.app.config
# iiRcade: hard-code for a/b/c/x for now...
if _ba.app.iircade_mode:
return {
'triggerRun2': 19,
'unassignedButtonsRun': False,
'buttonPickUp': 100,
'buttonBomb': 98,
'buttonJump': 97,
'buttonStart': 83,
'buttonStart2': 109,
'buttonPunch': 99,
'buttonRun2': 102,
'buttonRun1': 101,
'triggerRun1': 18,
'buttonLeft': 22,
'buttonRight': 23,
'buttonUp': 20,
'buttonDown': 21,
'buttonVRReorient': 110
}.get(name, -1)
# If there's an entry in our config for this controller, use it.
if 'Controllers' in appconfig:
ccfgs = appconfig['Controllers']

View file

@ -32,10 +32,14 @@ class JoinInfo:
from ba._nodeactor import NodeActor
from ba._general import WeakCall
self._state = 0
self._press_to_punch: Union[str, ba.Lstr] = _ba.charstr(
SpecialChar.LEFT_BUTTON)
self._press_to_bomb: Union[str, ba.Lstr] = _ba.charstr(
SpecialChar.RIGHT_BUTTON)
self._press_to_punch: Union[str,
ba.Lstr] = ('C' if _ba.app.iircade_mode
else _ba.charstr(
SpecialChar.LEFT_BUTTON))
self._press_to_bomb: Union[str,
ba.Lstr] = ('B' if _ba.app.iircade_mode else
_ba.charstr(
SpecialChar.RIGHT_BUTTON))
self._joinmsg = Lstr(resource='pressAnyButtonToJoinText')
can_switch_teams = (len(lobby.sessionteams) > 1)

View file

@ -71,18 +71,20 @@ def get_all_tips() -> List[str]:
('You can judge when a bomb is going to explode based on the\n'
'color of sparks from its fuse: yellow..orange..red..BOOM.'),
]
tips += [
'If your framerate is choppy, try turning down resolution\nor '
'visuals in the game\'s graphics settings.'
]
app = _ba.app
if app.platform in ('android', 'ios') and not app.on_tv:
if not app.iircade_mode:
tips += [
'If your framerate is choppy, try turning down resolution\nor '
'visuals in the game\'s graphics settings.'
]
if (app.platform in ('android', 'ios') and not app.on_tv
and not app.iircade_mode):
tips += [
('If your device gets too warm or you\'d like to conserve '
'battery power,\nturn down "Visuals" or "Resolution" '
'in Settings->Graphics'),
]
if app.platform in ['mac', 'android']:
if app.platform in ['mac', 'android'] and not app.iircade_mode:
tips += [
'Tired of the soundtrack? Replace it with your own!'
'\nSee Settings->Audio->Soundtrack'
@ -90,7 +92,7 @@ def get_all_tips() -> List[str]:
# Hot-plugging is currently only on some platforms.
# FIXME: Should add a platform entry for this so don't forget to update it.
if app.platform in ['mac', 'android', 'windows']:
if app.platform in ['mac', 'android', 'windows'] and not app.iircade_mode:
tips += [
'Players can join and leave in the middle of most games,\n'
'and you can also plug and unplug controllers on the fly.',

View file

@ -39,7 +39,6 @@ class PrivateHostingState:
"""Combined state of whether we're hosting, whether we can, etc."""
unavailable_error: Optional[str] = None
party_code: Optional[str] = None
able_to_host: bool = False
tickets_to_host_now: int = 0
minutes_until_free_host: Optional[float] = None
free_host_minutes_remaining: Optional[float] = None

View file

@ -57,6 +57,34 @@ class ControlsGuide(ba.Actor):
self._update_timer: Optional[ba.Timer] = None
self._title_text: Optional[ba.Node]
clr: Sequence[float]
extra_pos_1: Optional[Tuple[float, float]]
extra_pos_2: Optional[Tuple[float, float]]
if ba.app.iircade_mode:
xtweak = 0.2
ytweak = 0.2
jump_pos = (position[0] + offs * (-1.2 + xtweak),
position[1] + offs * (0.1 + ytweak))
bomb_pos = (position[0] + offs * (0.0 + xtweak),
position[1] + offs * (0.5 + ytweak))
punch_pos = (position[0] + offs * (1.2 + xtweak),
position[1] + offs * (0.5 + ytweak))
pickup_pos = (position[0] + offs * (-1.4 + xtweak),
position[1] + offs * (-1.2 + ytweak))
extra_pos_1 = (position[0] + offs * (-0.2 + xtweak),
position[1] + offs * (-0.8 + ytweak))
extra_pos_2 = (position[0] + offs * (1.0 + xtweak),
position[1] + offs * (-0.8 + ytweak))
self._force_hide_button_names = True
else:
punch_pos = (position[0] - offs * 1.1, position[1])
jump_pos = (position[0], position[1] - offs)
bomb_pos = (position[0] + offs * 1.1, position[1])
pickup_pos = (position[0], position[1] + offs)
extra_pos_1 = None
extra_pos_2 = None
self._force_hide_button_names = False
if show_title:
self._title_text_pos_top = (position[0],
position[1] + 139.0 * scale)
@ -79,7 +107,7 @@ class ControlsGuide(ba.Actor):
})
else:
self._title_text = None
pos = (position[0], position[1] - offs)
pos = jump_pos
clr = (0.4, 1, 0.4)
self._jump_image = ba.newnode(
'image',
@ -104,8 +132,8 @@ class ControlsGuide(ba.Actor):
'position': (pos[0], pos[1] - offs5),
'color': clr
})
pos = (position[0] - offs * 1.1, position[1])
clr = (0.2, 0.6, 1) if ouya else (1, 0.7, 0.3)
pos = punch_pos
self._punch_image = ba.newnode(
'image',
attrs={
@ -129,7 +157,7 @@ class ControlsGuide(ba.Actor):
'position': (pos[0], pos[1] - offs5),
'color': clr
})
pos = (position[0] + offs * 1.1, position[1])
pos = bomb_pos
clr = (1, 0.3, 0.3)
self._bomb_image = ba.newnode(
'image',
@ -154,7 +182,7 @@ class ControlsGuide(ba.Actor):
'position': (pos[0], pos[1] - offs5),
'color': clr
})
pos = (position[0], position[1] + offs)
pos = pickup_pos
clr = (1, 0.8, 0.3) if ouya else (0.8, 0.5, 1)
self._pickup_image = ba.newnode(
'image',
@ -208,6 +236,36 @@ class ControlsGuide(ba.Actor):
'h_align': 'center',
'color': clr
})
if extra_pos_1 is not None:
self._extra_image_1: Optional[ba.Node] = ba.newnode(
'image',
attrs={
'texture': ba.gettexture('nub'),
'absolute_scale': True,
'host_only': True,
'vr_depth': 10,
'position': extra_pos_1,
'scale': (image_size, image_size),
'color': (0.5, 0.5, 0.5)
})
else:
self._extra_image_1 = None
if extra_pos_2 is not None:
self._extra_image_2: Optional[ba.Node] = ba.newnode(
'image',
attrs={
'texture': ba.gettexture('nub'),
'absolute_scale': True,
'host_only': True,
'vr_depth': 10,
'position': extra_pos_2,
'scale': (image_size, image_size),
'color': (0.5, 0.5, 0.5)
})
else:
self._extra_image_2 = None
self._nodes = [
self._bomb_image, self._bomb_text, self._punch_image,
self._punch_text, self._jump_image, self._jump_text,
@ -217,6 +275,10 @@ class ControlsGuide(ba.Actor):
if show_title:
assert self._title_text
self._nodes.append(self._title_text)
if self._extra_image_1 is not None:
self._nodes.append(self._extra_image_1)
if self._extra_image_2 is not None:
self._nodes.append(self._extra_image_2)
# Start everything invisible.
for node in self._nodes:
@ -408,6 +470,12 @@ class ControlsGuide(ba.Actor):
('${D}', down_text), ('${R}', right_text),
('${RUN}', run_text)])
if self._force_hide_button_names:
jump_button_names.clear()
punch_button_names.clear()
bomb_button_names.clear()
pickup_button_names.clear()
self._run_text.text = run_text
w_text: Union[ba.Lstr, str]
if only_remote and self._lifespan is None:

Some files were not shown because too many files have changed in this diff Show more