mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-06 07:23:37 +08:00
Update football.py
This commit is contained in:
parent
de44f8b459
commit
8793937c16
@ -106,8 +106,8 @@ class FootballTeamGame(ba.TeamGameActivity[Player, Team]):
|
|||||||
],
|
],
|
||||||
default=1.0,
|
default=1.0,
|
||||||
),
|
),
|
||||||
|
ba.BoolSetting('Epic Mode', default=False),
|
||||||
]
|
]
|
||||||
default_music = ba.MusicType.FOOTBALL
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def supports_session_type(cls, sessiontype: type[ba.Session]) -> bool:
|
def supports_session_type(cls, sessiontype: type[ba.Session]) -> bool:
|
||||||
@ -143,6 +143,10 @@ class FootballTeamGame(ba.TeamGameActivity[Player, Team]):
|
|||||||
self._flag_respawn_light: ba.NodeActor | None = None
|
self._flag_respawn_light: ba.NodeActor | None = None
|
||||||
self._score_to_win = int(settings['Score to Win'])
|
self._score_to_win = int(settings['Score to Win'])
|
||||||
self._time_limit = float(settings['Time Limit'])
|
self._time_limit = float(settings['Time Limit'])
|
||||||
|
self._epic_mode = bool(settings['Epic Mode'])
|
||||||
|
self.slow_motion = self._epic_mode
|
||||||
|
self.default_music = (ba.MusicType.EPIC if self._epic_mode else
|
||||||
|
ba.MusicType.FOOTBALL)
|
||||||
|
|
||||||
def get_instance_description(self) -> str | Sequence:
|
def get_instance_description(self) -> str | Sequence:
|
||||||
touchdowns = self._score_to_win / 7
|
touchdowns = self._score_to_win / 7
|
||||||
@ -330,7 +334,6 @@ class FootballCoopGame(ba.CoopGameActivity[Player, Team]):
|
|||||||
tips = ['Use the pick-up button to grab the flag < ${PICKUP} >']
|
tips = ['Use the pick-up button to grab the flag < ${PICKUP} >']
|
||||||
scoreconfig = ba.ScoreConfig(scoretype=ba.ScoreType.MILLISECONDS,
|
scoreconfig = ba.ScoreConfig(scoretype=ba.ScoreType.MILLISECONDS,
|
||||||
version='B')
|
version='B')
|
||||||
default_music = ba.MusicType.FOOTBALL
|
|
||||||
|
|
||||||
# FIXME: Need to update co-op games to use getscoreconfig.
|
# FIXME: Need to update co-op games to use getscoreconfig.
|
||||||
def get_score_type(self) -> str:
|
def get_score_type(self) -> str:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user