|
|
@ -79,6 +79,8 @@ func _find_stacks_with_space(item_resource: DBItemResource, item_id: String) -> |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
## Removes an amount of items from a specific slot |
|
|
|
## If the amount exceeds the amount of the slot, will NOT remove from other stacks |
|
|
|
func _remove_from_slot(slot_index: int, amount: int) -> void: |
|
|
|
if slot_index >= max_inventory_items: |
|
|
|
printerr("Slot Index ", slot_index, " out of inventory range") |
|
|
@ -186,8 +188,6 @@ func _on_item_picked_up(item: DBItemResource) -> void: |
|
|
|
func _on_quick_slot_selected(slot_index: int) -> void: |
|
|
|
selected_quick_slot = slot_index |
|
|
|
|
|
|
|
## Removes an amount of items from a specific slot |
|
|
|
## If the amount exceeds the amount of the slot, will NOT remove from other stacks |
|
|
|
func _on_remove_from_slot(slot_index: int, amount: int) -> void: |
|
|
|
_remove_from_slot(slot_index, amount) |
|
|
|
|
|
|
|