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:
Dennis Ploeger
2021-09-07 08:07:10 +02:00
committed by GitHub
parent 3ee46f4977
commit 903422960a
12 changed files with 94 additions and 14 deletions

View File

@@ -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" % [

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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