Small fixes and issue 386 (#387)
Co-authored-by: Dennis Ploeger <develop@dieploegers.de> Co-authored-by: dploeger <dploeger@users.noreply.github.com>
This commit is contained in:
@@ -285,7 +285,6 @@ func walk_stop(pos: Vector2) -> void:
|
||||
|
||||
update_terrain()
|
||||
|
||||
yield(parent.get_animation_player(), "animation_finished")
|
||||
if walk_context.target_object:
|
||||
escoria.logger.debug(
|
||||
"%s arrived at %s" % [
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
# `set_animations object animations`
|
||||
#
|
||||
# Set the animation resource for the given ESCPlayer
|
||||
#
|
||||
# @ESC
|
||||
extends ESCBaseCommand
|
||||
class_name SetAnimationsCommand
|
||||
|
||||
|
||||
# Return the descriptor of the arguments of this command
|
||||
func configure() -> ESCCommandArgumentDescriptor:
|
||||
return ESCCommandArgumentDescriptor.new(
|
||||
2,
|
||||
[TYPE_STRING, TYPE_STRING],
|
||||
[null, null]
|
||||
)
|
||||
|
||||
|
||||
# Validate wether the given arguments match the command descriptor
|
||||
func validate(arguments: Array):
|
||||
if not escoria.object_manager.objects.has(arguments[0]):
|
||||
escoria.logger.report_errors(
|
||||
"set_animations: invalid object",
|
||||
[
|
||||
"Object with global id %s not found" % arguments[0]
|
||||
]
|
||||
)
|
||||
return false
|
||||
if not ResourceLoader.exists(arguments[1]):
|
||||
escoria.logger.report_errors(
|
||||
"set_animations: invalid animations",
|
||||
[
|
||||
"The animation resource %s was not found" % arguments[1]
|
||||
]
|
||||
)
|
||||
return false
|
||||
return .validate(arguments)
|
||||
|
||||
|
||||
# Run the command
|
||||
func run(command_params: Array) -> int:
|
||||
(escoria.object_manager.get_object(command_params[0]).node as ESCPlayer)\
|
||||
.animations = load(command_params[1])
|
||||
return ESCExecution.RC_OK
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# It does not respect the room's navigation polygons, so you can move items
|
||||
# where the player can't walk.
|
||||
#
|
||||
# @STUB
|
||||
# @ESC
|
||||
extends ESCBaseCommand
|
||||
class_name SlideCommand
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# It does not respect the room's navigation polygons, so you can move items
|
||||
# where the player can't walk.
|
||||
#
|
||||
# @STUB
|
||||
# @ESC
|
||||
extends SlideCommand
|
||||
class_name SlideBlockCommand
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
# Set immediate to true to show directly switch to the direction and not
|
||||
# show intermediate angles
|
||||
#
|
||||
# @STUB
|
||||
# @ESC
|
||||
extends ESCBaseCommand
|
||||
class_name TurnToCommand
|
||||
|
||||
Reference in New Issue
Block a user