From 9fbf0c254c9790f0c8de6fc91f2dda18b72afb7f Mon Sep 17 00:00:00 2001 From: Duncan Brown Date: Fri, 3 Dec 2021 17:30:19 -0500 Subject: [PATCH] fix: correct data type and update missed constant references (#476) fix: correct data type and update missed constant references --- .../game/core-scripts/esc/commands/set_animations.gd | 8 ++++---- .../game/core-scripts/esc/esc_room_manager.gd | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/escoria-core/game/core-scripts/esc/commands/set_animations.gd b/addons/escoria-core/game/core-scripts/esc/commands/set_animations.gd index 621f7be4..81d3397b 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/set_animations.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/set_animations.gd @@ -47,19 +47,19 @@ func run(command_params: Array) -> int: (escoria.object_manager.get_object(command_params[0]).node as ESCPlayer)\ .animations = load(command_params[1]) if not escoria.globals_manager.has( - escoria.globals_manager.GLOBAL_ANIMATION_RESOURCES + escoria.room_manager.GLOBAL_ANIMATION_RESOURCES ): escoria.globals_manager.set_global( - escoria.globals_manager.GLOBAL_ANIMATION_RESOURCES, + escoria.room_manager.GLOBAL_ANIMATION_RESOURCES, {}, true ) var animations = escoria.globals_manager.get_global( - escoria.globals_manager.GLOBAL_ANIMATION_RESOURCES + escoria.room_manager.GLOBAL_ANIMATION_RESOURCES ) animations[command_params[0]] = command_params[1] escoria.globals_manager.set_global( - escoria.globals_manager.GLOBAL_ANIMATION_RESOURCES, + escoria.room_manager.GLOBAL_ANIMATION_RESOURCES, animations, true ) diff --git a/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd index 7b5d17e4..9fdcb2f7 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd @@ -19,7 +19,7 @@ const GLOBAL_CURRENT_SCENE = "ESC_CURRENT_SCENE" const RESERVED_GLOBALS = { GLOBAL_LAST_SCENE: "", GLOBAL_FORCE_LAST_SCENE_NULL: false, - GLOBAL_ANIMATION_RESOURCES: [], + GLOBAL_ANIMATION_RESOURCES: {}, GLOBAL_CURRENT_SCENE: "" }