mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2024-11-22 04:05:42 +00:00
Improve UX for max replicanti/DT this reality
This commit is contained in:
parent
42435a6c4d
commit
313cff23a1
@ -4655,6 +4655,7 @@ properly on certain themes. */
|
|||||||
.l-replicanti-tab {
|
.l-replicanti-tab {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
color: var(--color-text);
|
||||||
|
|
||||||
/* To prevent button jitter */
|
/* To prevent button jitter */
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -39,6 +39,7 @@ export default {
|
|||||||
unlockCost: new Decimal(),
|
unlockCost: new Decimal(),
|
||||||
scrambledText: "",
|
scrambledText: "",
|
||||||
maxReplicanti: new Decimal(),
|
maxReplicanti: new Decimal(),
|
||||||
|
estimateToMax: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -115,6 +116,11 @@ export default {
|
|||||||
return `${boostList.slice(0, -1).join(",<br>")},<br> and ${boostList[boostList.length - 1]}.`;
|
return `${boostList.slice(0, -1).join(",<br>")},<br> and ${boostList[boostList.length - 1]}.`;
|
||||||
},
|
},
|
||||||
hasMaxText: () => PlayerProgress.realityUnlocked() && !Pelle.isDoomed,
|
hasMaxText: () => PlayerProgress.realityUnlocked() && !Pelle.isDoomed,
|
||||||
|
toMaxTooltip() {
|
||||||
|
return this.estimateToMax.lt(0.01)
|
||||||
|
? "Currently increasing"
|
||||||
|
: TimeSpan.fromSeconds(this.estimateToMax.toNumber()).toStringShort();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
update() {
|
update() {
|
||||||
@ -153,9 +159,20 @@ export default {
|
|||||||
this.canSeeGalaxyButton =
|
this.canSeeGalaxyButton =
|
||||||
Replicanti.galaxies.max >= 1 || PlayerProgress.eternityUnlocked();
|
Replicanti.galaxies.max >= 1 || PlayerProgress.eternityUnlocked();
|
||||||
this.maxReplicanti.copyFrom(player.records.thisReality.maxReplicanti);
|
this.maxReplicanti.copyFrom(player.records.thisReality.maxReplicanti);
|
||||||
|
this.estimateToMax = this.calculateEstimate();
|
||||||
},
|
},
|
||||||
vacuumText() {
|
vacuumText() {
|
||||||
return wordShift.wordCycle(PelleRifts.vacuum.name);
|
return wordShift.wordCycle(PelleRifts.vacuum.name);
|
||||||
|
},
|
||||||
|
// This is copied out of a short segment of ReplicantiGainText with comments and unneeded variables stripped
|
||||||
|
calculateEstimate() {
|
||||||
|
const updateRateMs = player.options.updateRate;
|
||||||
|
const logGainFactorPerTick = Decimal.divide(getGameSpeedupForDisplay() * updateRateMs *
|
||||||
|
(Math.log(player.replicanti.chance + 1)), getReplicantiInterval());
|
||||||
|
const postScale = Math.log10(ReplicantiGrowth.scaleFactor) / ReplicantiGrowth.scaleLog10;
|
||||||
|
const nextMilestone = this.maxReplicanti;
|
||||||
|
const coeff = Decimal.divide(updateRateMs / 1000, exp1m(logGainFactorPerTick.times(postScale)));
|
||||||
|
return coeff.times(nextMilestone.divide(this.amount).pow(postScale).minus(1));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -196,7 +213,10 @@ export default {
|
|||||||
class="c-replicanti-description"
|
class="c-replicanti-description"
|
||||||
>
|
>
|
||||||
Your maximum Replicanti reached this Reality is
|
Your maximum Replicanti reached this Reality is
|
||||||
<span class="max-accent">{{ format(maxReplicanti, 2) }}</span>.
|
<span
|
||||||
|
v-tooltip="toMaxTooltip"
|
||||||
|
class="max-accent"
|
||||||
|
>{{ format(maxReplicanti, 2) }}</span>.
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div v-if="isInEC8">
|
<div v-if="isInEC8">
|
||||||
@ -224,5 +244,7 @@ export default {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.max-accent {
|
.max-accent {
|
||||||
color: var(--color-accent);
|
color: var(--color-accent);
|
||||||
|
text-shadow: 0 0 0.2rem var(--color-reality-dark);
|
||||||
|
cursor: default;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -20,6 +20,7 @@ export default {
|
|||||||
hasPelleDilationUpgrades: false,
|
hasPelleDilationUpgrades: false,
|
||||||
galaxyTimeEstimate: "",
|
galaxyTimeEstimate: "",
|
||||||
maxDT: new Decimal(),
|
maxDT: new Decimal(),
|
||||||
|
toMaxTooltip: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -99,6 +100,10 @@ export default {
|
|||||||
}
|
}
|
||||||
this.tachyonGalaxyGain *= DilationUpgrade.galaxyMultiplier.effectValue;
|
this.tachyonGalaxyGain *= DilationUpgrade.galaxyMultiplier.effectValue;
|
||||||
this.maxDT.copyFrom(player.records.thisReality.maxDT);
|
this.maxDT.copyFrom(player.records.thisReality.maxDT);
|
||||||
|
|
||||||
|
const estimateText = getDilationTimeEstimate(this.maxDT);
|
||||||
|
if (this.dilatedTimeIncome.lte(0)) this.toMaxTooltip = "No DT gain";
|
||||||
|
else this.toMaxTooltip = estimateText.startsWith("<") ? "Currently Increasing" : estimateText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -135,7 +140,10 @@ export default {
|
|||||||
</span>
|
</span>
|
||||||
<span v-if="hasMaxText">
|
<span v-if="hasMaxText">
|
||||||
Your maximum Dilated Time reached this Reality is
|
Your maximum Dilated Time reached this Reality is
|
||||||
<span class="max-accent">{{ format(maxDT, 2, 1) }}</span>.
|
<span
|
||||||
|
v-tooltip="toMaxTooltip"
|
||||||
|
class="max-accent"
|
||||||
|
>{{ format(maxDT, 2, 1) }}</span>.
|
||||||
</span>
|
</span>
|
||||||
<div class="l-dilation-upgrades-grid">
|
<div class="l-dilation-upgrades-grid">
|
||||||
<div class="l-dilation-upgrades-grid__row">
|
<div class="l-dilation-upgrades-grid__row">
|
||||||
@ -196,5 +204,7 @@ export default {
|
|||||||
.max-accent {
|
.max-accent {
|
||||||
color: var(--color-dilation);
|
color: var(--color-dilation);
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
|
text-shadow: 0 0 0.2rem var(--color-reality-dark);
|
||||||
|
cursor: default;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user