From ba54f2bd4621716e24bc6cf82a45e27435e60c03 Mon Sep 17 00:00:00 2001 From: Julian Murgia Date: Tue, 24 Sep 2024 23:01:53 +0200 Subject: [PATCH] fix: initialize escoria.main.last_room_id on loading --- .../escoria-core/game/core-scripts/esc/esc_action_manager.gd | 5 +++++ addons/escoria-core/game/core-scripts/esc_exit.gd | 1 - .../game/core-scripts/save_data/esc_save_manager.gd | 3 +++ game/rooms/room06/room06.tscn | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd index 9056fc7e2..e81b0a57e 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd @@ -322,6 +322,11 @@ func _get_event_to_queue( action, target.global_id, combine_with.global_id + ], + "Check that action ':%s %s' exists in the script of item '%s'" % [ + action, + target.global_id, + combine_with.global_id ] ] diff --git a/addons/escoria-core/game/core-scripts/esc_exit.gd b/addons/escoria-core/game/core-scripts/esc_exit.gd index 2a053abbd..46e49467c 100644 --- a/addons/escoria-core/game/core-scripts/esc_exit.gd +++ b/addons/escoria-core/game/core-scripts/esc_exit.gd @@ -27,7 +27,6 @@ var _change_scene: ChangeSceneCommand func _enter_tree(): is_exit = true - player_orients_on_arrival = false func _ready(): diff --git a/addons/escoria-core/game/core-scripts/save_data/esc_save_manager.gd b/addons/escoria-core/game/core-scripts/save_data/esc_save_manager.gd index c2bd5ddb8..b2cc4db33 100644 --- a/addons/escoria-core/game/core-scripts/save_data/esc_save_manager.gd +++ b/addons/escoria-core/game/core-scripts/save_data/esc_save_manager.gd @@ -495,6 +495,9 @@ func load_game(id: int): camera_target_to_follow ]) ) + + ## MAIN + escoria.main.last_scene_global_id = save_game.main.last_scene_global_id load_event.statements = load_statements diff --git a/game/rooms/room06/room06.tscn b/game/rooms/room06/room06.tscn index 0959bbef5..69e9fbd3b 100644 --- a/game/rooms/room06/room06.tscn +++ b/game/rooms/room06/room06.tscn @@ -190,6 +190,7 @@ z_index = 400 texture = ExtResource( 11 ) [node name="Text" type="Node2D" parent="."] +z_index = 10 [node name="Polygon2D" type="Polygon2D" parent="Text"] position = Vector2( 37, 11 )