mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-24 17:31:50 +00:00
Fixed documentation
This commit is contained in:
parent
fa5dbbf0b5
commit
2f588b5215
4 changed files with 21 additions and 21 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
This is a very minimal layer with minimal features. Most things will require additional features:
|
||||
|
||||
``p: {
|
||||
p: {
|
||||
startData() { return { // startData is a function that returns default data for a layer.
|
||||
unl: false, // You can add more variables here to add them to your layer.
|
||||
points: new Decimal(0), // "points" is the internal name for the main resource of the layer.
|
||||
|
@ -30,4 +30,4 @@ This is a very minimal layer with minimal features. Most things will require add
|
|||
},
|
||||
|
||||
layerShown() {return true}, // Returns a bool for if this layer's node should be visible in the tree.
|
||||
}, ``
|
||||
},
|
|
@ -5,7 +5,7 @@ the player can reset the purchases to get their currency back.
|
|||
|
||||
Buyables should be formatted like this:
|
||||
|
||||
``buyables: {
|
||||
buyables: {
|
||||
rows: # of rows
|
||||
cols: # of columns
|
||||
respec() {}, **optional**, implement it to reset things and give back your currency.
|
||||
|
@ -16,7 +16,7 @@ Buyables should be formatted like this:
|
|||
etc
|
||||
}
|
||||
etc
|
||||
}``
|
||||
}
|
||||
|
||||
Features:
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Challenges are stored in the following format:
|
||||
|
||||
``challs: {
|
||||
challs: {
|
||||
rows: # of rows
|
||||
cols: # of columns
|
||||
11: {
|
||||
|
@ -10,7 +10,7 @@ Challenges are stored in the following format:
|
|||
etc
|
||||
}
|
||||
etc
|
||||
}``
|
||||
}
|
||||
|
||||
You can use inChall(layer, id) and hasChall(layer, id) to determine if the player is currently in a challenge,
|
||||
or has completed the challenge, respectively. These are useful for implementing effects.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Custom tab layouts can be used to do basically anything in a tab window, especially combined with the "style" layer feature. The tabFormat feature is an array of things, like this:
|
||||
|
||||
``
|
||||
|
||||
tabFormat: ["main-display",
|
||||
["prestige-button", function(){return "Melt your points into "}],
|
||||
["raw-html", function() {return "<button onclick='console.log(`yeet`)'>'HI'</button>"}],
|
||||
|
@ -11,7 +11,7 @@ Custom tab layouts can be used to do basically anything in a tab window, especia
|
|||
{"color": "red", "font-size": "32px", "font-family": "Comic Sans MS"}],
|
||||
"blank",
|
||||
["toggle", ["c", "beep"]],
|
||||
"milestones", "blank", "blank", "upgrades"] ``
|
||||
"milestones", "blank", "blank", "upgrades"]
|
||||
|
||||
It is a list of components, which can be either just a name, or an array with arguments. If it's an array, the first item is the name of the component, the second is the data passed into it, and the third (optional) is a CSS object,
|
||||
which applies its style to the component.
|
||||
|
|
Loading…
Reference in a new issue