mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-22 00:21:32 +00:00
commit
3a76dae4ad
5 changed files with 33 additions and 5 deletions
|
@ -1,5 +1,10 @@
|
||||||
#The Modding Tree changelog:
|
#The Modding Tree changelog:
|
||||||
|
|
||||||
|
|
||||||
|
##v1.3.4: 10/8/20
|
||||||
|
- Added "midsection" feature to add things to a tab's layout while still keeping the standard layout.
|
||||||
|
- Fix for being able to buy more buyables than you should.
|
||||||
|
|
||||||
##v1.3.3: - 10/7/20
|
##v1.3.3: - 10/7/20
|
||||||
- Fix for the "order of operations" issue in temp.
|
- Fix for the "order of operations" issue in temp.
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ Key:
|
||||||
|
|
||||||
- layerShown(): A function returning a bool which determines if this layer's node should be visible on the tree.
|
- layerShown(): A function returning a bool which determines if this layer's node should be visible on the tree.
|
||||||
|
|
||||||
- hotkeys: An array containing information on any hotkeys associated with this layer:
|
- hotkeys: **optional**, An array containing information on any hotkeys associated with this layer:
|
||||||
```js
|
```js
|
||||||
hotkeys: [
|
hotkeys: [
|
||||||
{key: "p", // What the hotkey button is. Use uppercase if it's combined with shift, or "ctrl+x" if ctrl is.
|
{key: "p", // What the hotkey button is. Use uppercase if it's combined with shift, or "ctrl+x" if ctrl is.
|
||||||
|
@ -51,12 +51,15 @@ Key:
|
||||||
],
|
],
|
||||||
```
|
```
|
||||||
|
|
||||||
- style(): A function returning a CSS object containing any CSS that should affect this layer's whole tab.
|
- style(): **optional**, a function returning a CSS object containing any CSS that should affect this layer's whole tab.
|
||||||
|
|
||||||
- tabFormat: Use this if you want to add extra things to your tab or change the layout.
|
- tabFormat: **optional**, use this if you want to add extra things to your tab or change the layout. [See here for more info.](custom-tab-layouts.md)
|
||||||
|
|
||||||
|
- midsection: **optional**, an alternative to tabFormat, which is inserted in between Milestones and Buyables in the
|
||||||
|
standard tab layout. (cannot do subtabs)
|
||||||
|
|
||||||
|
|
||||||
# Big features
|
# Big features (all optional)
|
||||||
|
|
||||||
- upgrades: A grid of one-time purchases which can have unique upgrade conditions, currency costs, and bonuses.
|
- 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)
|
[Explanations are in a separate file.](upgrades.md)
|
||||||
|
|
|
@ -170,6 +170,9 @@
|
||||||
<span v-if="player[layer].best != undefined">Your best {{layers[layer].resource}} is {{formatWhole(player[layer].best)}}<br></span>
|
<span v-if="player[layer].best != undefined">Your best {{layers[layer].resource}} is {{formatWhole(player[layer].best)}}<br></span>
|
||||||
<span v-if="player[layer].total != undefined">You have made a total of {{formatWhole(player[layer].total)}} {{layers[layer].resource}}<br></span>
|
<span v-if="player[layer].total != undefined">You have made a total of {{formatWhole(player[layer].total)}} {{layers[layer].resource}}<br></span>
|
||||||
<milestones v-bind:style="tmp.componentStyles[layer].milestones" :layer="layer"></milestones>
|
<milestones v-bind:style="tmp.componentStyles[layer].milestones" :layer="layer"></milestones>
|
||||||
|
<div v-if="Array.isArray(layers[layer].midsection)">
|
||||||
|
<column :layer="layer" :data="layers[layer].midsection"></column>
|
||||||
|
</div>
|
||||||
<buyables v-bind:style="tmp.componentStyles[layer].buyables" :layer="layer"></buyables>
|
<buyables v-bind:style="tmp.componentStyles[layer].buyables" :layer="layer"></buyables>
|
||||||
<upgrades v-bind:style="tmp.componentStyles[layer]['upgrades']" :layer="layer"></upgrades>
|
<upgrades v-bind:style="tmp.componentStyles[layer]['upgrades']" :layer="layer"></upgrades>
|
||||||
<challs v-bind:style="tmp.componentStyles[layer]['challs']" :layer="layer"></challs>
|
<challs v-bind:style="tmp.componentStyles[layer]['challs']" :layer="layer"></challs>
|
||||||
|
|
12
js/game.js
12
js/game.js
|
@ -229,6 +229,7 @@ function respecBuyables(layer) {
|
||||||
if (!layers[layer].buyables.respec) return
|
if (!layers[layer].buyables.respec) return
|
||||||
if (!confirm("Are you sure you want to respec? This will force you to do a \"" + (layers[layer].name ? layers[layer].name : layer) + "\" reset as well!")) return
|
if (!confirm("Are you sure you want to respec? This will force you to do a \"" + (layers[layer].name ? layers[layer].name : layer) + "\" reset as well!")) return
|
||||||
layers[layer].buyables.respec()
|
layers[layer].buyables.respec()
|
||||||
|
updateBuyableTemp(layer)
|
||||||
}
|
}
|
||||||
|
|
||||||
function canAffordUpg(layer, id) {
|
function canAffordUpg(layer, id) {
|
||||||
|
@ -305,12 +306,23 @@ function buyUpg(layer, id) {
|
||||||
upg.onPurchase()
|
upg.onPurchase()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function buyMaxBuyable(layer, id) {
|
||||||
|
if (!player[layer].unl) return
|
||||||
|
if (!tmp.buyables[layer][id].unl) return
|
||||||
|
if (!tmp.buyables[layer][id].canAfford) return
|
||||||
|
if (!layers[layer].buyables[id].buyMax) return
|
||||||
|
|
||||||
|
layers[layer].buyables[id].buyMax()
|
||||||
|
updateBuyableTemp(layer)
|
||||||
|
}
|
||||||
|
|
||||||
function buyBuyable(layer, id) {
|
function buyBuyable(layer, id) {
|
||||||
if (!player[layer].unl) return
|
if (!player[layer].unl) return
|
||||||
if (!tmp.buyables[layer][id].unl) return
|
if (!tmp.buyables[layer][id].unl) return
|
||||||
if (!tmp.buyables[layer][id].canAfford) return
|
if (!tmp.buyables[layer][id].canAfford) return
|
||||||
|
|
||||||
layers[layer].buyables[id].buy()
|
layers[layer].buyables[id].buy()
|
||||||
|
updateBuyableTemp(layer)
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetRow(row) {
|
function resetRow(row) {
|
||||||
|
|
|
@ -298,10 +298,15 @@ addLayer("f", {
|
||||||
return ("This weird farmer dinosaur will only see you if you have at least " + this.requires() + " candies. You only have " + formatWhole(player.points))
|
return ("This weird farmer dinosaur will only see you if you have at least " + this.requires() + " candies. You only have " + formatWhole(player.points))
|
||||||
},
|
},
|
||||||
|
|
||||||
|
midsection: [
|
||||||
|
"blank", ['display-image', 'https://images.beano.com/store/24ab3094eb95e5373bca1ccd6f330d4406db8d1f517fc4170b32e146f80d?auto=compress%2Cformat&dpr=1&w=390'],
|
||||||
|
["display-text", "Bork bork!"]
|
||||||
|
],
|
||||||
|
|
||||||
// The following are only currently used for "custom" Prestige type:
|
// The following are only currently used for "custom" Prestige type:
|
||||||
prestigeButtonText() { //Is secretly HTML
|
prestigeButtonText() { //Is secretly HTML
|
||||||
if (!this.canBuyMax()) return "Hi! I'm a <u>weird dinosaur</u> and I'll give you a Farm Point in exchange for all of your candies and lollipops! (At least " + formatWhole(tmp.nextAt[layer]) + " candies)"
|
if (!this.canBuyMax()) return "Hi! I'm a <u>weird dinosaur</u> and I'll give you a Farm Point in exchange for all of your candies and lollipops! (At least " + formatWhole(tmp.nextAt[layer]) + " candies)"
|
||||||
if (this.canBuyMax()) return "Hi! I'm a <u>weird dinosaur</u> and I'll give you <b>" + formatWhole(tmp.resetGain[this.layer]) + "</b> Farm Points in exchange for all of your candies and lollipops! (You'll get another one at " + format(tmp.nextAt[layer]) + " candies)"
|
if (this.canBuyMax()) return "Hi! I'm a <u>weird dinosaur</u> and I'll give you <b>" + formatWhole(tmp.resetGain[this.layer]) + "</b> Farm Points in exchange for all of your candies and lollipops! (You'll get another one at " + formatWhole(tmp.nextAtDisp[layer]) + " candies)"
|
||||||
},
|
},
|
||||||
getResetGain() {
|
getResetGain() {
|
||||||
return getResetGain(this.layer, useType = "static")
|
return getResetGain(this.layer, useType = "static")
|
||||||
|
|
Loading…
Reference in a new issue