This commit is contained in:
2026-03-04 11:07:13 -08:00
parent 4742ed003c
commit a4cc5e8f5f
985 changed files with 3858 additions and 1206 deletions

View File

@@ -125,6 +125,17 @@ func start_main_script(s):
func _unhandled_input(event):
if event is InputEventMouseButton and event.is_action("interact"):
print (ego.position, pathfind.to_local(get_global_mouse_position()))
var path = NavigationServer2D.map_get_path(map, ego.position, pathfind.to_local(get_global_mouse_position()), true)
# If look cursor is active and we got here, no SetPiece handled the input
# so this is a room-wide look
if ActionState.current_action == ActionState.Action.LOOK:
_on_room_looked()
return
var path = NavigationServer2D.map_get_path(map, ego.position, pathfind.to_local(get_global_mouse_position()), true)
start_main_script(ScriptBuilder.init(ScriptBuilder.walk_path(ego, path)).can_interrupt().build(self, "_on_script_complete"))
pass
func _on_room_looked() -> void:
# Default room look description - override in room scripts
pass