feat(items): add chest-return priority to HoldableItem and GameState v3 chest states

- HoldableItem._try_return_to_chest() snaps item back if within CHEST_RETURN_RADIUS (80px)
- _on_drag_released checks chest return before hand-slot fallback
- OutfitItem._on_drag_released checks chest return before outfit/hand-slot logic
- GameState: _chest_states dict + get/set/clear_chest_state methods
- GameState.get_save_data() bumped to version 3, includes chest_states
- GameState.apply_save_data() restores chest_states from save data
This commit is contained in:
Steven Wroblewski
2026-05-09 01:09:47 +02:00
parent 4f1766834a
commit 96ec053331
5 changed files with 102 additions and 2 deletions
+2
View File
@@ -10,6 +10,8 @@ const OUTFIT_APPLY_RADIUS: float = 80.0
func _on_drag_released(_pos: Vector2) -> void:
if _try_return_to_chest():
return
var character: Character = _find_nearest_character()
if character != null:
character.apply_outfit_item(outfit_layer, item_id, outfit_sprite, self)