Add non-regression test states and Bluetooth diagnostic script
- Introduced a new JSON file containing non-regression test states with detailed unit information, including positions, ages, and movement directions across multiple frames. - Added a shell script for Bluetooth diagnostics that checks system information, Bluetooth binaries, running processes, D-Bus status, Bluetooth controller details, and audio stack status, providing a comprehensive overview for troubleshooting.
This commit is contained in:
+5
-5
@@ -32,7 +32,7 @@ class Gas(Unit):
|
||||
)
|
||||
|
||||
for victim_id in victim_ids:
|
||||
victim = self.game.get_unit_by_id(victim_id)
|
||||
victim = self.game.unit_manager.get_unit_by_id(victim_id)
|
||||
if victim and isinstance(victim, Rat):
|
||||
if victim.partial_move > 0.5:
|
||||
victim.gassed += 1
|
||||
@@ -43,14 +43,14 @@ class Gas(Unit):
|
||||
)
|
||||
|
||||
for victim_id in victim_ids_before:
|
||||
victim = self.game.get_unit_by_id(victim_id)
|
||||
victim = self.game.unit_manager.get_unit_by_id(victim_id)
|
||||
if victim and isinstance(victim, Rat):
|
||||
if victim.partial_move < 0.5:
|
||||
victim.gassed += 1
|
||||
|
||||
if self.age % self.speed:
|
||||
return
|
||||
parent = self.game.get_unit_by_id(self.parent_id)
|
||||
parent = self.game.unit_manager.get_unit_by_id(self.parent_id)
|
||||
if (parent) or self.parent_id is None:
|
||||
print(f"Gas at {self.position} is spreading")
|
||||
# Spread gas to adjacent cells
|
||||
@@ -61,7 +61,7 @@ class Gas(Unit):
|
||||
if not self.game.map.is_wall(new_x, new_y):
|
||||
if not any(isinstance(unit, Gas) for unit in self.game.units.values() if unit.position == (new_x, new_y)):
|
||||
print(f"Spreading gas from {self.position} to ({new_x}, {new_y})")
|
||||
self.game.spawn_unit(Gas, (new_x, new_y), parent_id=self.parent_id if self.parent_id else self.id)
|
||||
self.game.unit_manager.spawn_unit(Gas, (new_x, new_y), parent_id=self.parent_id if self.parent_id else self.id)
|
||||
def collisions(self):
|
||||
pass
|
||||
|
||||
@@ -72,7 +72,7 @@ class Gas(Unit):
|
||||
|
||||
|
||||
def draw(self):
|
||||
image = self.game.assets["BMP_GAS"]
|
||||
image = self.game.graphics.assets["BMP_GAS"]
|
||||
image_size = self.game.render_engine.get_image_size(image)
|
||||
self.rat_image = image
|
||||
partial_x, partial_y = 0, 0
|
||||
|
||||
Reference in New Issue
Block a user