diff --git a/changelog.md b/changelog.md index 9747099..934e0bb 100644 --- a/changelog.md +++ b/changelog.md @@ -3,12 +3,14 @@ ### v2.6 - 6/2/21 - Fixed issues with NaN checking. Saves should never break now unless something really unusual happens. - Added a drop-down menu component! +- Added upgrade-tree component! - Options are now saved separately, and not affected by hard resetting or importing saves. - Fixed demo.html - Fixed branches not working on the right tab. - Fixed background color not working on the left tab. - Fixed branches not updating when tree tab is not shown. - You can now use "this" in tabFormat! +- Added per-row displaying for achievements, challenges, milestones, grids - Added onComplete for milestones. - Added addBuyables. - The prestige/sec display now shows decimals. diff --git a/docs/custom-tab-layouts.md b/docs/custom-tab-layouts.md index ceb4079..5aa0b40 100644 --- a/docs/custom-tab-layouts.md +++ b/docs/custom-tab-layouts.md @@ -66,6 +66,8 @@ These are the existing components, but you can create more in [components.js](/j - tree: Displays a tree. The argument is an array of arrays containing the names of the nodes in the tree (first by row, then by column) [See here for more information on tree layouts and nodes!](trees-and-tree-customization.md) +- upgrade-tree: Displays a of upgrades from this layer. The argument is an array of arrays containing the ids of the upgrades in the tree (first by row, then by column) + - toggle: A toggle button that toggles a bool value. The argument is a pair that identifies the location in player of the bool to toggle, e.g. `[layer, id]`. 'layer' also affects the color of the toggle. - grid: Displays the gridable grid for the layer. If you need more than one grid, use a layer proxy. diff --git a/docs/upgrades.md b/docs/upgrades.md index 9a9f413..3642e09 100644 --- a/docs/upgrades.md +++ b/docs/upgrades.md @@ -61,4 +61,6 @@ If you want to do something more complicated like upgrades that cost two currenc - canAfford(): **OVERRIDE**, a function determining if you are able to buy the upgrade -- pay(): **OVERRIDE**, a function that reduces your currencies when you buy the upgrade \ No newline at end of file +- pay(): **OVERRIDE**, a function that reduces your currencies when you buy the upgrade + +- branches: **optional**, This is primarially useful for upgrade trees. An array of upgrade ids. A line will appear from this upgrade to all of the upgrades in the list. Alternatively, an entry in the array can be a 2-element array consisting of the upgrade id and a color value. The color value can either be a string with a hex color code, or a number from 1-3 (theme-affected colors). \ No newline at end of file diff --git a/js/components.js b/js/components.js index a3711d4..a86cb9a 100644 --- a/js/components.js +++ b/js/components.js @@ -121,11 +121,11 @@ function loadVue() { }) Vue.component('challenges', { - props: ['layer'], + props: ['layer', 'data'], template: `
-
-
+
+
@@ -186,11 +186,11 @@ function loadVue() { }) Vue.component('milestones', { - props: ['layer'], + props: ['layer', 'data'], template: `
- +
@@ -377,7 +377,7 @@ function loadVue() { props: ['layer', 'data'], template: `
-
+
@@ -461,10 +461,10 @@ function loadVue() { Vue.component('achievements', { - props: ['layer'], + props: ['layer', 'data'], template: `
-
+