We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b465995 + e59385d commit b1f077aCopy full SHA for b1f077a
src/game-engine/world/items/item-container.ts
@@ -160,8 +160,8 @@ export class ItemContainer {
160
return { item: newItem, slot: existingItemIndex };
161
} else {
162
const newItemIndex = this.getFirstOpenSlot();
163
- if (newItemIndex === -1) {
164
- // Not enough container space
+ if (newItemIndex === -1 || item.amount === 0) {
+ // Not enough container space, or the amount of item being added is 0.
165
return null;
166
}
167
0 commit comments