Merge pull request #341 from KirbyKid256/pulls/lock-and-key-fix

Doors and Key Fixes
This commit is contained in:
Joe H
2025-09-22 10:01:29 +01:00
committed by GitHub
2 changed files with 3 additions and 0 deletions

View File

@@ -294,6 +294,8 @@ func return_to_editor() -> void:
return_editor_tiles() return_editor_tiles()
%Camera.enabled = true %Camera.enabled = true
%Camera.make_current() %Camera.make_current()
KeyItem.total_collected = 0
Door.unlocked_doors.clear()
editor_start.emit() editor_start.emit()
current_state = EditorState.IDLE current_state = EditorState.IDLE
handle_hud() handle_hud()

View File

@@ -87,6 +87,7 @@ func player_exit(player: Player) -> void:
exiting_door_id = -1 exiting_door_id = -1
can_enter = false can_enter = false
LevelEditor.play_door_transition = false LevelEditor.play_door_transition = false
if same_scene_exiting_door != null: same_scene_exiting_door.get_node("Sprite").play("Idle")
same_scene_exiting_door = null same_scene_exiting_door = null
player.global_position = global_position player.global_position = global_position
player.recenter_camera() player.recenter_camera()