1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-24 17:31:50 +00:00

We're in the endgame now

This commit is contained in:
Acamaeda 2020-10-17 17:14:32 -04:00
parent 58f181e70f
commit a50ed331bf
4 changed files with 11 additions and 5 deletions

View file

@ -5,6 +5,7 @@
- Added getStartPoints()
- Added the ability to store non-layer-related data
- Added the ability to display more things at the top of the tree tab below points.
- Made the endgame condition customizable
- Added "sell one" and "sell all" buttons for buyables.
- Fixed issues with version number
- Fixed number formatting issue making things like "10e9" appear.

View file

@ -6,7 +6,7 @@ var gameEnded = false;
// Don't change this
const TMT_VERSION = {
tmtNum: "2.1",
tmtName: "Non-nonsensical"
tmtName: "We should have thought of this sooner!"
}
function getResetGain(layer, useType = null) {
@ -267,10 +267,9 @@ VERSION.withoutName = "v" + VERSION.num + (VERSION.pre ? " Pre-Release " + VERSI
VERSION.withName = VERSION.withoutName + (VERSION.name ? ": " + VERSION.name : "")
const ENDGAME = new Decimal("e280000000");
function gameLoop(diff) {
if (player.points.gte(ENDGAME) || gameEnded) gameEnded = 1
if (isEndgame() || gameEnded) gameEnded = 1
if (isNaN(diff)) diff = 0
if (gameEnded && !player.keepGoing) {

View file

@ -12,7 +12,7 @@ let modInfo = {
// Set your version in num and name
let VERSION = {
num: "2.1",
name: "Non-nonsensical!",
name: " We should have thought of this sooner!",
}
// If you add new functions anywhere inside of a layer, and those functions have an effect when called, add them here.
@ -51,6 +51,13 @@ var displayThings = [
function() {if (inChallenge("c", 11)) return "The game is currently <h1>0%</h1> harder."},
]
// Determines when the game "ends"
function isEndgame() {
return player.points.gte(new Decimal("e280000000"))
}
// Less important things beyond this point!
// You can change this if you have things that can be messed up by long tick lengths

View file

@ -412,7 +412,6 @@ function loadVue() {
milestoneShown,
keepGoing,
VERSION,
ENDGAME,
LAYERS,
hotkeys
},