🐛 修复树脂计算异常

close #242
This commit is contained in:
BTMuli
2026-05-06 13:48:59 +08:00
parent ed256ae3ab
commit 17435ddad0

View File

@@ -36,7 +36,7 @@ const current = computed<number>(() => {
const totalToRecover = max.value - initialCurrent.value;
if (totalToRecover <= 0) return max.value;
if (remainedTime.value <= 0) return max.value;
const recovered = Math.floor(totalToRecover - remainedTime.value / 540);
const recovered = Math.floor(totalToRecover - remainedTime.value / 480);
return Math.min(initialCurrent.value + Math.max(recovered, 0), max.value);
});
const full = computed<boolean>(() => current.value === max.value);