diff --git a/changelog.md b/changelog.md index 8c498ee..a319b01 100644 --- a/changelog.md +++ b/changelog.md @@ -1,10 +1,11 @@ # The Modding Tree changelog: -# v2.4.2 (beta) +# v2.5 (beta) - Optimizations, hopefully a significant amount. - Added OOM/s point gen display at high values (thanks to Ducdat!) - Only one tab will display if the window is not wide enough (also thanks to Ducdat!) - Layer nodes will be highlighted even if the player is on the same tab. +- Added customizable node glowColor. - Added buyable purchaseLimit. - Amount is automatically supplied to buyable cost and effect functions. - Locked (not yet visible) milestones no longer take up space. Also fixed hidden milestones taking a tiny bit of space. diff --git a/docs/layer-features.md b/docs/layer-features.md index a1ac761..a33f792 100644 --- a/docs/layer-features.md +++ b/docs/layer-features.md @@ -155,6 +155,8 @@ You can make almost any value dynamic by using a function in its place, includin - shouldNotify: **optional**. A function to return true if this layer should be highlighted in the tree. The layer will automatically be highlighted if you can buy an upgrade whether you have this or not. +- glowColor: **optional**. The color that this layer will be highlighted if it should notify. The default is red. You can use this if you want several different notification types! + - componentStyles: **optional**. An object that contains a set of functions returning CSS objects. Each of these will be applied to any components on the layer with the type of its id. Example: ```js diff --git a/js/Demo/demoLayers.js b/js/Demo/demoLayers.js index 0758451..e381aa0 100644 --- a/js/Demo/demoLayers.js +++ b/js/Demo/demoLayers.js @@ -355,6 +355,7 @@ addLayer("c", { 'color': '#3325CC', 'text-decoration': 'underline' }}, + glowColor: "orange", // If the node is highlighted, it will be this color (default is red) componentStyles: { "challenge"() {return {'height': '200px'}}, "prestige-button"() {return {'color': '#AA66AA'}}, diff --git a/js/technical/displays.js b/js/technical/displays.js index 1c81bef..109ccb1 100644 --- a/js/technical/displays.js +++ b/js/technical/displays.js @@ -18,6 +18,8 @@ function constructNodeStyle(layer){ style.push({'background-color': tmp[layer].color}) if (tmp[layer].image !== undefined) style.push({'background-image': 'url("' + tmp[layer].image + '")'}) + if(tmp[layer].glowColor !== undefined && tmp[layer].notify && player[layer].unlocked) + style.push({'box-shadow': 'var(--hqProperty2a), 0 0 20px ' + tmp[layer].glowColor}) style.push(tmp[layer].nodeStyle) return style }