fix: repeating fix from another branch; these will be merged anyway
This commit is contained in:
committed by
Julian Murgia
parent
05ca4c1795
commit
64ac7654f4
@@ -54,8 +54,3 @@ func run(command_params: Array) -> int:
|
|||||||
command_params[0]
|
command_params[0]
|
||||||
)
|
)
|
||||||
return ESCExecution.RC_OK
|
return ESCExecution.RC_OK
|
||||||
|
|
||||||
|
|
||||||
# Function called when the command is interrupted.
|
|
||||||
func interrupt():
|
|
||||||
escoria.object_manager.get_object(_snd_player).node.set_state("off")
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ func _init() -> void:
|
|||||||
|
|
||||||
# Return the descriptor of the arguments of this command
|
# Return the descriptor of the arguments of this command
|
||||||
func configure() -> ESCCommandArgumentDescriptor:
|
func configure() -> ESCCommandArgumentDescriptor:
|
||||||
escoria.logger.error("Command %s did not override configure." % get_class())
|
escoria.logger.error("Command %s did not override configure." % get_command_name())
|
||||||
return ESCCommandArgumentDescriptor.new()
|
return ESCCommandArgumentDescriptor.new()
|
||||||
|
|
||||||
|
|
||||||
@@ -33,10 +33,15 @@ func validate(arguments: Array) -> bool:
|
|||||||
|
|
||||||
# Run the command
|
# Run the command
|
||||||
func run(command_params: Array) -> int:
|
func run(command_params: Array) -> int:
|
||||||
escoria.logger.error("Command %s did not override run." % get_class())
|
escoria.logger.error("Command %s did not override run." % get_command_name())
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
# Return the name of the command based on the script's filename
|
# Return the name of the command based on the script's filename
|
||||||
func get_command_name() -> String:
|
func get_command_name() -> String:
|
||||||
return command_name_regex.search(get_script().get_path()).get_string(FILE_REGEX_GROUP)
|
return command_name_regex.search(get_script().get_path()).get_string(FILE_REGEX_GROUP)
|
||||||
|
|
||||||
|
|
||||||
|
# Function called when the command is interrupted.
|
||||||
|
func interrupt():
|
||||||
|
escoria.logger.info("Command %s did not override interrupt." % get_command_name())
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ func _draw():
|
|||||||
# - can_interrupt: if true, this command will interrupt any ongoing event
|
# - can_interrupt: if true, this command will interrupt any ongoing event
|
||||||
func do_walk(destination, params: Array = [], can_interrupt: bool = false) -> void:
|
func do_walk(destination, params: Array = [], can_interrupt: bool = false) -> void:
|
||||||
if can_interrupt:
|
if can_interrupt:
|
||||||
escoria.event_manager.interrupt_running_event()
|
escoria.event_manager.interrupt()
|
||||||
|
|
||||||
escoria.action_manager.clear_current_action()
|
escoria.action_manager.clear_current_action()
|
||||||
|
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ func load_game(id: int):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
escoria.event_manager.interrupt_running_event()
|
escoria.event_manager.interrupt()
|
||||||
|
|
||||||
var load_event = ESCEvent.new("%s%s" % [ESCEvent.PREFIX, escoria.event_manager.EVENT_LOAD])
|
var load_event = ESCEvent.new("%s%s" % [ESCEvent.PREFIX, escoria.event_manager.EVENT_LOAD])
|
||||||
var load_statements = []
|
var load_statements = []
|
||||||
|
|||||||
@@ -66,8 +66,7 @@ func _on_button_pressed():
|
|||||||
],
|
],
|
||||||
get_class()
|
get_class()
|
||||||
)
|
)
|
||||||
escoria.event_manager.interrupt_running_event()
|
escoria.event_manager.interrupt()
|
||||||
escoria.event_manager.clear_event_queue()
|
|
||||||
escoria.event_manager.queue_event(script.events['room_selector'])
|
escoria.event_manager.queue_event(script.events['room_selector'])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user