mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-21 16:13:55 +00:00
Several minor fixes
This commit is contained in:
parent
723d78395b
commit
fba4bbf5e7
6 changed files with 17 additions and 11 deletions
|
@ -1,5 +1,9 @@
|
|||
# The Modding Tree changelog:
|
||||
|
||||
- Fixed baseAmount being set to 0 even when a layer resets nothing.
|
||||
- Fixed centering on tooltips.
|
||||
- Changed some default values on startup to prevent potential issues.
|
||||
|
||||
# v2.6.3 - 6/11/21
|
||||
- Added better support for using multiple layer files and similar. See modFiles in modInfo.
|
||||
- The demo now has each layer in its own file as well.
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
bottom: 100%;
|
||||
left: 50%;
|
||||
margin-bottom: 5px;
|
||||
margin-left: -80px;
|
||||
padding: 7px;
|
||||
font-family: "Lucida Console", "Courier New", monospace;
|
||||
-webkit-border-radius: 3px;
|
||||
|
@ -43,6 +42,8 @@
|
|||
border-radius: 3px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.5s;
|
||||
transform: translateX(-50%);
|
||||
min-width: max-content;
|
||||
|
||||
position: absolute;
|
||||
z-index: 20000 ;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Basic layer breakdown
|
||||
|
||||
This is a very minimal layer with minimal features. Most things will require additional features.
|
||||
This is a relatively minimal layer with few features. Most things will require additional features.
|
||||
|
||||
```js
|
||||
addLayer("p", {
|
||||
|
@ -25,7 +25,7 @@ addLayer("p", {
|
|||
gainMult() { // Returns your multiplier to your gain of the prestige resource.
|
||||
return new Decimal(1) // Factor in any bonuses multiplying gain here.
|
||||
},
|
||||
gainExp() { // Returns your exponent to your gain of the prestige resource.
|
||||
gainExp() { // Returns the exponent to your gain of the prestige resource.
|
||||
return new Decimal(1)
|
||||
},
|
||||
|
||||
|
|
|
@ -43,6 +43,6 @@ The benefits of using Github:
|
|||
|
||||
7. Finally, at the top middle, click "push origin" to push your changes out onto the online repository.
|
||||
|
||||
8. You can view your project on line, or share it with others, by going to https://raw.githack.com/[YOUR-GITHUB-USERNAME]/The-Modding-Tree/master/index.html. **You do NOT need to do this to test your mod locally.**
|
||||
8. You can view your project online, or share it with others, by going to https://raw.githack.com/[YOUR-GITHUB-USERNAME]/The-Modding-Tree/master/index.html. **You do NOT need to do this to test your mod locally.**
|
||||
|
||||
And now, you have successfully used Github! You can look at the next tutorial on [making a mod](making-a-mod.md), or look at the [documentation](/documentation/!general-info.md) to see how The Modding Tree's system works and to make your mod a reality.
|
||||
|
|
|
@ -180,8 +180,6 @@ function generatePoints(layer, diff) {
|
|||
addPoints(layer, tmp[layer].resetGain.times(diff))
|
||||
}
|
||||
|
||||
var prevOnReset
|
||||
|
||||
function doReset(layer, force=false) {
|
||||
if (tmp[layer].type == "none") return
|
||||
let row = tmp[layer].row
|
||||
|
@ -214,24 +212,22 @@ function doReset(layer, force=false) {
|
|||
}
|
||||
}
|
||||
|
||||
tmp[layer].baseAmount = decimalZero // quick fix
|
||||
}
|
||||
|
||||
if (run(layers[layer].resetsNothing, layers[layer])) return
|
||||
tmp[layer].baseAmount = decimalZero // quick fix
|
||||
|
||||
|
||||
for (layerResetting in layers) {
|
||||
if (row >= layers[layerResetting].row && (!force || layerResetting != layer)) completeChallenge(layerResetting)
|
||||
}
|
||||
|
||||
prevOnReset = {...player}
|
||||
player.points = (row == 0 ? decimalZero : getStartPoints())
|
||||
|
||||
for (let x = row; x >= 0; x--) rowReset(x, layer)
|
||||
for (r in OTHER_LAYERS){
|
||||
rowReset(r, layer)
|
||||
}
|
||||
prevOnReset = undefined
|
||||
|
||||
player[layer].resetTime = 0
|
||||
|
||||
|
|
|
@ -55,6 +55,8 @@ function setupTemp() {
|
|||
temp = tmp
|
||||
}
|
||||
|
||||
const boolNames = ["unlocked", "deactivated"]
|
||||
|
||||
function setupTempData(layerData, tmpData, funcsData) {
|
||||
for (item in layerData){
|
||||
if (layerData[item] == null) {
|
||||
|
@ -78,6 +80,9 @@ function setupTempData(layerData, tmpData, funcsData) {
|
|||
}
|
||||
else if (isFunction(layerData[item]) && !activeFunctions.includes(item)){
|
||||
funcsData[item] = layerData[item]
|
||||
if (boolNames.includes(item))
|
||||
tmpData[item] = false
|
||||
else
|
||||
tmpData[item] = decimalOne // The safest thing to put probably?
|
||||
} else {
|
||||
tmpData[item] = layerData[item]
|
||||
|
|
Loading…
Reference in a new issue