Add Cooler, Bag, and compact hotbar systems
This commit is contained in:
parent
8cd3e83285
commit
49e7faaf84
32 changed files with 1613 additions and 99 deletions
20
items/owned_item.gd
Normal file
20
items/owned_item.gd
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
class_name OwnedItem
|
||||
extends Resource
|
||||
|
||||
@export var item_id: StringName
|
||||
@export var quantity: int = 1
|
||||
|
||||
|
||||
func is_valid() -> bool:
|
||||
return not item_id.is_empty() and quantity > 0
|
||||
|
||||
|
||||
func duplicate_record():
|
||||
return duplicate(true)
|
||||
|
||||
|
||||
func to_save_dict() -> Dictionary:
|
||||
return {
|
||||
"item_id": String(item_id),
|
||||
"quantity": quantity,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue