mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-31 19:53:17 +08:00
Merge branch 'master' of github.com:efroemling/ballistica
This commit is contained in:
commit
b12ac84f70
@ -97,7 +97,6 @@ class Session:
|
||||
instances; one for each ba.Activity the session may potentially run.
|
||||
"""
|
||||
# pylint: disable=too-many-statements
|
||||
# pylint: disable=too-many-branches
|
||||
# pylint: disable=too-many-locals
|
||||
# pylint: disable=cyclic-import
|
||||
from ba._lobby import Lobby
|
||||
@ -146,11 +145,6 @@ class Session:
|
||||
# print('Would set host-session asset-reqs to:',
|
||||
# required_asset_packages)
|
||||
|
||||
if team_names is None:
|
||||
team_names = ['Good Guys']
|
||||
if team_colors is None:
|
||||
team_colors = [(0.6, 0.2, 1.0)]
|
||||
|
||||
# First thing, wire up our internal engine data.
|
||||
self._sessiondata = _ba.register_session(self)
|
||||
|
||||
@ -197,6 +191,8 @@ class Session:
|
||||
self.max_players = max_players
|
||||
|
||||
if self._use_teams:
|
||||
assert team_names is not None
|
||||
assert team_colors is not None
|
||||
for i, color in enumerate(team_colors):
|
||||
team = Team(team_id=self._next_team_id,
|
||||
name=GameActivity.get_team_display_string(
|
||||
|
||||
@ -290,6 +290,9 @@ class CaptureTheFlagGame(ba.TeamGameActivity):
|
||||
if (not team.gamedata['home_flag_at_base']
|
||||
and flag.held_count == 0):
|
||||
time_out_counting_down = True
|
||||
if flag.time_out_respawn_time is None:
|
||||
flag.reset_return_times()
|
||||
assert flag.time_out_respawn_time is not None
|
||||
flag.time_out_respawn_time -= 1
|
||||
if flag.time_out_respawn_time <= 0:
|
||||
flag.handlemessage(ba.DieMessage())
|
||||
|
||||
@ -59,7 +59,7 @@ class Icon(ba.Actor):
|
||||
|
||||
icon = player.get_icon()
|
||||
self.node = ba.newnode('image',
|
||||
owner=self,
|
||||
delegate=self,
|
||||
attrs={
|
||||
'texture': icon['texture'],
|
||||
'tint_texture': icon['tint_texture'],
|
||||
|
||||
@ -69,6 +69,7 @@ class Puck(ba.Actor):
|
||||
'position': self._spawn_pos,
|
||||
'materials': pmats
|
||||
})
|
||||
ba.animate(self.node, "model_scale", {0: 0, 0.2: 1.3, 0.26: 1})
|
||||
|
||||
def handlemessage(self, msg: Any) -> Any:
|
||||
if isinstance(msg, ba.DieMessage):
|
||||
|
||||
@ -430,11 +430,11 @@ class OnslaughtGame(ba.CoopGameActivity):
|
||||
{'entries': [
|
||||
{'type': spazbot.ChargerBotProShielded,
|
||||
'point': 'bottom_right'},
|
||||
{'type': spazbot.ChargerBotProShielded, 'point': 'Bottom'}
|
||||
{'type': spazbot.ChargerBotProShielded, 'point': 'bottom'}
|
||||
if player_count > 2 else None,
|
||||
{'type': spazbot.ChargerBotProShielded,
|
||||
'point': 'bottom_left'},
|
||||
{'type': spazbot.ChargerBotProShielded, 'point': 'Top'}
|
||||
{'type': spazbot.ChargerBotProShielded, 'point': 'top'}
|
||||
if hard else None,
|
||||
{'type': spazbot.BomberBotProStatic,
|
||||
'point': 'turret_top_middle'},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user