1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-21 16:13:55 +00:00
The-Modding-Tree/js/mod.js

47 lines
1.2 KiB
JavaScript
Raw Normal View History

2020-10-17 04:21:59 +00:00
let modInfo = {
name: "The Modding Tree",
id: "modbase",
pointsName: "points",
discordName: "",
discordLink: "",
changelogLink: "https://github.com/Acamaeda/The-Modding-Tree/blob/master/changelog.md",
offlineLimit: 1, // In hours
initialStartPoints: new Decimal (10) // Used for hard resets and new players
}
// Set your version in num and name
let VERSION = {
num: "2.1",
name: "Non-nonsensical!",
}
// Add the names of functions that do something when you call them here. (The ones here are examples)
var doNotCallTheseFunctionsEveryTick = ["doReset", "buy", "onPurchase", "blowUpEverything"]
function getStartPoints(){
return new Decimal(modInfo.initialStartPoints)
}
// Determines if it should show points/sec
function canGenPoints(){
return hasUpgrade("c", 11)
}
// Calculate points/sec!
function getPointGen() {
if(!canGenPoints())
return new Decimal(0)
let gain = new Decimal(1)
if (hasUpgrade("c", 12)) gain = gain.times(upgradeEffect("c", 12))
return gain
}
// Less important things beyond this point!
// You can change this if you have things that can be messed up by long tick lengths
function maxTickLength() {
return(3600000) // Default is 1 hour which is just arbitrarily large
}