|
|
@ -30,14 +30,6 @@ func _ready() -> void: |
|
|
|
self.remove_from_inventory.connect(_on_remove_from_inventory) |
|
|
|
|
|
|
|
|
|
|
|
# TODO: REMOVE ME |
|
|
|
func _unhandled_input(event: InputEvent) -> void: |
|
|
|
if event.is_action_pressed("ui_up"): |
|
|
|
add_to_inventory.emit("003", 1) |
|
|
|
elif event.is_action_pressed("ui_down"): |
|
|
|
remove_from_inventory.emit("003", 1) |
|
|
|
|
|
|
|
|
|
|
|
func available_space(item_id: String) -> int: |
|
|
|
var full_stacks: int = floor(_inventory_cache[item_id].total / DBItems.data[item_id].max_stack_size) |
|
|
|
var space_in_stacks: int = ( |
|
|
|