fix: Correct error message for missing animation player

This commit is contained in:
Balloonpopper authored and Duncan Brown committed 2022-12-28 13:09:34 -05:00
1 parent 3727f82fbf
commit 82ebdc2d6e
1 file changed
+6 -1
@@ -476,7 +476,12 @@ func get_animation_player() -> Node:
if child is AnimatedSprite or \ if child is AnimatedSprite or \
child is AnimationPlayer: child is AnimationPlayer:
player_node_path = child.get_path() player_node_path = child.get_path()
if not has_node(player_node_path): if player_node_path == "":
escoria.logger.warn(
self,
"Can not find animation_player or animated sprite for %s." % global_id
)
elif not has_node(player_node_path):
escoria.logger.warn( escoria.logger.warn(
self, self,
"Can not find animation_player node at path %s for %s." % [player_node_path, global_id] "Can not find animation_player node at path %s for %s." % [player_node_path, global_id]