diff --git a/demo.html b/demo.html index 828d38c..640043a 100644 --- a/demo.html +++ b/demo.html @@ -162,6 +162,7 @@



+
@@ -191,8 +192,4 @@
-<<<<<<< HEAD - -======= - ->>>>>>> dev3 + \ No newline at end of file diff --git a/index.html b/index.html index 997628e..628c1fe 100644 --- a/index.html +++ b/index.html @@ -162,7 +162,7 @@



- +
diff --git a/js/Demo/demoLayers.js b/js/Demo/demoLayers.js index 2889d72..f83bfc0 100644 --- a/js/Demo/demoLayers.js +++ b/js/Demo/demoLayers.js @@ -41,6 +41,11 @@ addLayer("c", { eff.waffleBoost = eff.waffleBoost.times(buyableEffect(this.layer, 11).first) return "which are boosting waffles by "+format(eff.waffleBoost)+" and increasing the Ice Cream cap by "+format(eff.icecreamCap) }, + infoboxes:{ + coolInfo: { + text: "momo" + } + }, milestones: { 0: {requirementDescription: "3 Lollipops", done() {return player[this.layer].best.gte(3)}, // Used to determine when to give the milestone @@ -305,6 +310,7 @@ addLayer("c", { }, jail: { content: [ + ["infobox", "coolInfo"], ["bar", "longBoi"], "blank", ["row", [ ["column", [ diff --git a/js/layerSupport.js b/js/layerSupport.js index eae6060..75976d0 100644 --- a/js/layerSupport.js +++ b/js/layerSupport.js @@ -109,7 +109,15 @@ function updateLayers(){ layers[layer].bars[thing].layer = layer if (layers[layer].bars[thing].unlocked === undefined) layers[layer].bars[thing].unlocked = true - + } + } + + if (layers[layer].infoboxes){ + for (thing in layers[layer].infoboxes){ + layers[layer].infoboxes[thing].id = thing + layers[layer].infoboxes[thing].layer = layer + if (layers[layer].infoboxes[thing].unlocked === undefined) + layers[layer].infoboxes[thing].unlocked = true } } diff --git a/js/utils.js b/js/utils.js index 1bc1c08..888912c 100644 --- a/js/utils.js +++ b/js/utils.js @@ -106,6 +106,8 @@ function getStartPlayer() { for (thing in extradata) playerdata[thing] = extradata[thing] } + + playerdata.infoboxes = {} for (layer in layers){ playerdata[layer] = layers[layer].startData() playerdata[layer].buyables = getStartBuyables(layer) @@ -124,7 +126,11 @@ function getStartPlayer() { for (item in layers[layer].microtabs) playerdata.subtabs[layer][item] = Object.keys(layers[layer].microtabs[item])[0] } - playerdata[layer].loreHidden = false + if (layers[layer].infoboxes) { + if (playerdata.infoboxes[layer] == undefined) playerdata.infoboxes[layer] = {} + for (item in layers[layer].infoboxes) + playerdata.infoboxes[layer][item] = false + } } return playerdata } diff --git a/js/v.js b/js/v.js index 25f7162..bb7f215 100644 --- a/js/v.js +++ b/js/v.js @@ -69,17 +69,17 @@ function loadVue() { ` }) - Vue.component('lore', { + Vue.component('infobox', { props: ['layer', 'data'], template: ` -
+
-
- +
+
`