mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-04-24 18:21:03 +00:00
Added standardized automation
This commit is contained in:
parent
6506f81556
commit
f0c3942253
9 changed files with 49 additions and 16 deletions
js
20
js/utils.js
20
js/utils.js
|
@ -629,6 +629,14 @@ function layOver(obj1, obj2) {
|
|||
}
|
||||
}
|
||||
|
||||
function prestigeNotify(layer) {
|
||||
if (layers[layer].prestigeNotify) return layers[layer].prestigeNotify()
|
||||
else if (tmp[layer].autoPrestige || tmp[layer].passiveGeneration) return false
|
||||
else if (tmp[layer].type == "static") return tmp[layer].canReset
|
||||
else if (tmp[layer].type == "normal") return (tmp[layer].canReset && (tmp[layer].resetGain.gte(player[layer].points.div(10))))
|
||||
else return false
|
||||
}
|
||||
|
||||
function notifyLayer(name) {
|
||||
if (player.tab == name || !layerunlocked(name)) return
|
||||
player.notify[name] = 1
|
||||
|
@ -643,6 +651,14 @@ function subtabShouldNotify(layer, family, id){
|
|||
else return subtab.shouldNotify
|
||||
}
|
||||
|
||||
function subtabResetNotify(layer, family, id){
|
||||
let subtab = {}
|
||||
if (family == "mainTabs") subtab = tmp[layer].tabFormat[id]
|
||||
else subtab = tmp[layer].microtabs[family][id]
|
||||
if (subtab.embedLayer) return tmp[subtab.embedLayer].prestigeNotify
|
||||
else return false
|
||||
}
|
||||
|
||||
function nodeShown(layer) {
|
||||
if (tmp[layer].layerShown) return true
|
||||
switch(layer) {
|
||||
|
@ -742,10 +758,6 @@ function prestigeButtonText(layer)
|
|||
return layers[layer].prestigeButtonText()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function isFunction(obj) {
|
||||
return !!(obj && obj.constructor && obj.call && obj.apply);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue