Big fixes

This commit is contained in:
dingo
2026-01-26 17:42:23 -05:00
parent c1a97b219e
commit b434eb6031
10 changed files with 303 additions and 76 deletions
+4 -4
View File
@@ -220,7 +220,7 @@ func _build_tiles():
func _input(event: InputEvent):
# Handle touch screen taps for attacking
if event is InputEventScreenTouch and event.pressed:
var ui_open = (inventory_panel and inventory_panel.visible) or (chat_panel and chat_panel.visible)
var ui_open = (inventory_panel and inventory_panel.visible) or (chat_panel and chat_panel.visible) or (crafting_panel and crafting_panel.visible) or (char_sheet_ui and char_sheet_ui.visible) or (loot_popup and loot_popup.visible)
# Don't attack if UI is open
if ui_open:
@@ -258,7 +258,7 @@ func _handle_input():
return
# Don't process game input if inventory or chat is open
var ui_open = (inventory_panel and inventory_panel.visible) or (chat_panel and chat_panel.visible)
var ui_open = (inventory_panel and inventory_panel.visible) or (chat_panel and chat_panel.visible) or (crafting_panel and crafting_panel.visible) or (char_sheet_ui and char_sheet_ui.visible) or (loot_popup and loot_popup.visible)
# Calculate aim angle from mouse/touch position
var mouse_pos = get_global_mouse_position()
@@ -315,7 +315,7 @@ func _handle_input():
func _perform_attack(attack_angle: float):
# Don't attack if UI is open
var ui_open = (inventory_panel and inventory_panel.visible) or (chat_panel and chat_panel.visible) or (crafting_panel and crafting_panel.visible)
var ui_open = (inventory_panel and inventory_panel.visible) or (chat_panel and chat_panel.visible) or (crafting_panel and crafting_panel.visible) or (char_sheet_ui and char_sheet_ui.visible) or (loot_popup and loot_popup.visible)
if ui_open:
return
@@ -408,7 +408,7 @@ func _perform_attack(attack_angle: float):
func _send_movement():
# Don't move if UI is open
var ui_open = (inventory_panel and inventory_panel.visible) or (chat_panel and chat_panel.visible)
var ui_open = (inventory_panel and inventory_panel.visible) or (chat_panel and chat_panel.visible) or (crafting_panel and crafting_panel.visible) or (char_sheet_ui and char_sheet_ui.visible) or (loot_popup and loot_popup.visible)
if ui_open:
return