mirror of
https://github.com/thepaperpilot/Planar-Pioneers.git
synced 2024-11-22 00:21:31 +00:00
Made level up notif say how many levels
This commit is contained in:
parent
852d138e0e
commit
f5c1969e3a
1 changed files with 5 additions and 1 deletions
|
@ -157,8 +157,9 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
|||
watch(
|
||||
() => resourceLevels.value[resource],
|
||||
(level, prevLevel) => {
|
||||
const diff = Decimal.sub(level, prevLevel);
|
||||
if (
|
||||
Decimal.gt(level, prevLevel) &&
|
||||
Decimal.gt(diff, 0) &&
|
||||
settings.active === player.id &&
|
||||
Decimal.lte(level, 100)
|
||||
) {
|
||||
|
@ -172,6 +173,9 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
|||
)}`}
|
||||
!
|
||||
</h3>
|
||||
{Decimal.gt(diff, 1) ? (
|
||||
<div>Gained {formatWhole(diff)} levels</div>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue