Mods
This commit is contained in:
parent
81565c22d2
commit
03c3fbeba6
|
@ -77,6 +77,7 @@ class Game:
|
||||||
timer: QTimer | None = None
|
timer: QTimer | None = None
|
||||||
playing_song: bool = False
|
playing_song: bool = False
|
||||||
merge_charge: int = 0
|
merge_charge: int = 0
|
||||||
|
speed: str = "paused"
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def prepare() -> None:
|
def prepare() -> None:
|
||||||
|
@ -354,8 +355,10 @@ class Game:
|
||||||
elif speed == "slow":
|
elif speed == "slow":
|
||||||
minutes = Args.slow_minutes or Config.slow_minutes
|
minutes = Args.slow_minutes or Config.slow_minutes
|
||||||
else:
|
else:
|
||||||
|
Game.speed = "paused"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Game.speed = speed
|
||||||
Game.timer = QTimer()
|
Game.timer = QTimer()
|
||||||
Game.timer.timeout.connect(Game.get_status)
|
Game.timer.timeout.connect(Game.get_status)
|
||||||
|
|
||||||
|
@ -559,7 +562,10 @@ class Game:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def slowdown() -> None:
|
def slowdown() -> None:
|
||||||
Game.change_speed("slow")
|
if Game.speed == "slow":
|
||||||
|
Game.change_speed("paused")
|
||||||
|
else:
|
||||||
|
Game.change_speed("slow")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def change_speed(speed: str) -> None:
|
def change_speed(speed: str) -> None:
|
||||||
|
|
Loading…
Reference in New Issue