This commit is contained in:
2026-03-27 10:32:53 -03:00
parent 188b7a4372
commit 582e5fc34c
8 changed files with 163 additions and 127 deletions
+10 -1
View File
@@ -44,7 +44,16 @@ export class ContainerSlot {
return this.#item_stack?.type_id;
}
get amount() {
set amount(new_amount: number) {
if (this.#item_stack) {
this.#item_stack.amount = new_amount;
if (this.#item_stack.amount <= 0) {
this.#item_stack = undefined;
}
}
}
get amount(): number | undefined {
return this.#item_stack?.amount;
}