diff options
Diffstat (limited to 'addons/escoria-core/game/scenes/esc_prompt')
| -rw-r--r-- | addons/escoria-core/game/scenes/esc_prompt/esc_prompt_popup.gd | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/addons/escoria-core/game/scenes/esc_prompt/esc_prompt_popup.gd b/addons/escoria-core/game/scenes/esc_prompt/esc_prompt_popup.gd index d538036..b8d92b2 100644 --- a/addons/escoria-core/game/scenes/esc_prompt/esc_prompt_popup.gd +++ b/addons/escoria-core/game/scenes/esc_prompt/esc_prompt_popup.gd @@ -1,14 +1,8 @@ ## A debug window which can run esc commands extends Window -## Reference to the past actions display -@onready var past_actions = $VBoxContainer/past_actions - -## Reference to the command input -@onready var command = $VBoxContainer/command - -## ESC commands kept around for references to their command names. -var _print: PrintCommand +## The maximum number of commands to keep in history +const COMMANDS_HISTORY_LENGTH: int = 20 ## History of typed commands var commands_history: PackedStringArray @@ -16,8 +10,14 @@ var commands_history: PackedStringArray ## The current index in the command history var commands_history_current_id: int -## The maximum number of commands to keep in history -const COMMANDS_HISTORY_LENGTH: int = 20 +## ESC commands kept around for references to their command names. +var _print: PrintCommand + +## Reference to the past actions display +@onready var past_actions = $VBoxContainer/past_actions + +## Reference to the command input +@onready var command = $VBoxContainer/command ## Called when the node is added to the scene tree for the first time.[br] ## [br] @@ -111,7 +111,7 @@ func _on_command_text_entered(p_command_str : String): if script: escoria.logger.dont_assert = true - escoria.event_manager.queue_event(script.events[escoria.event_manager.EVENT_PRINT]) + escoria.event_manager.queue_event(script.get_event_with_target(escoria.event_manager.EVENT_PRINT)) var ret = await escoria.event_manager.event_finished while ret[1] != _print.get_command_name(): ret = await escoria.event_manager.event_finished |
