Small-Loan-Studio / TGO

0 stars 0 forks source link

Implement remove to Inventory class #93

Open this-is-envy opened 3 weeks ago

this-is-envy commented 3 weeks ago

we have a stub in Scripts/Components/Inventory/Inventory.gd for item removal; we should update the signature and implement it.

Based on usage elsewhere we should probably implement it as remove(item: Item, count: int = 1) -> bool and remove_by_id(item_id: String, count: int = 1) ->bool. This moves away from ItemStack as the way to indicate an item since generally we won't have direct access to that from places where we are likely to be calling remove.