fix: given/qtyUpdated
This commit is contained in:
parent
be1e162da5
commit
6a2dddef0e
|
@ -264,7 +264,12 @@ export default class Inventory extends Component {
|
|||
for (let slot = 1; slot < 11; ++slot) {
|
||||
if (slots[slot]?.source === stack.source) {
|
||||
slots[slot].qty += stack.qty;
|
||||
Component.markChange(this.entity, 'qtyUpdated', {[slot]: stack.qty});
|
||||
if (ecs.diff[this.entity]?.Inventory?.given?.[slot]) {
|
||||
ecs.diff[this.entity].Inventory.given[slot].qty += stack.qty;
|
||||
}
|
||||
else {
|
||||
Component.markChange(this.entity, 'qtyUpdated', {[slot]: stack.qty});
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user