Stack rework

This commit is contained in:
Rendo 2025-10-15 17:56:18 +05:00
commit ea9c41054b
7 changed files with 60 additions and 39 deletions

View file

@ -13,3 +13,10 @@ func _init(item: Item = null, amount: int = 0) -> void:
## Amount of items in stack
@export_storage var amount : int
func invalidate() -> void:
held_item = null
amount = 0
func is_valid() -> bool:
return held_item != null or amount > 0