class_name ItemInstance extends Resource

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

@warning_ignore("shadowed_variable")
func _init(item: Item = null, quantity: int = 1) -> void:
    self.item = item
    self.quantity = quantity

@warning_ignore("shadowed_variable")
func add_quantity(quantity: int = 1) -> int:
    self.quantity += quantity
    return self.quantity

@warning_ignore("shadowed_variable")
func remove_quantity(quantity: int = 1) -> int:
    self.quantity -= quantity
    return self.quantity

@warning_ignore("shadowed_variable")
func set_quantity(quantity: int) -> int:
    self.quantity = quantity
    return self.quantity
