Refactor keybindings configuration and remove obsolete JSON files

This commit is contained in:
2025-08-19 23:21:37 +02:00
parent 1269913275
commit 8451ac7913
14 changed files with 102 additions and 90 deletions
Binary file not shown.
Binary file not shown.
+3 -5
View File
@@ -26,9 +26,8 @@ class Mine(Unit):
"""Mine explodes, killing the rat and destroying itself."""
if not self.armed:
return
print("MINE EXPLOSION!")
self.game.render_engine.play_sound("BOMB.WAV")
self.game.render_engine.play_sound("POISON.WAV")
# Kill the rat that stepped on the mine
if victim_rat.id in self.game.units:
@@ -43,7 +42,7 @@ class Mine(Unit):
return
# Use mine asset
image = self.game.assets["mine"]
image = self.game.assets["BMP_POISON"]
image_size = self.game.render_engine.get_image_size(image)
# Center the mine in the cell
@@ -55,5 +54,4 @@ class Mine(Unit):
def die(self, score=None):
"""Remove mine from game and disarm it."""
self.armed = False
Explosion(self.game, self.position).draw()
super().die(score)