mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-22 00:21:32 +00:00
2.1.3
This commit is contained in:
parent
b063265d03
commit
d096c3c9b2
8 changed files with 19 additions and 14 deletions
|
@ -1,7 +1,12 @@
|
|||
# The Modding Tree changelog:
|
||||
|
||||
### v2.1.3 - 10/21/20
|
||||
- gainMult and gainExp are now optional.
|
||||
- Layer unlocking is now kept on reset.
|
||||
- Game should start up faster.
|
||||
- Layer updates now have a determined order and starts with earlier-rowed layers.
|
||||
- Automation now has a determined order and starts with later-rowed layers.
|
||||
- Fixed issues with resetting clickables and challenges.
|
||||
- Commas should no longer appear in the decimal places of a number.
|
||||
- Fixed potential issue in displaying the tree.
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ Key:
|
|||
|
||||
- canBuyMax(): **sometimes required**, required for static layers, function used to determine if buying max is permitted.
|
||||
|
||||
- gainMult(), gainExp(): Functions that calculate the multiplier and exponent on resource gain from upgrades
|
||||
- gainMult(), gainExp(): **optional**, Functions that calculate the multiplier and exponent on resource gain from upgrades
|
||||
and boosts and such. Plug in any bonuses here.
|
||||
|
||||
- onPrestige(gain): **optional**, A function that triggers when this layer prestiges, just before you gain the currency.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<script type="text/javascript" src="js/utils.js"></script>
|
||||
<script type="text/javascript" src="js/v.js"></script>
|
||||
<script type="text/javascript" src="js/canvas.js"></script>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
</head>
|
||||
<body onload="load()">
|
||||
<div id="app">
|
||||
|
|
|
@ -369,12 +369,7 @@ addLayer("f", {
|
|||
base: 3,
|
||||
roundUpCost: true,
|
||||
canBuyMax() {return hasAchievement('a', 13)},
|
||||
gainMult() {
|
||||
return new Decimal(1)
|
||||
},
|
||||
gainExp() {
|
||||
return new Decimal(1)
|
||||
},
|
||||
|
||||
row: 1,
|
||||
layerShown() {return true},
|
||||
branches: ["c"], // When this layer appears, a branch will appear from this layer to any layers here. Each entry can be a pair consisting of a layer id and a color.
|
||||
|
|
|
@ -101,7 +101,7 @@ function rowReset(row, layer) {
|
|||
}
|
||||
|
||||
function layerDataReset(layer, keep = []) {
|
||||
let storedData = {}
|
||||
let storedData = {unlocked: player[layer].unlocked} // Always keep unlocked
|
||||
|
||||
for (thing in keep) {
|
||||
if (player[layer][keep[thing]] !== undefined)
|
||||
|
@ -111,8 +111,10 @@ function layerDataReset(layer, keep = []) {
|
|||
player[layer] = layers[layer].startData();
|
||||
player[layer].upgrades = []
|
||||
player[layer].milestones = []
|
||||
player[layer].challenges = []
|
||||
player[layer].challenges = getStartChallenges(layer)
|
||||
resetBuyables(layer)
|
||||
if (layers[layer].clickables && !player[layer].clickables)
|
||||
player[layer].clickables = getStartClickables(layer)
|
||||
|
||||
for (thing in storedData) {
|
||||
player[layer][thing] =storedData[thing]
|
||||
|
|
|
@ -115,7 +115,9 @@ function updateLayers(){
|
|||
|
||||
if(!layers[layer].componentStyles) layers[layer].componentStyles = {}
|
||||
if(layers[layer].symbol === undefined) layers[layer].symbol = layer.charAt(0).toUpperCase() + layer.slice(1)
|
||||
if(layers[layer].unlockOrder === undefined) layers[layer].unlockOrder = 0
|
||||
if(layers[layer].unlockOrder === undefined) layers[layer].unlockOrder = []
|
||||
if(layers[layer].gainMult === undefined) layers[layer].gainMult = new Decimal(1)
|
||||
if(layers[layer].gainExp === undefined) layers[layer].gainExp = new Decimal(1)
|
||||
|
||||
let row = layers[layer].row
|
||||
if(!ROW_LAYERS[row]) ROW_LAYERS[row] = {}
|
||||
|
@ -142,7 +144,6 @@ function updateLayers(){
|
|||
|
||||
function addLayer(layerName, layerData){ // Call this to add layers from a different file!
|
||||
layers[layerName] = layerData
|
||||
updateLayers()
|
||||
}
|
||||
|
||||
// If data is a function, return the result of calling it. Otherwise, return the data.
|
||||
|
|
|
@ -222,6 +222,8 @@ function load() {
|
|||
versionCheck();
|
||||
changeTheme();
|
||||
changeTreeQuality();
|
||||
updateLayers()
|
||||
|
||||
setupTemp();
|
||||
updateTemp();
|
||||
updateTemp();
|
||||
|
|
4
js/v.js
4
js/v.js
|
@ -160,10 +160,10 @@ function loadVue() {
|
|||
Vue.component('milestone', {
|
||||
props: ['layer', 'data'],
|
||||
template: `
|
||||
<td v-if="layers[layer].milestones && layers[layer].milestones[data]!== undefined && milestoneShown(layer, data)" v-bind:style="[(!tmp[layer].milestones[data].unlocked) ? {'visibility': 'hidden'} : {}, tmp[layer].milestones[data].style]" v-bind:class="{milestone: !player[layer].milestones.includes(data), milestoneDone: player[layer].milestones.includes(data)}">
|
||||
<td v-if="layers[layer].milestones && layers[layer].milestones[data]!== undefined && milestoneShown(layer, data)" v-bind:style="[(!tmp[layer].milestones[data].unlocked) ? {'visibility': 'hidden'} : {}, tmp[layer].milestones[data].style]" v-bind:class="{milestone: !hasMilestone(layer, data), milestoneDone: hasMilestone(layer, data)}">
|
||||
<h3 v-html="tmp[layer].milestones[data].requirementDescription"></h3><br>
|
||||
<span v-html="tmp[layer].milestones[data].effectDescription"></span><br>
|
||||
<span v-if="(tmp[layer].milestones[data].toggles)&&(player[layer].milestones.includes(data))" v-for="toggle in tmp[layer].milestones[data].toggles"><toggle :layer= "layer" :data= "toggle" v-bind:style="tmp[layer].componentStyles.toggle"></toggle> </span></td></tr>
|
||||
<span v-if="(tmp[layer].milestones[data].toggles)&&(hasMilestone(layer, data))" v-for="toggle in tmp[layer].milestones[data].toggles"><toggle :layer= "layer" :data= "toggle" v-bind:style="tmp[layer].componentStyles.toggle"></toggle> </span></td></tr>
|
||||
`
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue