fix: correct data type and update missed constant references (#476)

fix: correct data type and update missed constant references
This commit is contained in:
Duncan Brown
2021-12-03 17:30:19 -05:00
committed by GitHub
parent e57d162a56
commit 9fbf0c254c
2 changed files with 5 additions and 5 deletions

View File

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

View File

@@ -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: ""
}