mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-26 16:35:39 +00:00
Fix #303 filter items with count of 0
This commit is contained in:
@@ -89,7 +89,7 @@ function fillContainer(items: Item[], ctx: LootContext): SlottedItem[] {
|
||||
}
|
||||
|
||||
function assignSlots(items: Item[]): SlottedItem[] {
|
||||
return items.map((item, i) => ({ slot: i, item }))
|
||||
return items.flatMap((item, i) => item.count > 0 ? [({ slot: i, item })] : [])
|
||||
}
|
||||
|
||||
function splitItem(item: Item, count: number): Item {
|
||||
|
||||
Reference in New Issue
Block a user