cleanup and finger crossing

This commit is contained in:
Chunkybanana 2022-12-16 02:50:57 +00:00
parent 09a6817b3f
commit 23041e3a0d
2 changed files with 13 additions and 4 deletions

View file

@ -970,10 +970,17 @@ const layer = createLayer(id, function (this: BaseLayer) {
if (Decimal.times(diff, computedLogConsumption.value).negate().gt(trees.logs.value)) {
return;
}
trees.logs.value = Decimal.times(diff, computedLogConsumption.value).plus(trees.logs.value);
coal.value = Decimal.times(diff, computedCoalGain.value).plus(coal.value);
ash.value = Decimal.times(diff, computedAshGain.value).plus(ash.value);
activeFires.value = Decimal.max(activeFires.value, 0);
if (main.isMastery.value) {
trees.mastery.logs.value = Decimal.times(diff, computedLogConsumption.value).plus(trees.mastery.logs.value);
mastery.coal.value = Decimal.times(diff, computedCoalGain.value).plus(mastery.coal.value);
mastery.ash.value = Decimal.times(diff, computedAshGain.value).plus(mastery.ash.value);
mastery.activeFires.value = Decimal.max(mastery.activeFires.value, 0);
} else {
trees.logs.value = Decimal.times(diff, computedLogConsumption.value).plus(trees.logs.value);
coal.value = Decimal.times(diff, computedCoalGain.value).plus(coal.value);
ash.value = Decimal.times(diff, computedAshGain.value).plus(ash.value);
activeFires.value = Decimal.max(activeFires.value, 0);
}
});
const { total: totalCoal, trackerDisplay } = setUpDailyProgressTracker({
@ -1507,6 +1514,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
computedFertilizerEffect,
generalTabCollapsed,
minWidth: 700,
mastery,
display: jsx(() => (
<>
{render(trackerDisplay)}

View file

@ -495,6 +495,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
minWidth: 700,
buildFoundationHK,
mastery,
mastered,
display: jsx(() => (
<>
<div>