make sure the counts in foraging aren't enritely irrelevant
This commit is contained in:
parent
cb503e3cf9
commit
9af3499d3d
|
@ -35,7 +35,12 @@ export const craftingStations: CraftingStation[] = [
|
|||
const rolled = pickRandom(outputs);
|
||||
const r = res.find(r => r.item.id === rolled.item.id);
|
||||
if (r) {
|
||||
r.quantity = r.quantity + 1;
|
||||
if (r.quantity === rolled.quantity) {
|
||||
// don't roll more than can be rolled
|
||||
i--;
|
||||
} else {
|
||||
r.quantity = r.quantity + 1;
|
||||
}
|
||||
} else {
|
||||
res.push({ item: rolled.item, quantity: 1 });
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue