From 8889bac5c9bfead06c4541227e20cbf6033b6d40 Mon Sep 17 00:00:00 2001 From: Acamaeda Date: Thu, 15 Oct 2020 13:29:25 -0400 Subject: [PATCH] Final touchups --- docs/achievements.md | 2 +- docs/getting-started.md | 4 ++-- docs/layer-features.md | 12 ++++++------ docs/milestones.md | 2 +- js/utils.js | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/achievements.md b/docs/achievements.md index b03d2c5..e7f856f 100644 --- a/docs/achievements.md +++ b/docs/achievements.md @@ -1,4 +1,4 @@ -#Achievements +# Achievements Achievements are awarded to the player when they meet a certain goal, and give some benefit. Currently, they are pretty basic, but additional features will be added later to help. diff --git a/docs/getting-started.md b/docs/getting-started.md index 464e353..2855de2 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -17,7 +17,7 @@ The benefits of using Github: - It lets you collaborate with other people, if you want to. -# Getting set up with Github and The Modding Tree: +## Getting set up with Github and The Modding Tree: 1. Install [Github Desktop](https://desktop.github.com/) and [Visual Studio Code](https://code.visualstudio.com/). @@ -36,7 +36,7 @@ The benefits of using Github: 6. Select that you're using it for your own purposes, and click continue. It will download the files and handle everything. -# Using your repository +## Using your repository 1. Click on "show in finder" to the right, and then open index.html. This will let you view and test your project! diff --git a/docs/layer-features.md b/docs/layer-features.md index bd6c363..3ae4cbe 100644 --- a/docs/layer-features.md +++ b/docs/layer-features.md @@ -10,7 +10,7 @@ Key: - **sometimes required**: This is may be required, depending on other things in the layer. - **optional**: You can leave this out if you don't intend to use that feature for the layer. -# Layer Definition features +## Layer Definition features - layer: **Assigned automagically**. It's the same value as the name of this layer, so you can do player[this.layer].points or similar to access the save value. It makes copying code to new layers easier. It is also assigned to all upgrades and buyables and such. @@ -66,7 +66,7 @@ Key: standard tab layout. (cannot do subtabs) -# Big features (all optional) +## Big features (all optional) - upgrades: A grid of one-time purchases which can have unique upgrade conditions, currency costs, and bonuses. [Explanations are in a separate file.](upgrades.md) @@ -94,7 +94,7 @@ Key: [Explanations are in a separate file.](achievements.md) -# Prestige formula features +## Prestige formula features - type: Determines which prestige formula you use. "normal": The amount of currency you gain is independent of its current amount (like Prestige). @@ -134,7 +134,7 @@ Key: -# Tree/node features +## Tree/node features - symbol: **optional**, the text that appears on this layer's node. Default is the layer id with the first letter capitalized @@ -151,7 +151,7 @@ Key: is unlocked or locked, respectively. By default the tooltips behave the same as in the original Prestige Tree. -# Other features +## Other features - doReset(resettingLayer): **optional**, is triggered when a layer on a row greater than or equal to this one does a reset. The default behavior is to reset everything on the row, but only if it was triggered by a layer in a higher row. @@ -191,7 +191,7 @@ Key: ``` -# Custom Prestige type +## Custom Prestige type - getResetGain(): **For custom prestige type**, Returns how many points you should get if you reset now. You can call getResetGain(this.layer, useType = "static") or similar to calculate what your gain would be under another diff --git a/docs/milestones.md b/docs/milestones.md index ff36b7e..a690095 100644 --- a/docs/milestones.md +++ b/docs/milestones.md @@ -1,4 +1,4 @@ -#Milestones +# Milestones Milestones are awarded to the player when they meet a certain goal, and give some benefit. Milestones should be formatted like this: diff --git a/js/utils.js b/js/utils.js index 3dd4083..98d1b94 100644 --- a/js/utils.js +++ b/js/utils.js @@ -34,7 +34,7 @@ function format(decimal, precision=2) { var slog = decimal.slog() if (slog.gte(1e6)) return "F" + format(slog.floor()) else return Decimal.pow(10, slog.sub(slog.floor())).toStringWithDecimalPlaces(3) + "F" + commaFormat(slog.floor(), 0) - } else if (decimal.gte("1e1000")) return (Math.floor(decimal.mantissa + 0.01) + ("e"+formatWhole(decimal.log10()))) + } else if (decimal.gte("1e1000")) return (Math.floor(decimal.mantissa + 0.01) + ("e"+formatWhole(decimal.log10().floor()))) else if (decimal.gte(1e9)) return exponentialFormat(decimal, precision) else if (decimal.gte(1e3)) return commaFormat(decimal, 0) else return commaFormat(decimal, precision)