1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2025-05-10 03:51:33 +00:00

Moved getter/setter functions

This commit is contained in:
Harley White 2021-05-13 17:44:07 -04:00
parent 70949f593d
commit 94f677b641
7 changed files with 103 additions and 72 deletions

View file

@ -376,6 +376,7 @@ addLayer("c", {
// Layer will automatically highlight if an upgrade is purchasable.
return (player.c.buyables[11] == 1)
},
marked: "discord.png",
resetDescription: "Melt your points into ",
})
@ -524,5 +525,33 @@ addLayer("a", {
onComplete() {console.log("Bork bork bork!")}
},
},
midsection: ["grid", "blank"],
grid: {
maxRows: 3,
rows: 2,
cols: 2,
getStartData(id) {
return id
},
getUnlocked(id) { // Default
return true
},
getCanClick(data, id) {
return player.points.eq(10)
},
getStyle(data, id) {
return {'background-color': '#'+ (data*1234%999999)}
},
onClick(data, id) { // Don't forget onHold
player[this.layer].grid[id]++
},
getTitle(data, id) {
return "Gridable #" + id
},
getDisplay(data, id) {
return data
},
},
},
)