From f9740d423146fafa83a85704580368cdc1131377 Mon Sep 17 00:00:00 2001 From: msg-programs Date: Sun, 16 Jul 2023 14:44:32 +0200 Subject: POC for JSON-based tabhud config. --- .../assets/skyblocker/tabhud/assignment.json | 11 +++ .../assets/skyblocker/tabhud/empty_screen.json | 17 +++++ .../skyblocker/tabhud/garden_info_screen.json | 88 ++++++++++++++++++++++ .../skyblocker/tabhud/generic_info_screen.json | 69 +++++++++++++++++ 4 files changed, 185 insertions(+) create mode 100644 src/main/resources/assets/skyblocker/tabhud/assignment.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/empty_screen.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/garden_info_screen.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/generic_info_screen.json (limited to 'src/main/resources') diff --git a/src/main/resources/assets/skyblocker/tabhud/assignment.json b/src/main/resources/assets/skyblocker/tabhud/assignment.json new file mode 100644 index 00000000..a7b8dd80 --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/assignment.json @@ -0,0 +1,11 @@ +{ + "screenA": { + "default": "generic_info_screen" + }, + "screenB": { + "default": "empty_screen" + }, + "screenC": { + "default": "empty_screen" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/empty_screen.json b/src/main/resources/assets/skyblocker/tabhud/empty_screen.json new file mode 100644 index 00000000..0252940a --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/empty_screen.json @@ -0,0 +1,17 @@ +{ + "widgets": [ + { + "name": "EmptyWidget", + "alias": "ew" + } + ], + "layout": [ + { + "op": "place", + "where": "center", + "apply_to": [ + "ew" + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/garden_info_screen.json b/src/main/resources/assets/skyblocker/tabhud/garden_info_screen.json new file mode 100644 index 00000000..3ddfdfc3 --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/garden_info_screen.json @@ -0,0 +1,88 @@ +{ + "widgets":[ + { + "name": "GardenSkillsWidget", + "alias": "gsw", + "args": null + }, + { + "name": "EventWidget", + "alias": "evw", + "args": true + }, + { + "name": "UpgradeWidget", + "alias": "uw", + "args": null + }, + { + "name": "ProfileWidget", + "alias": "pw", + "args": null + }, + { + "name": "EffectWidget", + "alias": "efw", + "args": null + }, + { + "name": "JacobsContestWidget", + "alias": "jcw", + "args": null + }, + { + "name": "CookieWidget", + "alias": "cw", + "args": null + } + ], + "layout": [ + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["gsw", "evw", "uw"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["pw", "efw"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["jcw", "cw"] + }, + { + "op": "align", + "align": "center", + "apply_to": ["gsw", "evw", "uw"] + }, + { + "op": "collideAgainst", + "direction": "left", + "widget": "pw", + "colliders": ["gsw", "evw", "uw"] + }, + { + "op": "collideAgainst", + "direction": "left", + "widget": "efw", + "colliders": ["gsw", "evw", "uw"] + }, + { + "op": "collideAgainst", + "direction": "right", + "widget": "jcw", + "colliders": ["gsw", "evw", "uw"] + }, + { + "op": "collideAgainst", + "direction": "right", + "widget": "cw", + "colliders": ["gsw", "evw", "uw"] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/generic_info_screen.json b/src/main/resources/assets/skyblocker/tabhud/generic_info_screen.json new file mode 100644 index 00000000..27a28008 --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/generic_info_screen.json @@ -0,0 +1,69 @@ +{ + "widgets":[ + { + "name": "SkillsWidget", + "alias": "sw" + }, + { + "name": "EventWidget", + "alias": "evw" + }, + { + "name": "UpgradeWidget", + "alias": "uw" + }, + { + "name": "ProfileWidget", + "alias": "pw" + }, + { + "name": "EffectWidget", + "alias": "efw" + }, + { + "name": "ElectionWidget", + "alias": "elw" + }, + { + "name": "CookieWidget", + "alias": "cw" + } + ], + "layout": [ + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["sw", "evw", "uw"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["pw", "efw"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["elw", "cw"] + }, + { + "op": "align", + "reference": "horizontalCenter", + "apply_to": ["sw", "evw", "uw"] + }, + { + "op": "collideAgainst", + "direction": "left", + "widgets": ["pw", "efw"], + "colliders": ["sw", "evw", "uw"] + }, + { + "op": "collideAgainst", + "direction": "right", + "widgets": ["elw", "cw"], + "colliders": ["sw", "evw", "uw"] + } + ] +} \ No newline at end of file -- cgit From 384d9954aedefcee6f132d2bdadca11fca682bd7 Mon Sep 17 00:00:00 2001 From: msg-programs Date: Sun, 23 Jul 2023 12:29:32 +0200 Subject: Massive refactor, see details Instead of creating a new widget instance every frame, instantiate once and update content. This means that every widget had to be updated to work like that. This also necessitated some ugly hackery for the dwarven HUD. Many other minor things like moving and renaming classes --- .../assets/skyblocker/tabhud/assignment.json | 6 +- .../skyblocker/tabhud/garden_info_screen.json | 88 --------------- .../skyblocker/tabhud/generic_info_screen.json | 69 ------------ .../skyblocker/tabhud/info/garden_info_screen.json | 70 ++++++++++++ .../tabhud/info/generic_info_screen.json | 70 ++++++++++++ .../skyblocker/tabhud/info/rift_info_screen.json | 48 ++++++++ .../resources/assets/skyblocker/tabhud/readme.md | 100 +++++++++++++++++ .../assets/skyblocker/tabhud/test_screen.json | 122 +++++++++++++++++++++ 8 files changed, 413 insertions(+), 160 deletions(-) delete mode 100644 src/main/resources/assets/skyblocker/tabhud/garden_info_screen.json delete mode 100644 src/main/resources/assets/skyblocker/tabhud/generic_info_screen.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/info/garden_info_screen.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/info/generic_info_screen.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/info/rift_info_screen.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/readme.md create mode 100644 src/main/resources/assets/skyblocker/tabhud/test_screen.json (limited to 'src/main/resources') diff --git a/src/main/resources/assets/skyblocker/tabhud/assignment.json b/src/main/resources/assets/skyblocker/tabhud/assignment.json index a7b8dd80..85c8f938 100644 --- a/src/main/resources/assets/skyblocker/tabhud/assignment.json +++ b/src/main/resources/assets/skyblocker/tabhud/assignment.json @@ -1,11 +1,11 @@ { - "screenA": { + "standard" : { "default": "generic_info_screen" }, - "screenB": { + "screenA": { "default": "empty_screen" }, - "screenC": { + "screenB": { "default": "empty_screen" } } \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/garden_info_screen.json b/src/main/resources/assets/skyblocker/tabhud/garden_info_screen.json deleted file mode 100644 index 3ddfdfc3..00000000 --- a/src/main/resources/assets/skyblocker/tabhud/garden_info_screen.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "widgets":[ - { - "name": "GardenSkillsWidget", - "alias": "gsw", - "args": null - }, - { - "name": "EventWidget", - "alias": "evw", - "args": true - }, - { - "name": "UpgradeWidget", - "alias": "uw", - "args": null - }, - { - "name": "ProfileWidget", - "alias": "pw", - "args": null - }, - { - "name": "EffectWidget", - "alias": "efw", - "args": null - }, - { - "name": "JacobsContestWidget", - "alias": "jcw", - "args": null - }, - { - "name": "CookieWidget", - "alias": "cw", - "args": null - } - ], - "layout": [ - { - "op": "stack", - "direction": "vertical", - "align": "center", - "apply_to": ["gsw", "evw", "uw"] - }, - { - "op": "stack", - "direction": "vertical", - "align": "center", - "apply_to": ["pw", "efw"] - }, - { - "op": "stack", - "direction": "vertical", - "align": "center", - "apply_to": ["jcw", "cw"] - }, - { - "op": "align", - "align": "center", - "apply_to": ["gsw", "evw", "uw"] - }, - { - "op": "collideAgainst", - "direction": "left", - "widget": "pw", - "colliders": ["gsw", "evw", "uw"] - }, - { - "op": "collideAgainst", - "direction": "left", - "widget": "efw", - "colliders": ["gsw", "evw", "uw"] - }, - { - "op": "collideAgainst", - "direction": "right", - "widget": "jcw", - "colliders": ["gsw", "evw", "uw"] - }, - { - "op": "collideAgainst", - "direction": "right", - "widget": "cw", - "colliders": ["gsw", "evw", "uw"] - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/generic_info_screen.json b/src/main/resources/assets/skyblocker/tabhud/generic_info_screen.json deleted file mode 100644 index 27a28008..00000000 --- a/src/main/resources/assets/skyblocker/tabhud/generic_info_screen.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "widgets":[ - { - "name": "SkillsWidget", - "alias": "sw" - }, - { - "name": "EventWidget", - "alias": "evw" - }, - { - "name": "UpgradeWidget", - "alias": "uw" - }, - { - "name": "ProfileWidget", - "alias": "pw" - }, - { - "name": "EffectWidget", - "alias": "efw" - }, - { - "name": "ElectionWidget", - "alias": "elw" - }, - { - "name": "CookieWidget", - "alias": "cw" - } - ], - "layout": [ - { - "op": "stack", - "direction": "vertical", - "align": "center", - "apply_to": ["sw", "evw", "uw"] - }, - { - "op": "stack", - "direction": "vertical", - "align": "center", - "apply_to": ["pw", "efw"] - }, - { - "op": "stack", - "direction": "vertical", - "align": "center", - "apply_to": ["elw", "cw"] - }, - { - "op": "align", - "reference": "horizontalCenter", - "apply_to": ["sw", "evw", "uw"] - }, - { - "op": "collideAgainst", - "direction": "left", - "widgets": ["pw", "efw"], - "colliders": ["sw", "evw", "uw"] - }, - { - "op": "collideAgainst", - "direction": "right", - "widgets": ["elw", "cw"], - "colliders": ["sw", "evw", "uw"] - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/info/garden_info_screen.json b/src/main/resources/assets/skyblocker/tabhud/info/garden_info_screen.json new file mode 100644 index 00000000..3e1556ef --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/info/garden_info_screen.json @@ -0,0 +1,70 @@ +{ + "widgets":[ + { + "name": "GardenSkillsWidget", + "alias": "gsw" + }, + { + "name": "EventWidget", + "alias": "evw", + "inGarden": true + }, + { + "name": "UpgradeWidget", + "alias": "uw" + }, + { + "name": "ProfileWidget", + "alias": "pw" + }, + { + "name": "EffectWidget", + "alias": "efw" + }, + { + "name": "JacobsContestWidget", + "alias": "jcw" + }, + { + "name": "CookieWidget", + "alias": "cw" + } + ], + "layout": [ + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["gsw", "evw", "uw"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["pw", "efw"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["jcw", "cw"] + }, + { + "op": "align", + "reference": "horizontalCenter", + "apply_to": ["gsw", "evw", "uw"] + }, + { + "op": "collideAgainst", + "direction": "left", + "widgets": ["pw", "efw"], + "colliders": ["gsw", "evw", "uw"] + }, + { + "op": "collideAgainst", + "direction": "right", + "widgets": ["jcw", "cw"], + "colliders": ["gsw", "evw", "uw"] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/info/generic_info_screen.json b/src/main/resources/assets/skyblocker/tabhud/info/generic_info_screen.json new file mode 100644 index 00000000..dcfa5138 --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/info/generic_info_screen.json @@ -0,0 +1,70 @@ +{ + "widgets":[ + { + "name": "SkillsWidget", + "alias": "sw" + }, + { + "name": "EventWidget", + "alias": "evw", + "inGarden": false + }, + { + "name": "UpgradeWidget", + "alias": "uw" + }, + { + "name": "ProfileWidget", + "alias": "pw" + }, + { + "name": "EffectWidget", + "alias": "efw" + }, + { + "name": "ElectionWidget", + "alias": "elw" + }, + { + "name": "CookieWidget", + "alias": "cw" + } + ], + "layout": [ + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["sw", "evw", "uw"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["pw", "efw"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["elw", "cw"] + }, + { + "op": "align", + "reference": "horizontalCenter", + "apply_to": ["sw", "evw", "uw"] + }, + { + "op": "collideAgainst", + "direction": "left", + "widgets": ["pw", "efw"], + "colliders": ["sw", "evw", "uw"] + }, + { + "op": "collideAgainst", + "direction": "right", + "widgets": ["elw", "cw"], + "colliders": ["sw", "evw", "uw"] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/info/rift_info_screen.json b/src/main/resources/assets/skyblocker/tabhud/info/rift_info_screen.json new file mode 100644 index 00000000..3eda517d --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/info/rift_info_screen.json @@ -0,0 +1,48 @@ +{ + "widgets":[ + { + "name": "RiftProfileWidget", + "alias": "profile" + }, + { + "name": "RiftStatsWidget", + "alias": "stats" + }, + { + "name": "ShenWidget", + "alias": "shen" + }, + { + "name": "CookieWidget", + "alias": "cookie" + }, + { + "name": "AdvertisementWidget", + "alias": "ad" + } + ], + "layout": [ + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["stats", "ad"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["profile", "shen", "cookie"] + }, + { + "op": "align", + "reference": "leftOfCenter", + "apply_to": ["stats", "ad"] + }, + { + "op": "align", + "direction": "rightOfCenter", + "apply_to": ["profile", "shen", "cookie"] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/readme.md b/src/main/resources/assets/skyblocker/tabhud/readme.md new file mode 100644 index 00000000..7167f561 --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/readme.md @@ -0,0 +1,100 @@ +# assignment.json +Assigns the screens to a type (standard, screenA, screenB). standard is shown when just pressing tab, A and B are shown when using other keys/the modifiers. +For every type, the concrete screens are mapped to the areas they are supposed to be shown in. See Appendix A for a list of valid areas. +To find the screen definition, ".json" is appended to the screen key, so specifying `"foo": "generic_info_screen"` will try to find `generic_info_screen.json` and assign this definition to the "foo" area. + +# Screen definition JSON +This file consists of one widgets section and one layout section. + +## Widget section +The widget section defines all of the widgets that a screen uses. It also defines an alias that is used in the layout section and possibly a widget's argument if its behaviour can be changed by one. +For a full list of widgets, their names and their arguments see Appendix B + +## Layout section +The layout section defines how the widgets are arranged on the screen. This is done using a pipeline; an ordered list of stages where each stage moves the widgets in some way. The initial position of the widgets is undefined. As a rule of thumb, every stage (except "Place", see below) only moves the widget in one direction, so at least two operations need to be done executed on each widget for it to be in a well defined position. A full list of operations and their arguments is found in Appendix C. + +# Appendices + +## Appendix A: Area identifiers +- default: Any area not explicitly listed in the type. + +## Appendix B: Widget identifiers and arguments + +- EmptyWidget: Generic "No data available" +- SkillsWidget: The player's skill levels and stats +- EventWidget: Info about current events. Arg `inGarden: true|false`: Is this widget displayed in the garden area? +- UpgradeWidget: Currently running upgrades +- ProfileWidget: Data about the player's profile +- EffectWidget: Currently active effects +- ElectionWidget: Info about the current mayor election +- CookieWidget: Info about your super cookie + +## Appendix C: Pipeline stages + +#### Align +- op: `align` +- reference: One of `horizontalCenter`, `verticalCenter`, `leftOfCenter`, `rightOfCenter`, `topOfCenter`, `botOfCenter` +- apply_to: List of widgets to individually apply this operation to. +- Moves a widget in *one* direction (up/down OR left/right) until it's positioned in the way described by `reference`. This reference may be thought of as a straight line, with some describing the screen's borders and others referring to it's two center axis. + +Example: align A and B with "horizontalCenter" +``` ++-----------+ +-----------+ +| | | | +| A | | -> A | +| | --> | | +| | | | +| B| | B <- | ++-----------+ +-----------+ +``` + +#### Collide +- op: `collideAgainst` +- direction: One of `left`, `right` +- widgets: List of widgets to individually move. +- colliders: List static reference widgets to "collide against". +- Moves a widget in the `direction` until it would overlap with any one of the colliders. Doesn't move the widget in the other direction, doesn't move the widget if it wouldn't collide with anything. + +Example: Collide A and B from the right with X, Y and Z +``` ++-----------+ +-----------+ +| A | | A | +| A XX | | -> AXX | +| XX | --> | XX | +| Y | | Y | +| Y BB| | -> BBY | ++-----------+ +-----------+ +``` + +#### Stack +- op: `stack` +- direction: One of `vertical`, `horizontal` +- align: One of `center`, `top`, `bot`, `left`, `right` +- apply_to: List of widgets to stack, order of the list is important (top -> bot or left -> right) +- Move the widgets vertically or horizontally as indicated by the `direction`. `align` indicates if the list is touching a screen border or is centered on the screen. This only works with borders in the direction of the stacking; combinations such as `vertical`/`left` are considered invalid and act like `align` was set to `center`. This only moves the widget in one direction so in order to get a clean list, an Align operation must be executed as well. + +Example: Stack A, B, C vertically/center-aligned, then align with leftOfCenter +``` ++-----------+ +-----------+ +-----------+ +| A | | v | | | +| | stack | A | align | -> A | +| C | --> | v B | --> | B <- | +| | | C ^ | | C <- | +| B | | | | | ++-----------+ +-----------+ +-----------+ +``` + +#### Place +- op: `place` +- where: One of `center` +- apply_to: Widget to place an the indicated position. +- Places a widget at some position, moving it in any direction as needed. Only makes sense to use on one widget at a time, as applying the same Place op to multiple widgtes causes them to be on top of each other. + +Example: Place A at "center" ++-----------+ +-----------+ +| | | | +| A | | -> v | +| | --> | A | +| | | | +| | | | ++-----------+ +-----------+ \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/test_screen.json b/src/main/resources/assets/skyblocker/tabhud/test_screen.json new file mode 100644 index 00000000..2ffa802d --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/test_screen.json @@ -0,0 +1,122 @@ +{ + "widgets": [ + { + "name": "EmptyWidget", + "alias": "ew1" + }, + { + "name": "EmptyWidget", + "alias": "ew2" + }, + { + "name": "EffectWidget", + "alias": "ew3" + }, + { + "name": "EffectWidget", + "alias": "ew4" + }, + { + "name": "CookieWidget", + "alias": "ew5" + }, + { + "name": "CookieWidget", + "alias": "ew6" + }, + { + "name": "UpgradeWidget", + "alias": "ew7" + }, + { + "name": "UpgradeWidget", + "alias": "ew8" + }, + { + "name": "FireSaleWidget", + "alias": "ew9" + }, + { + "name": "FireSaleWidget", + "alias": "ew10" + }, + { + "name": "EventWidget", + "alias": "ew11", + "inGarden": true + }, + { + "name": "EventWidget", + "alias": "ew12", + "inGarden": true + } + ], + "layout": [ + { + "op": "stack", + "direction": "vertical", + "align": "top", + "apply_to": ["ew1", "ew2"] + }, + { + "op": "align", + "reference": "leftOfCenter", + "apply_to": ["ew1", "ew2"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["ew3", "ew4"] + }, + { + "op": "align", + "reference": "horizontalCenter", + "apply_to": ["ew3", "ew4"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "bot", + "apply_to": ["ew5", "ew6"] + }, + { + "op": "align", + "reference": "rightOfCenter", + "apply_to": ["ew5", "ew6"] + }, + { + "op": "stack", + "direction": "horizontal", + "align": "left", + "apply_to": ["ew7", "ew8"] + }, + { + "op": "align", + "reference": "topOfCenter", + "apply_to": ["ew7", "ew8"] + }, + { + "op": "stack", + "direction": "horizontal", + "align": "center", + "apply_to": ["ew9", "ew10"] + }, + { + "op": "align", + "reference": "verticalCenter", + "apply_to": ["ew9", "ew10"] + }, + { + "op": "stack", + "direction": "horizontal", + "align": "right", + "apply_to": ["ew11", "ew12"] + }, + { + "op": "align", + "reference": "botOfCenter", + "apply_to": ["ew11", "ew12"] + } + ] +} \ No newline at end of file -- cgit From c2f5155391482368425b61517848f4a11080dcf7 Mon Sep 17 00:00:00 2001 From: msg-programs Date: Thu, 27 Jul 2023 22:09:53 +0200 Subject: Misc fixes and changes --- src/main/resources/assets/skyblocker/lang/en_us.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/resources') diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index 0cf9933c..8a30cf63 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -1,9 +1,9 @@ { "key.categories.skyblocker": "Skyblocker", "key.hotbarSlotLock": "Slot Lock (Hotbar)", - "key.skyblocker.playerTgl": "Switch tab HUD to player list", + "key.skyblocker.toggleB": "Toggle tab HUD to screen B", "key.skyblocker.defaultTgl": "Switch tab HUD to default view", - "key.skyblocker.genericTgl": "Switch tab HUD to general info", + "key.skyblocker.toggleA": "Toggle tab HUD to screen A", "key.wikiLookup": "Wiki Lookup", "text.autoconfig.skyblocker.title": "Skyblocker Settings", -- cgit From 393ec5f59d16296248fe1994d02ced699a725fcb Mon Sep 17 00:00:00 2001 From: msg-programs Date: Thu, 27 Jul 2023 22:14:54 +0200 Subject: Load layout from resoure packs, see details. Use resource pack logic to load the layouts. Finally delete the old screen defs, replace with builtin layout JSON files. Include a top-aligned layout as a builtin resource pack. Implement more possibilites for the layout to support said pack. --- .../assets/skyblocker/tabhud/assignment.json | 11 -- .../assets/skyblocker/tabhud/empty_screen.json | 17 --- .../skyblocker/tabhud/info/garden_info_screen.json | 70 ------------ .../tabhud/info/generic_info_screen.json | 70 ------------ .../skyblocker/tabhud/info/rift_info_screen.json | 48 -------- .../resources/assets/skyblocker/tabhud/readme.md | 27 +++-- .../assets/skyblocker/tabhud/screenA/default.json | 70 ++++++++++++ .../assets/skyblocker/tabhud/screenA/garden.json | 70 ++++++++++++ .../assets/skyblocker/tabhud/screenA/rift.json | 48 ++++++++ .../assets/skyblocker/tabhud/screenA/unknown.json | 17 +++ .../assets/skyblocker/tabhud/screenB/default.json | 17 +++ .../assets/skyblocker/tabhud/screenB/dungeon.json | 53 +++++++++ .../assets/skyblocker/tabhud/screenB/garden.json | 29 +++++ .../skyblocker/tabhud/screenB/guest_island.json | 29 +++++ .../skyblocker/tabhud/screenB/home_island.json | 29 +++++ .../assets/skyblocker/tabhud/screenB/unknown.json | 17 +++ .../skyblocker/tabhud/standard/crimson_isle.json | 44 ++++++++ .../tabhud/standard/crystal_hollows.json | 44 ++++++++ .../assets/skyblocker/tabhud/standard/default.json | 17 +++ .../assets/skyblocker/tabhud/standard/dungeon.json | 52 +++++++++ .../skyblocker/tabhud/standard/dungeon_hub.json | 25 +++++ .../skyblocker/tabhud/standard/dwarven_mines.json | 44 ++++++++ .../skyblocker/tabhud/standard/farming_island.json | 25 +++++ .../assets/skyblocker/tabhud/standard/garden.json | 25 +++++ .../skyblocker/tabhud/standard/guest_island.json | 17 +++ .../skyblocker/tabhud/standard/home_island.json | 29 +++++ .../assets/skyblocker/tabhud/standard/hub.json | 29 +++++ .../assets/skyblocker/tabhud/standard/park.json | 17 +++ .../assets/skyblocker/tabhud/standard/rift.json | 39 +++++++ .../assets/skyblocker/tabhud/standard/unknown.json | 17 +++ .../assets/skyblocker/tabhud/test_screen.json | 122 --------------------- .../assets/skyblocker/tabhud/screenA/default.json | 70 ++++++++++++ .../assets/skyblocker/tabhud/screenA/garden.json | 70 ++++++++++++ .../assets/skyblocker/tabhud/screenA/rift.json | 48 ++++++++ .../assets/skyblocker/tabhud/screenA/unknown.json | 17 +++ .../assets/skyblocker/tabhud/screenB/default.json | 17 +++ .../assets/skyblocker/tabhud/screenB/dungeon.json | 53 +++++++++ .../assets/skyblocker/tabhud/screenB/garden.json | 29 +++++ .../skyblocker/tabhud/screenB/guest_island.json | 29 +++++ .../skyblocker/tabhud/screenB/home_island.json | 29 +++++ .../assets/skyblocker/tabhud/screenB/unknown.json | 17 +++ .../skyblocker/tabhud/standard/crimson_isle.json | 44 ++++++++ .../tabhud/standard/crystal_hollows.json | 44 ++++++++ .../assets/skyblocker/tabhud/standard/default.json | 17 +++ .../assets/skyblocker/tabhud/standard/dungeon.json | 52 +++++++++ .../skyblocker/tabhud/standard/dungeon_hub.json | 25 +++++ .../skyblocker/tabhud/standard/dwarven_mines.json | 44 ++++++++ .../skyblocker/tabhud/standard/farming_island.json | 25 +++++ .../assets/skyblocker/tabhud/standard/garden.json | 25 +++++ .../skyblocker/tabhud/standard/guest_island.json | 17 +++ .../skyblocker/tabhud/standard/home_island.json | 29 +++++ .../assets/skyblocker/tabhud/standard/hub.json | 29 +++++ .../assets/skyblocker/tabhud/standard/park.json | 17 +++ .../assets/skyblocker/tabhud/standard/rift.json | 39 +++++++ .../assets/skyblocker/tabhud/standard/unknown.json | 17 +++ .../resourcepacks/default_top/pack.mcmeta | 6 + 56 files changed, 1631 insertions(+), 346 deletions(-) delete mode 100644 src/main/resources/assets/skyblocker/tabhud/assignment.json delete mode 100644 src/main/resources/assets/skyblocker/tabhud/empty_screen.json delete mode 100644 src/main/resources/assets/skyblocker/tabhud/info/garden_info_screen.json delete mode 100644 src/main/resources/assets/skyblocker/tabhud/info/generic_info_screen.json delete mode 100644 src/main/resources/assets/skyblocker/tabhud/info/rift_info_screen.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/screenA/default.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/screenA/garden.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/screenA/rift.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/screenA/unknown.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/screenB/default.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/screenB/dungeon.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/screenB/garden.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/screenB/guest_island.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/screenB/home_island.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/screenB/unknown.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/standard/crimson_isle.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/standard/crystal_hollows.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/standard/default.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/standard/dungeon.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/standard/dungeon_hub.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/standard/dwarven_mines.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/standard/farming_island.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/standard/garden.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/standard/guest_island.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/standard/home_island.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/standard/hub.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/standard/park.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/standard/rift.json create mode 100644 src/main/resources/assets/skyblocker/tabhud/standard/unknown.json delete mode 100644 src/main/resources/assets/skyblocker/tabhud/test_screen.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/screenA/default.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/screenA/garden.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/screenA/rift.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/screenA/unknown.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/screenB/default.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/screenB/dungeon.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/screenB/garden.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/screenB/guest_island.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/screenB/home_island.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/screenB/unknown.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/standard/crimson_isle.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/standard/crystal_hollows.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/standard/default.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/standard/dungeon.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/standard/dungeon_hub.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/standard/dwarven_mines.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/standard/farming_island.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/standard/garden.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/standard/guest_island.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/standard/home_island.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/standard/hub.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/standard/park.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/standard/rift.json create mode 100644 src/main/resources/resourcepacks/default_top/assets/skyblocker/tabhud/standard/unknown.json create mode 100644 src/main/resources/resourcepacks/default_top/pack.mcmeta (limited to 'src/main/resources') diff --git a/src/main/resources/assets/skyblocker/tabhud/assignment.json b/src/main/resources/assets/skyblocker/tabhud/assignment.json deleted file mode 100644 index 85c8f938..00000000 --- a/src/main/resources/assets/skyblocker/tabhud/assignment.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "standard" : { - "default": "generic_info_screen" - }, - "screenA": { - "default": "empty_screen" - }, - "screenB": { - "default": "empty_screen" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/empty_screen.json b/src/main/resources/assets/skyblocker/tabhud/empty_screen.json deleted file mode 100644 index 0252940a..00000000 --- a/src/main/resources/assets/skyblocker/tabhud/empty_screen.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "widgets": [ - { - "name": "EmptyWidget", - "alias": "ew" - } - ], - "layout": [ - { - "op": "place", - "where": "center", - "apply_to": [ - "ew" - ] - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/info/garden_info_screen.json b/src/main/resources/assets/skyblocker/tabhud/info/garden_info_screen.json deleted file mode 100644 index 3e1556ef..00000000 --- a/src/main/resources/assets/skyblocker/tabhud/info/garden_info_screen.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "widgets":[ - { - "name": "GardenSkillsWidget", - "alias": "gsw" - }, - { - "name": "EventWidget", - "alias": "evw", - "inGarden": true - }, - { - "name": "UpgradeWidget", - "alias": "uw" - }, - { - "name": "ProfileWidget", - "alias": "pw" - }, - { - "name": "EffectWidget", - "alias": "efw" - }, - { - "name": "JacobsContestWidget", - "alias": "jcw" - }, - { - "name": "CookieWidget", - "alias": "cw" - } - ], - "layout": [ - { - "op": "stack", - "direction": "vertical", - "align": "center", - "apply_to": ["gsw", "evw", "uw"] - }, - { - "op": "stack", - "direction": "vertical", - "align": "center", - "apply_to": ["pw", "efw"] - }, - { - "op": "stack", - "direction": "vertical", - "align": "center", - "apply_to": ["jcw", "cw"] - }, - { - "op": "align", - "reference": "horizontalCenter", - "apply_to": ["gsw", "evw", "uw"] - }, - { - "op": "collideAgainst", - "direction": "left", - "widgets": ["pw", "efw"], - "colliders": ["gsw", "evw", "uw"] - }, - { - "op": "collideAgainst", - "direction": "right", - "widgets": ["jcw", "cw"], - "colliders": ["gsw", "evw", "uw"] - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/info/generic_info_screen.json b/src/main/resources/assets/skyblocker/tabhud/info/generic_info_screen.json deleted file mode 100644 index dcfa5138..00000000 --- a/src/main/resources/assets/skyblocker/tabhud/info/generic_info_screen.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "widgets":[ - { - "name": "SkillsWidget", - "alias": "sw" - }, - { - "name": "EventWidget", - "alias": "evw", - "inGarden": false - }, - { - "name": "UpgradeWidget", - "alias": "uw" - }, - { - "name": "ProfileWidget", - "alias": "pw" - }, - { - "name": "EffectWidget", - "alias": "efw" - }, - { - "name": "ElectionWidget", - "alias": "elw" - }, - { - "name": "CookieWidget", - "alias": "cw" - } - ], - "layout": [ - { - "op": "stack", - "direction": "vertical", - "align": "center", - "apply_to": ["sw", "evw", "uw"] - }, - { - "op": "stack", - "direction": "vertical", - "align": "center", - "apply_to": ["pw", "efw"] - }, - { - "op": "stack", - "direction": "vertical", - "align": "center", - "apply_to": ["elw", "cw"] - }, - { - "op": "align", - "reference": "horizontalCenter", - "apply_to": ["sw", "evw", "uw"] - }, - { - "op": "collideAgainst", - "direction": "left", - "widgets": ["pw", "efw"], - "colliders": ["sw", "evw", "uw"] - }, - { - "op": "collideAgainst", - "direction": "right", - "widgets": ["elw", "cw"], - "colliders": ["sw", "evw", "uw"] - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/info/rift_info_screen.json b/src/main/resources/assets/skyblocker/tabhud/info/rift_info_screen.json deleted file mode 100644 index 3eda517d..00000000 --- a/src/main/resources/assets/skyblocker/tabhud/info/rift_info_screen.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "widgets":[ - { - "name": "RiftProfileWidget", - "alias": "profile" - }, - { - "name": "RiftStatsWidget", - "alias": "stats" - }, - { - "name": "ShenWidget", - "alias": "shen" - }, - { - "name": "CookieWidget", - "alias": "cookie" - }, - { - "name": "AdvertisementWidget", - "alias": "ad" - } - ], - "layout": [ - { - "op": "stack", - "direction": "vertical", - "align": "center", - "apply_to": ["stats", "ad"] - }, - { - "op": "stack", - "direction": "vertical", - "align": "center", - "apply_to": ["profile", "shen", "cookie"] - }, - { - "op": "align", - "reference": "leftOfCenter", - "apply_to": ["stats", "ad"] - }, - { - "op": "align", - "direction": "rightOfCenter", - "apply_to": ["profile", "shen", "cookie"] - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/readme.md b/src/main/resources/assets/skyblocker/tabhud/readme.md index 7167f561..52cf5778 100644 --- a/src/main/resources/assets/skyblocker/tabhud/readme.md +++ b/src/main/resources/assets/skyblocker/tabhud/readme.md @@ -1,9 +1,19 @@ -# assignment.json -Assigns the screens to a type (standard, screenA, screenB). standard is shown when just pressing tab, A and B are shown when using other keys/the modifiers. -For every type, the concrete screens are mapped to the areas they are supposed to be shown in. See Appendix A for a list of valid areas. -To find the screen definition, ".json" is appended to the screen key, so specifying `"foo": "generic_info_screen"` will try to find `generic_info_screen.json` and assign this definition to the "foo" area. +# Directory layout +The resource pack should look like this: +``` +my_pack +├───pack.mcmeta +└───assets + └───skyblocker + └───tabhud + ├───screenA + ├───screenB + └───standard +``` +The three dirs `screenA`, `screenB` and `standard` contain the screen definition JSON files as described below. `standard` describes the screens shown when just the TAB key is pressed, while `screenA/B` describe the screens shown when using the modifier keys A and B (default binds: N and B). +The file names are used to describe where a screen is shown. They are case sensitive. For a full list of possible names see Appendix A. While this necessitates duplicate file contents and results in similar file names in different directories, it also allows for much control both when creating a complete layout or when only overriding specific screens. -# Screen definition JSON +# Screen definition JSONs This file consists of one widgets section and one layout section. ## Widget section @@ -16,7 +26,7 @@ The layout section defines how the widgets are arranged on the screen. This is d # Appendices ## Appendix A: Area identifiers -- default: Any area not explicitly listed in the type. +- default: Any area not explicitly listed. ## Appendix B: Widget identifiers and arguments @@ -28,12 +38,13 @@ The layout section defines how the widgets are arranged on the screen. This is d - EffectWidget: Currently active effects - ElectionWidget: Info about the current mayor election - CookieWidget: Info about your super cookie +- TODO: finish. see widgets package for possible values. ## Appendix C: Pipeline stages #### Align - op: `align` -- reference: One of `horizontalCenter`, `verticalCenter`, `leftOfCenter`, `rightOfCenter`, `topOfCenter`, `botOfCenter` +- reference: One of `horizontalCenter`, `verticalCenter`, `leftOfCenter`, `rightOfCenter`, `topOfCenter`, `botOfCenter`, `top`, `bot`, `left`, `right` - apply_to: List of widgets to individually apply this operation to. - Moves a widget in *one* direction (up/down OR left/right) until it's positioned in the way described by `reference`. This reference may be thought of as a straight line, with some describing the screen's borders and others referring to it's two center axis. @@ -86,7 +97,7 @@ Example: Stack A, B, C vertically/center-aligned, then align with leftOfCenter #### Place - op: `place` -- where: One of `center` +- where: One of `center`, `centerTop` - apply_to: Widget to place an the indicated position. - Places a widget at some position, moving it in any direction as needed. Only makes sense to use on one widget at a time, as applying the same Place op to multiple widgtes causes them to be on top of each other. diff --git a/src/main/resources/assets/skyblocker/tabhud/screenA/default.json b/src/main/resources/assets/skyblocker/tabhud/screenA/default.json new file mode 100644 index 00000000..dcfa5138 --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/screenA/default.json @@ -0,0 +1,70 @@ +{ + "widgets":[ + { + "name": "SkillsWidget", + "alias": "sw" + }, + { + "name": "EventWidget", + "alias": "evw", + "inGarden": false + }, + { + "name": "UpgradeWidget", + "alias": "uw" + }, + { + "name": "ProfileWidget", + "alias": "pw" + }, + { + "name": "EffectWidget", + "alias": "efw" + }, + { + "name": "ElectionWidget", + "alias": "elw" + }, + { + "name": "CookieWidget", + "alias": "cw" + } + ], + "layout": [ + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["sw", "evw", "uw"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["pw", "efw"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["elw", "cw"] + }, + { + "op": "align", + "reference": "horizontalCenter", + "apply_to": ["sw", "evw", "uw"] + }, + { + "op": "collideAgainst", + "direction": "left", + "widgets": ["pw", "efw"], + "colliders": ["sw", "evw", "uw"] + }, + { + "op": "collideAgainst", + "direction": "right", + "widgets": ["elw", "cw"], + "colliders": ["sw", "evw", "uw"] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/screenA/garden.json b/src/main/resources/assets/skyblocker/tabhud/screenA/garden.json new file mode 100644 index 00000000..3e1556ef --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/screenA/garden.json @@ -0,0 +1,70 @@ +{ + "widgets":[ + { + "name": "GardenSkillsWidget", + "alias": "gsw" + }, + { + "name": "EventWidget", + "alias": "evw", + "inGarden": true + }, + { + "name": "UpgradeWidget", + "alias": "uw" + }, + { + "name": "ProfileWidget", + "alias": "pw" + }, + { + "name": "EffectWidget", + "alias": "efw" + }, + { + "name": "JacobsContestWidget", + "alias": "jcw" + }, + { + "name": "CookieWidget", + "alias": "cw" + } + ], + "layout": [ + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["gsw", "evw", "uw"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["pw", "efw"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["jcw", "cw"] + }, + { + "op": "align", + "reference": "horizontalCenter", + "apply_to": ["gsw", "evw", "uw"] + }, + { + "op": "collideAgainst", + "direction": "left", + "widgets": ["pw", "efw"], + "colliders": ["gsw", "evw", "uw"] + }, + { + "op": "collideAgainst", + "direction": "right", + "widgets": ["jcw", "cw"], + "colliders": ["gsw", "evw", "uw"] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/screenA/rift.json b/src/main/resources/assets/skyblocker/tabhud/screenA/rift.json new file mode 100644 index 00000000..8d1d4c5f --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/screenA/rift.json @@ -0,0 +1,48 @@ +{ + "widgets":[ + { + "name": "RiftProfileWidget", + "alias": "profile" + }, + { + "name": "RiftStatsWidget", + "alias": "stats" + }, + { + "name": "ShenWidget", + "alias": "shen" + }, + { + "name": "CookieWidget", + "alias": "cookie" + }, + { + "name": "AdvertisementWidget", + "alias": "ad" + } + ], + "layout": [ + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["stats", "ad"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["profile", "shen", "cookie"] + }, + { + "op": "align", + "reference": "leftOfCenter", + "apply_to": ["stats", "ad"] + }, + { + "op": "align", + "reference": "rightOfCenter", + "apply_to": ["profile", "shen", "cookie"] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/screenA/unknown.json b/src/main/resources/assets/skyblocker/tabhud/screenA/unknown.json new file mode 100644 index 00000000..0252940a --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/screenA/unknown.json @@ -0,0 +1,17 @@ +{ + "widgets": [ + { + "name": "EmptyWidget", + "alias": "ew" + } + ], + "layout": [ + { + "op": "place", + "where": "center", + "apply_to": [ + "ew" + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/screenB/default.json b/src/main/resources/assets/skyblocker/tabhud/screenB/default.json new file mode 100644 index 00000000..a1f52ad5 --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/screenB/default.json @@ -0,0 +1,17 @@ +{ + "widgets": [ + { + "name": "PlayerListWidget", + "alias": "plw" + } + ], + "layout": [ + { + "op": "place", + "where": "center", + "apply_to": [ + "plw" + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/screenB/dungeon.json b/src/main/resources/assets/skyblocker/tabhud/screenB/dungeon.json new file mode 100644 index 00000000..075e3d4c --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/screenB/dungeon.json @@ -0,0 +1,53 @@ +{ + "widgets":[ + { + "name": "DungeonPlayerWidget", + "alias": "dpw1", + "player": 1 + }, + { + "name": "DungeonPlayerWidget", + "alias": "dpw2", + "player": 2 + }, + { + "name": "DungeonPlayerWidget", + "alias": "dpw3", + "player": 3 + }, + { + "name": "DungeonPlayerWidget", + "alias": "dpw4", + "player": 4 + }, + { + "name": "DungeonPlayerWidget", + "alias": "dpw5", + "player": 5 + } + ], + "layout": [ + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["dpw1", "dpw2", "dpw3"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["dpw4", "dpw5"] + }, + { + "op": "align", + "reference": "leftOfCenter", + "apply_to": ["dpw1", "dpw2", "dpw3"] + }, + { + "op": "align", + "reference": "rightOfCenter", + "apply_to": ["dpw4", "dpw5"] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/screenB/garden.json b/src/main/resources/assets/skyblocker/tabhud/screenB/garden.json new file mode 100644 index 00000000..772e0594 --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/screenB/garden.json @@ -0,0 +1,29 @@ +{ + "widgets":[ + { + "name": "IslandGuestsWidget", + "alias": "igw" + }, + { + "name": "IslandSelfWidget", + "alias": "isw" + } + ], + "layout": [ + { + "op": "align", + "reference": "rightOfCenter", + "apply_to": ["igw"] + }, + { + "op": "align", + "reference": "leftOfCenter", + "apply_to": ["isw"] + }, + { + "op": "align", + "reference": "verticalCenter", + "apply_to": ["igw", "isw"] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/screenB/guest_island.json b/src/main/resources/assets/skyblocker/tabhud/screenB/guest_island.json new file mode 100644 index 00000000..54a4039d --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/screenB/guest_island.json @@ -0,0 +1,29 @@ +{ + "widgets":[ + { + "name": "IslandGuestsWidget", + "alias": "igw" + }, + { + "name": "IslandOwnersWidget", + "alias": "iow" + } + ], + "layout": [ + { + "op": "align", + "reference": "leftOfCenter", + "apply_to": ["igw"] + }, + { + "op": "align", + "reference": "rightOfCenter", + "apply_to": ["iow"] + }, + { + "op": "align", + "reference": "verticalCenter", + "apply_to": ["igw", "iow"] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/screenB/home_island.json b/src/main/resources/assets/skyblocker/tabhud/screenB/home_island.json new file mode 100644 index 00000000..772e0594 --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/screenB/home_island.json @@ -0,0 +1,29 @@ +{ + "widgets":[ + { + "name": "IslandGuestsWidget", + "alias": "igw" + }, + { + "name": "IslandSelfWidget", + "alias": "isw" + } + ], + "layout": [ + { + "op": "align", + "reference": "rightOfCenter", + "apply_to": ["igw"] + }, + { + "op": "align", + "reference": "leftOfCenter", + "apply_to": ["isw"] + }, + { + "op": "align", + "reference": "verticalCenter", + "apply_to": ["igw", "isw"] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/screenB/unknown.json b/src/main/resources/assets/skyblocker/tabhud/screenB/unknown.json new file mode 100644 index 00000000..0252940a --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/screenB/unknown.json @@ -0,0 +1,17 @@ +{ + "widgets": [ + { + "name": "EmptyWidget", + "alias": "ew" + } + ], + "layout": [ + { + "op": "place", + "where": "center", + "apply_to": [ + "ew" + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/standard/crimson_isle.json b/src/main/resources/assets/skyblocker/tabhud/standard/crimson_isle.json new file mode 100644 index 00000000..7584c423 --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/standard/crimson_isle.json @@ -0,0 +1,44 @@ +{ + "widgets":[ + { + "name": "ServerWidget", + "alias": "sw" + }, + { + "name": "ReputationWidget", + "alias": "rw" + }, + { + "name": "QuestWidget", + "alias": "qw" + }, + { + "name": "VolcanoWidget", + "alias": "vw" + } + ], + "layout": [ + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["sw", "rw"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["qw", "vw"] + }, + { + "op": "align", + "reference": "leftOfCenter", + "apply_to": ["sw", "rw"] + }, + { + "op": "align", + "reference": "rightOfCenter", + "apply_to": ["qw", "vw"] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/standard/crystal_hollows.json b/src/main/resources/assets/skyblocker/tabhud/standard/crystal_hollows.json new file mode 100644 index 00000000..7a9db97d --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/standard/crystal_hollows.json @@ -0,0 +1,44 @@ +{ + "widgets":[ + { + "name": "ServerWidget", + "alias": "sw" + }, + { + "name": "PowderWidget", + "alias": "pw" + }, + { + "name": "CommsWidget", + "alias": "cw" + }, + { + "name": "ForgeWidget", + "alias": "fw" + } + ], + "layout": [ + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["sw", "cw"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["fw", "pw"] + }, + { + "op": "align", + "reference": "leftOfCenter", + "apply_to": ["sw", "cw"] + }, + { + "op": "align", + "reference": "rightOfCenter", + "apply_to": ["pw", "fw"] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/standard/default.json b/src/main/resources/assets/skyblocker/tabhud/standard/default.json new file mode 100644 index 00000000..99ca3323 --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/standard/default.json @@ -0,0 +1,17 @@ +{ + "widgets": [ + { + "name": "ServerWidget", + "alias": "sw" + } + ], + "layout": [ + { + "op": "place", + "where": "center", + "apply_to": [ + "sw" + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/skyblocker/tabhud/standard/dungeon.json b/src/main/resources/assets/skyblocker/tabhud/standard/dungeon.json new file mode 100644 index 00000000..f0fce5c6 --- /dev/null +++ b/src/main/resources/assets/skyblocker/tabhud/standard/dungeon.json @@ -0,0 +1,52 @@ +{ + "widgets":[ + { + "name": "DungeonDownedWidget", + "alias": "ddow" + }, + { + "name": "DungeonDeathWidget", + "alias": "ddew" + }, + { + "name": "DungeonSecretWidget", + "alias": "dscw" + }, + { + "name": "DungeonServerWidget", + "alias": "dsrw" + }, + { + "name": "DungeonPuzzleWidget", + "alias": "dpuw" + }, + { + "name": "DungeonBuffWidget", + "alias": "dbw" + } + ], + "layout": [ + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["ddow", "ddew", "dbw"] + }, + { + "op": "stack", + "direction": "vertical", + "align": "center", + "apply_to": ["dsrw", "dpuw", "dscw"] + }, + { + "op": "align", + "reference":