mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-04-20 16:31:01 +00:00
Added overriding layout and tree.jses
This commit is contained in:
parent
b780160a4c
commit
eebc05db1f
5 changed files with 207 additions and 179 deletions
js/Demo
41
js/Demo/demoTree.js
Normal file
41
js/Demo/demoTree.js
Normal file
|
@ -0,0 +1,41 @@
|
|||
// treeLayout will override the default tree's layout if used
|
||||
var treeLayout = "";
|
||||
/*var treeLayout = [["f", "c"],
|
||||
["g", "spook", "h"]]
|
||||
*/
|
||||
|
||||
|
||||
// A "ghost" layer which offsets f in the tree
|
||||
addNode("spook", {
|
||||
row: 1,
|
||||
layerShown: "ghost",
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
// A "ghost" layer which offsets f in the tree
|
||||
addNode("g", {
|
||||
symbol: "TH",
|
||||
branches: ["c"],
|
||||
color: '#6d3678',
|
||||
layerShown: true,
|
||||
canClick() {return player.points.gte(10)},
|
||||
tooltip: "Thanos your points",
|
||||
tooltipLocked: "Thanos your points",
|
||||
onClick() {player.points = player.points.div(2)}
|
||||
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
// A "ghost" layer which offsets f in the tree
|
||||
addNode("h", {
|
||||
branches: ["g"],
|
||||
layerShown: true,
|
||||
tooltip: "Restore your points to 10",
|
||||
tooltipLocked: "Restore your points to 10",
|
||||
|
||||
canClick() {return player.points.lt(10)},
|
||||
onClick() {player.points = new Decimal(10)}
|
||||
},
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue