Stack rework
This commit is contained in:
parent
5da9e11f36
commit
ea9c41054b
7 changed files with 60 additions and 39 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue