Skip to content

Commit

Permalink
fix(Crew Inventory): Fixes an issue where inventory can be duplicated.
Browse files Browse the repository at this point in the history
…Closes #2668
  • Loading branch information
alexanderson1993 committed Dec 23, 2019
1 parent b8d4f43 commit 948eb13
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/events/shipStructure.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ App.on("updateInventoryMetadata", ({id, metadata}) => {
});
App.on("updateCrewInventory", ({crewId, inventory, roomId}) => {
inventory.forEach(e => {
if (e.count === 0) return;
const inv = App.inventory.find(i => i.id === e.inventory);
inv.moveToCrew(roomId, crewId, e.count);
});
Expand Down

0 comments on commit 948eb13

Please sign in to comment.