class_name ItemPickup extends Node

@export var item: Item
@export var quantity: int = 1

func add_to_inventory(node: Node):
	match NodeExt.find_child_variant(node, ItemContainer):
		var opt when opt.is_some():
			opt.unwrap().add_item(item, quantity)
	queue_free()
