🐛 fix warnings

This commit is contained in:
anyreso 2024-04-30 14:31:03 -04:00
parent 1768db4360
commit 7e4c6120be

View file

@ -31,7 +31,7 @@ func _ready() -> void:
if not owner.inventory:
owner.inventory = self
func _unhandled_input(event):
func _unhandled_input(event : InputEvent) -> void:
if event is InputEventMouseButton:
# @NOTE: there could be a control setting for direction
if event.button_index == MOUSE_BUTTON_WHEEL_UP and event.pressed:
@ -40,7 +40,7 @@ func _unhandled_input(event):
roll(-1)
## This method overrides [method Node.add_child] method to make sure not to exceed the inventory capacity
func _add_child(node: Node, force_readable_name: bool = false, internal: InternalMode = 0) -> void:
func _add_child(node: Node, force_readable_name: bool = false, internal: InternalMode = InternalMode.INTERNAL_MODE_DISABLED) -> void:
if get_child_count() <= capacity:
super.add_child(node, force_readable_name, internal)