1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2025-05-11 20:41:10 +00:00

More achievement customization

This commit is contained in:
Acamaeda 2020-12-09 01:36:27 -05:00
parent d6259fc67d
commit 66dc5e4671
5 changed files with 11 additions and 4 deletions

View file

@ -493,6 +493,7 @@ addLayer("a", {
rows: 2,
cols: 3,
11: {
image: "discord.png",
name: "Get me!",
done() {return true}, // This one is a freebie
goalTooltip: "How did this happen?", // Shows when achievement is not completed
@ -503,6 +504,7 @@ addLayer("a", {
done() {return false},
goalTooltip: "Mwahahaha!", // Shows when achievement is not completed
doneTooltip: "HOW????", // Showed when the achievement is completed
textStyle: {'color': '#04e050'},
},
13: {
name: "EIEIO",

View file

@ -369,7 +369,7 @@ function loadVue() {
"
v-bind:style="tmp[layer].achievements[data].computedStyle">
<span v-if= "tmp[layer].achievements[data].name"><br><h3 v-html="tmp[layer].achievements[data].name"></h3><br></span>
<span v-if= "tmp[layer].achievements[data].name"><br><h3 v-bind:style="tmp[layer].achievements[data].textStyle" v-html="tmp[layer].achievements[data].name"></h3><br></span>
</div>
`
})

View file

@ -155,7 +155,7 @@ function constructAchievementStyles(layer){
if (isPlainObject(ach)) {
let style = []
if (ach.image){
style.push({'background-image': ach.image})
style.push({'background-image': 'url("' + ach.image + '")'})
}
if (!ach.unlocked) style.push({'visibility': 'hidden'})
style.push(ach.style)