mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-01 20:33:46 +08:00
More tidying
This commit is contained in:
parent
55528660ed
commit
a89ee4f3ff
@ -375,9 +375,9 @@ class EliminationGame(ba.TeamGameActivity):
|
|||||||
icon.update_for_lives()
|
icon.update_for_lives()
|
||||||
xval += x_offs
|
xval += x_offs
|
||||||
|
|
||||||
# noinspection PyUnusedLocal
|
|
||||||
def _get_spawn_point(self, player: ba.Player) -> Optional[ba.Vec3]:
|
def _get_spawn_point(self, player: ba.Player) -> Optional[ba.Vec3]:
|
||||||
# pylint: disable=unused-argument
|
del player # Unused.
|
||||||
|
|
||||||
# In solo-mode, if there's an existing live player on the map, spawn at
|
# In solo-mode, if there's an existing live player on the map, spawn at
|
||||||
# whichever spot is farthest from them (keeps the action spread out).
|
# whichever spot is farthest from them (keeps the action spread out).
|
||||||
if self._solo_mode:
|
if self._solo_mode:
|
||||||
|
|||||||
@ -475,9 +475,8 @@ class RunaroundGame(ba.CoopGameActivity):
|
|||||||
spaz.pick_up_powerup_callback = self._on_player_picked_up_powerup
|
spaz.pick_up_powerup_callback = self._on_player_picked_up_powerup
|
||||||
return spaz
|
return spaz
|
||||||
|
|
||||||
# noinspection PyUnusedLocal
|
|
||||||
def _on_player_picked_up_powerup(self, player: ba.Actor) -> None:
|
def _on_player_picked_up_powerup(self, player: ba.Actor) -> None:
|
||||||
# pylint: disable=unused-argument
|
del player # Unused.
|
||||||
self._player_has_picked_up_powerup = True
|
self._player_has_picked_up_powerup = True
|
||||||
|
|
||||||
def _drop_powerup(self, index: int, poweruptype: str = None) -> None:
|
def _drop_powerup(self, index: int, poweruptype: str = None) -> None:
|
||||||
|
|||||||
@ -148,9 +148,8 @@ class TargetPracticeGame(ba.TeamGameActivity):
|
|||||||
|
|
||||||
self._targets.append(Target(position=point))
|
self._targets.append(Target(position=point))
|
||||||
|
|
||||||
# noinspection PyUnusedLocal
|
|
||||||
def _on_spaz_dropped_bomb(self, spaz: ba.Actor, bomb: ba.Actor) -> None:
|
def _on_spaz_dropped_bomb(self, spaz: ba.Actor, bomb: ba.Actor) -> None:
|
||||||
# pylint: disable=unused-argument
|
del spaz # Unused.
|
||||||
from bastd.actor.bomb import Bomb
|
from bastd.actor.bomb import Bomb
|
||||||
|
|
||||||
# Wire up this bomb to inform us when it blows up.
|
# Wire up this bomb to inform us when it blows up.
|
||||||
|
|||||||
@ -462,7 +462,6 @@ class TutorialActivity(ba.Activity):
|
|||||||
n.opacity = 0.0
|
n.opacity = 0.0
|
||||||
a.set_stick_image_position(0, 0)
|
a.set_stick_image_position(0, 0)
|
||||||
|
|
||||||
# noinspection PyUnusedLocal
|
|
||||||
class SetSpeed:
|
class SetSpeed:
|
||||||
|
|
||||||
def __init__(self, speed: int):
|
def __init__(self, speed: int):
|
||||||
@ -552,7 +551,6 @@ class TutorialActivity(ba.Activity):
|
|||||||
if self._flash:
|
if self._flash:
|
||||||
ba.playsound(a.spawn_sound, position=pos)
|
ba.playsound(a.spawn_sound, position=pos)
|
||||||
|
|
||||||
# noinspection PyUnusedLocal
|
|
||||||
class Powerup:
|
class Powerup:
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
@ -581,7 +579,6 @@ class TutorialActivity(ba.Activity):
|
|||||||
powerupbox.PowerupBox(position=pos,
|
powerupbox.PowerupBox(position=pos,
|
||||||
poweruptype='punch').autoretain()
|
poweruptype='punch').autoretain()
|
||||||
|
|
||||||
# noinspection PyUnusedLocal
|
|
||||||
class Delay:
|
class Delay:
|
||||||
|
|
||||||
def __init__(self, time: int) -> None:
|
def __init__(self, time: int) -> None:
|
||||||
@ -590,7 +587,6 @@ class TutorialActivity(ba.Activity):
|
|||||||
def run(self, a: TutorialActivity) -> int:
|
def run(self, a: TutorialActivity) -> int:
|
||||||
return self._time
|
return self._time
|
||||||
|
|
||||||
# noinspection PyUnusedLocal
|
|
||||||
class AnalyticsScreen:
|
class AnalyticsScreen:
|
||||||
|
|
||||||
def __init__(self, screen: str) -> None:
|
def __init__(self, screen: str) -> None:
|
||||||
@ -599,7 +595,6 @@ class TutorialActivity(ba.Activity):
|
|||||||
def run(self, a: TutorialActivity) -> None:
|
def run(self, a: TutorialActivity) -> None:
|
||||||
ba.set_analytics_screen(self._screen)
|
ba.set_analytics_screen(self._screen)
|
||||||
|
|
||||||
# noinspection PyUnusedLocal
|
|
||||||
class DelayOld:
|
class DelayOld:
|
||||||
|
|
||||||
def __init__(self, time: int) -> None:
|
def __init__(self, time: int) -> None:
|
||||||
@ -608,7 +603,6 @@ class TutorialActivity(ba.Activity):
|
|||||||
def run(self, a: TutorialActivity) -> int:
|
def run(self, a: TutorialActivity) -> int:
|
||||||
return int(0.9 * self._time)
|
return int(0.9 * self._time)
|
||||||
|
|
||||||
# noinspection PyUnusedLocal
|
|
||||||
class DelayOld2:
|
class DelayOld2:
|
||||||
|
|
||||||
def __init__(self, time: int) -> None:
|
def __init__(self, time: int) -> None:
|
||||||
@ -745,7 +739,6 @@ class TutorialActivity(ba.Activity):
|
|||||||
def __init__(self, delay: int = 0):
|
def __init__(self, delay: int = 0):
|
||||||
super().__init__('punch', delay=delay)
|
super().__init__('punch', delay=delay)
|
||||||
|
|
||||||
# noinspection PyUnusedLocal
|
|
||||||
class PickUpRelease(ButtonRelease):
|
class PickUpRelease(ButtonRelease):
|
||||||
|
|
||||||
def __init__(self, delay: int = 0):
|
def __init__(self, delay: int = 0):
|
||||||
@ -774,7 +767,6 @@ class TutorialActivity(ba.Activity):
|
|||||||
assert a.text
|
assert a.text
|
||||||
a.text.text = self.text
|
a.text.text = self.text
|
||||||
|
|
||||||
# noinspection PyUnusedLocal
|
|
||||||
class PrintPos:
|
class PrintPos:
|
||||||
|
|
||||||
def __init__(self, spaz_num: int = None):
|
def __init__(self, spaz_num: int = None):
|
||||||
@ -789,7 +781,6 @@ class TutorialActivity(ba.Activity):
|
|||||||
t = list(s.node.position)
|
t = list(s.node.position)
|
||||||
print('RestorePos(' + str((t[0], t[1] - 1.0, t[2])) + '),')
|
print('RestorePos(' + str((t[0], t[1] - 1.0, t[2])) + '),')
|
||||||
|
|
||||||
# noinspection PyUnusedLocal
|
|
||||||
class RestorePos:
|
class RestorePos:
|
||||||
|
|
||||||
def __init__(self, pos: Sequence[float]) -> None:
|
def __init__(self, pos: Sequence[float]) -> None:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user