mirror of
https://github.com/thepaperpilot/The-Modding-Tree.git
synced 2025-03-14 01:51:38 +00:00
Added level up notifs and disabled autosave at chapter 2 starting
This commit is contained in:
parent
5d4558182a
commit
ddd029588b
1 changed files with 11 additions and 0 deletions
|
@ -11,6 +11,7 @@ addLayer("flowers", {
|
|||
points: new Decimal(1),
|
||||
total: new Decimal(1),
|
||||
xp: new Decimal(0),
|
||||
lastLevel: new Decimal(1),
|
||||
realTime: 0
|
||||
};
|
||||
},
|
||||
|
@ -87,6 +88,16 @@ addLayer("flowers", {
|
|||
if (player.tab === this.layer) {
|
||||
player[this.layer].realTime += diff;
|
||||
}
|
||||
let jobLevel = new Decimal(getJobLevel(this.layer));
|
||||
if (jobLevel.neq(player[this.layer].lastLevel)) {
|
||||
doPopup("none", `Level ${jobLevel}`, "Level Up!", 3, layers[this.layer].color);
|
||||
player[this.layer].lastLevel = jobLevel;
|
||||
if (jobLevel.eq(10) && player.chapter === 1) {
|
||||
player.chapter = 2;
|
||||
player.autosave = false;
|
||||
save();
|
||||
}
|
||||
}
|
||||
},
|
||||
onAddPoints(gain) {
|
||||
let xpGain = gain;
|
||||
|
|
Loading…
Add table
Reference in a new issue