1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-24 09:21:46 +00:00

Popups are enabled by default

This commit is contained in:
Acamaeda 2020-12-10 01:31:42 -05:00
parent ddafd17500
commit 139e10efa4
5 changed files with 5 additions and 6 deletions

View file

@ -2,7 +2,6 @@
## v2.3: Cooler and Newer Edition - 12/10/20
- Added achievement/milestone popups (thank you to Jacorb for this contribution!)
(They have to be enabled with layer features)
- The changelog tab is back, and can be set in mod.js.
- Layer nodes and respec buttons will not be clicked by pressing "enter".
- Possible fix for flickering tooltips and strange transitions.

View file

@ -53,4 +53,4 @@ Individual achievement can have these features:
- doneTooltip: **optional, deprecated**. Appears when the achievement is hovered over and completed, overrides the basic tooltip. This can display what the player achieved (the goal), and the rewards, if any. It can also be a function that returns updating text. Can use basic HTML.
Enable achievement popups by adding `achievementsPopups: true` to the layer.
Disable achievement popups by adding `achievementsPopups: false` to the layer.

View file

@ -75,7 +75,7 @@ You can make almost any value dynamic by using a function in its place, includin
- infoboxes: Displays some text in a box that can be shown or hidden. [See here for more info.](infoboxes.md)
- achievementPopups, milestonePopups: **optional**, If true, you get a popup message when you get the achievement/milestone.
- achievementPopups, milestonePopups: **optional**, If false, disables popup message when you get the achievement/milestone. True by default.
## Prestige formula features

View file

@ -35,4 +35,4 @@ Milestone features:
- id: **assigned automagically**. It's the "key" which the milestone was stored under, for convenient access. The milestone in the example's id is 0.
Enable milestone popups by adding `milestonePopups: true` to the layer.
Disaable milestone popups by adding `milestonePopups: false` to the layer.

View file

@ -727,7 +727,7 @@ function updateMilestones(layer){
for (id in layers[layer].milestones){
if (!(player[layer].milestones.includes(id)) && layers[layer].milestones[id].done()){
player[layer].milestones.push(id)
if (tmp[layer].milestonePopups) doPopup("milestone", tmp[layer].milestones[id].requirementDescription, "Milestone Gotten!", 3, tmp[layer].color);
if (tmp[layer].milestonePopups || tmp[layer].milestonePopups === undefined) doPopup("milestone", tmp[layer].milestones[id].requirementDescription, "Milestone Gotten!", 3, tmp[layer].color);
}
}
}
@ -737,7 +737,7 @@ function updateAchievements(layer){
if (isPlainObject(layers[layer].achievements[id]) && !(player[layer].achievements.includes(id)) && layers[layer].achievements[id].done()) {
player[layer].achievements.push(id)
if (layers[layer].achievements[id].onComplete) layers[layer].achievements[id].onComplete()
if (tmp[layer].achievementPopups) doPopup("achievement", tmp[layer].achievements[id].name, "Achievement Gotten!", 3, tmp[layer].color);
if (tmp[layer].achievementPopups || tmp[layer].achievementPopups === undefined) doPopup("achievement", tmp[layer].achievements[id].name, "Achievement Gotten!", 3, tmp[layer].color);
}
}
}