1
mirror of https://github.com/thepeacockproject/Peacock synced 2024-11-29 09:15:11 +01:00
Peacock/static/LegacySelectAgencyPickupTemplate.json
Reece Dunham 6245e91624 Initial commit
Co-authored-by: Tino Roivanen <tino.roivanen98@gmail.com>
Co-authored-by: Govert de Gans <grappigegovert@hotmail.com>
Co-authored-by: Gray Olson <gray@grayolson.com>
Co-authored-by: Alexandre Sanchez <alex73630@gmail.com>
Co-authored-by: Anthony Fuller <24512050+anthonyfuller@users.noreply.github.com>
Co-authored-by: atampy25 <24306974+atampy25@users.noreply.github.com>
Co-authored-by: David <davidstulemeijer@gmail.com>
Co-authored-by: c0derMo <c0dermo@users.noreply.github.com>
Co-authored-by: Jeevat Singh <jeevatt.singh@gmail.com>
Signed-off-by: Reece Dunham <me@rdil.rocks>
2022-10-19 21:33:45 -04:00

393 lines
23 KiB
JSON

{
"metricscontext": {
"contractid": "$.Contract.Metadata.Id",
"location": "$.Contract.Metadata.Location"
},
"onpageopened": {
"set-selected": {
"target": "$arg SelectedAgencyPickup"
}
},
"onpageclosed": {
"set-mastery-data": {}
},
"buttons": [
{
"actiontype": "accept",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_SELECT"
},
{
"actiontype": "cancel",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_BACK"
},
{
"actiontype": "action-y",
"actionlabel": "$loc UI_DIALOG_SHOW_DETAILS"
}
],
"body": {
"$setupcomponents": {
"difficulty-manager": {
"always-reload-setup": true,
"setup": {
"difficulty": "$.Contract.Metadata.Difficulty"
}
}
},
"controller": "list",
"actions": {
"select": {
"select-category": {}
}
},
"children": [
{
"controller": "group",
"id": "headline_container",
"row": 4.25,
"col": 0,
"selectable": false,
"pressable": false,
"_comment": "the container that will hold the HeadlineElement. It will show info on whatever item is selected",
"children": {
"id": "headline_element",
"view": "menu3.basic.HeadlineElement"
}
},
{
"id": "category_container",
"controller": "list"
},
{
"view": "menu3.containers.ScrollingTabsContainer",
"controller": "category",
"id": "category_context",
"container": "category_container",
"direction": "horizontal",
"data": {
"direction": "horizontal",
"topnavigation": {
"header": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"title": {
"$if $arg contract-creation": {
"$then": "$loc $.Contract.Metadata.Title",
"$else": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": "$.Contract.Metadata.Title"
},
{
"case": "featured",
"return": "$.Contract.Metadata.Title"
},
{
"default": "$loc $.Contract.Metadata.Title"
}
]
}
}
},
"icon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
},
"actions": {
"select": {
"$use $.UserCentric": {
"set-mastery-data": {
"$setup": {
"$set ValidContractType": {
"$if $isnull $.Contract": {
"$then": true,
"$else": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": false
},
{
"case": "featured",
"return": false
},
{
"default": true
}
]
}
}
},
"$set HideProgression": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationHideProgression",
"$else": "$.CompletionData.HideProgression"
}
},
"$set MasteryTitle": {
"$if $isnull $.CompletionData": {
"$then": "$formatstring {$.Data.LocationLevel,.0f}/{$.Data.LocationMaxLevel,.0f}",
"$else": "$formatstring {$.CompletionData.Level,.0f}/{$.CompletionData.MaxLevel,.0f}"
}
},
"$set MasteryCompletion": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationCompletion",
"$else": "$.CompletionData.Completion"
}
},
"$set MasteryXpLeft": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationXpLeft",
"$else": "$.CompletionData.XpLeft"
}
},
"$set CityName": {
"$if $isnull $.CompletionData": {
"$then": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$else": "$loc $formatstring UI_{$.CompletionData.Id}_CITY"
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
"$arg _isonline",
"$not $.HideProgression",
"$.ValidContractType"
]
},
"$then": {
"masteryheader": {
"$loc": {
"key": "UI_MENU_LOCATION_PROGRESSION_HEADER",
"data": ["$.CityName"]
}
},
"masterytitle": "$.MasteryTitle",
"masterycompletion": "$.MasteryCompletion",
"masteryxpleft": "$.MasteryXpLeft"
},
"$else": {}
}
}
}
}
}
}
},
"children": {
"view": "menu3.basic.CategoryElement",
"data": {
"title": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_SMUGGLED_ITEM",
"icon": "stashpointempty"
},
"children": [
{
"controller": "group",
"view": "menu3.containers.ScrollingListContainer",
"direction": "horizontal",
"data": {
"direction": "horizontal"
},
"row": 1,
"pages": true,
"nrows": 3,
"ncols": 10,
"children": {
"$each $arg agencypickups": {
"$setup": {
"$set Item": "$.Unlockable",
"$set LocalizedReproItem": "$item $.Unlockable",
"$in": {
"view": "menu3.basic.MenuTileSmall",
"id": "$.id",
"nrows": 1.5,
"ncols": 2,
"pressable": "$.unlocked",
"data": {
"hidebarcode": true,
"header": {
"$if $.unlocked": {
"$then": {
"$switch $.allowlargeitems": [
{
"case": true,
"return": "$loc UI_MENU_PAGE_LOADOUT_ELEMENT_SLOT_STASHPOINT_LARGE"
},
{
"default": "$loc UI_MENU_PAGE_LOADOUT_ELEMENT_SLOT_STASHPOINT_SMALL"
}
]
},
"$else": {
"$if $stringvalid $.unlocklevel": {
"$then": "$formatstring {$loc UI_MENU_PAGE_MASTERY_LEVEL} {$.unlocklevel}",
"$else": {
"$switch $.allowlargeitems": [
{
"case": true,
"return": "$loc UI_MENU_PAGE_LOADOUT_ELEMENT_SLOT_STASHPOINT_LARGE"
},
{
"default": "$loc UI_MENU_PAGE_LOADOUT_ELEMENT_SLOT_STASHPOINT_SMALL"
}
]
}
}
}
}
},
"title": "$loc $($repository $.id).Name_LOC",
"image": "$res $($repository $.id).Image",
"icon": "stashpointempty",
"agencypickup": {
"$switch $arg SelectedAgencyPickup": [
{
"case": null,
"return": null
},
{
"case": "$.id",
"return": {
"header": "$loc UI_MENU_PAGE_LOADOUT_CONTENT",
"title": "$($arg SelectedItem).name",
"icon": {
"$setup": {
"$set repoID": "$($arg SelectedItem).repositoryid",
"$in": "$($repository $.repoID).InventoryCategoryIcon"
}
},
"rarity": "$($arg SelectedItem).rarity"
}
},
{
"default": null
}
]
},
"locked": "$not $.unlocked",
"masterylocked": "$not $.unlocked",
"lockedreason": {
"$if $arg _isonline": {
"$then": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_INCREASE_MASTERY",
"$else": "$loc UI_MENU_PAGE_PLANNING_OFFLINE"
}
},
"availability": {
"$if $.unlocked": {
"$then": null,
"$else": {
"available": true
}
}
}
},
"actions": {
"accept": {
"link": {
"page": "stashpoint",
"args": {
"url": "stashpoint",
"args": {
"gatemode": "",
"contractid": "$arg contractid",
"stashpoint": "$.id",
"allowlargeitems": "$.allowlargeitems",
"slotname": "stashpoint6"
},
"contractid": "$arg contractid",
"stashpoint": "$.id",
"allowlargeitems": "$.allowlargeitems",
"slotname": "stashpoint6",
"set-stashpoint": true,
"selecteditem": "$($arg SelectedItem).id",
"usewhitelineheader": true,
"extra-title": "$loc $($repository $.id).Name_LOC"
}
}
},
"select": {
"replace-children": {
"target": "headline_container",
"children": [
{
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$switch $.allowlargeitems": [
{
"case": true,
"return": "$loc UI_MENU_PAGE_LOADOUT_ELEMENT_SLOT_STASHPOINT_LARGE"
},
{
"default": "$loc UI_MENU_PAGE_LOADOUT_ELEMENT_SLOT_STASHPOINT_SMALL"
}
]
},
"title": "$loc $($repository $.id).Name_LOC",
"typeicon": {
"$if $.unlocked": {
"$then": "stashpointempty",
"$else": "locked"
}
}
}
}
]
}
},
"action-y": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogItemDetails",
"buttons": [
"$loc UI_DIALOG_OK",
{
"type": "cancel"
}
],
"data": {
"description": "$.LocalizedReproItem.desc",
"type": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_SMUGGLED_ITEM",
"icon": "stashpointempty",
"item": "$($repository $.id)",
"displaybuttons": [
{
"actiontype": "cancel",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_BACK",
"hideIndicator": true
}
]
}
}
}
}
}
}
}
}
}
}
]
}
}
]
}
}