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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user