1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-25 18:00:10 +00:00
The-Modding-Tree/js/Demo/demoTree.js

48 lines
1,023 B
JavaScript
Raw Normal View History

2020-10-28 02:35:07 +00:00
// treeLayout will override the default tree's layout if used
2020-10-30 00:33:39 +00:00
var layoutInfo = {
startTab: "none",
showTree: true,
2020-10-28 02:35:07 +00:00
2020-10-30 01:49:34 +00:00
//treeLayout: ""
2020-10-30 00:33:39 +00:00
}
2020-10-28 02:35:07 +00:00
// 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)}
},
)
2020-10-30 01:49:34 +00:00
addLayer("tree-tab", {
tabFormat: [["tree", function() {return (layoutInfo.treeLayout ? layoutInfo.treeLayout : TREE_LAYERS)}]]
})