Fixed random freeze I got

This commit is contained in:
thepaperpilot 2022-12-24 09:26:42 -06:00
parent c0026268d3
commit d0d75d1178

View file

@ -912,6 +912,13 @@ const factory = createLayer(id, () => {
}
while (times > 0) {
if (
!Object.values(allToys).some(i =>
Decimal.gte(i.value, computedToyMultiplier.value)
)
) {
return;
}
while (Decimal.lt(value[toysIndex].value, computedToyMultiplier.value)) {
toysIndex = (toysIndex + 1) % value.length;
}