Inventory context

This commit is contained in:
Rendo 2025-10-16 22:05:24 +05:00
commit fed57e38df
17 changed files with 128 additions and 108 deletions

View file

@ -12,15 +12,11 @@ func _init() -> void:
## Tries to add an item into inventory. Returns not stored stack of item.
@abstract
func add(stack : Stack) -> Stack
@abstract
func add_from_side(stack : Stack, ang_diff : float) -> Stack
func add(stack : Stack, context: InventoryContext = null) -> Stack
## Returns if conditions of adding are met
@abstract
func can_add(item : Item = null) -> bool
@abstract
func can_add_from_side(ang_diff : float, item : Item = null) -> bool
func can_add(item : Item = null, context: InventoryContext = null) -> bool
## Tries to take first item. Returns null if no items in inventory
@abstract