Basic inventory, item and storage

This commit is contained in:
Rendo 2025-10-12 16:28:44 +05:00
commit 66a623e568
11 changed files with 155 additions and 1 deletions

View file

@ -0,0 +1,22 @@
@abstract
extends Resource
class_name Inventory
func _init() -> void:
resource_local_to_scene = true
@abstract
func add(item : Stack) -> Stack
@abstract
func pop() -> Stack
@abstract
func take(item : Item,amount: int) -> Stack
@abstract
func find(item : Item) -> int
func has(item : Item) -> bool:
return find(item) != -1