Refactor debug checks to use event bus settings for consistency across game components.

This commit is contained in:
2026-03-28 23:24:09 +00:00
parent 1fbd12e6f6
commit 3dbeadf976
9 changed files with 30 additions and 13 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ class Inventory
if id == Gosu::MS_LEFT
@inventory_selected = type
elsif id == Gosu::MS_RIGHT
if DEBUG && [:wood, :metal, :science].include?(type)
if $bus.get(:settings, :debug) && [:wood, :metal, :science].include?(type)
@grid[row_idx][col_idx][1][0] = max
else
craft(type, ctrl: Gosu.button_down?(Gosu::KB_RIGHT_CONTROL) || Gosu.button_down?(Gosu::KB_LEFT_CONTROL))