mirror of
https://github.com/thepeacockproject/Peacock
synced 2024-11-22 22:12:45 +01:00
6245e91624
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>
368 lines
20 KiB
JSON
368 lines
20 KiB
JSON
{
|
|
"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"
|
|
}
|
|
],
|
|
"onpageopened": {
|
|
"set-selected": {
|
|
"target": "$arg selectedentrance"
|
|
}
|
|
},
|
|
"onpageclosed": {
|
|
"set-mastery-data": {}
|
|
},
|
|
"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",
|
|
"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": "dummy",
|
|
"return": {
|
|
"_dynamicPackerOverride": [
|
|
"SniperChallenge"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"case": "orbis",
|
|
"return": "ica"
|
|
},
|
|
{
|
|
"case": "campaign",
|
|
"return": "mission"
|
|
},
|
|
{
|
|
"case": "sniper",
|
|
"return": "sniperrifle"
|
|
},
|
|
{
|
|
"default": {
|
|
"$if $.Contract.Metadata.IsVersus": {
|
|
"$then": "versus",
|
|
"$else": "$.Contract.Metadata.Type"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"controller": "category",
|
|
"id": "category_context",
|
|
"container": "category_container",
|
|
"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 NameLocalized": {
|
|
"$if $isnull $.CompletionData.Name": {
|
|
"$then": "$loc UI_MENU_PAGE_MASTERY_TITLE",
|
|
"$else": "$loc $.CompletionData.Name"
|
|
}
|
|
},
|
|
"$set IsLocationProgression": {
|
|
"$if": {
|
|
"$condition": {
|
|
"$or": [
|
|
"$isnull $.CompletionData",
|
|
"$.CompletionData.IsLocationProgression"
|
|
]
|
|
},
|
|
"$then": true,
|
|
"$else": false
|
|
}
|
|
},
|
|
"$set ShowUnit": {
|
|
"$if $.IsLocationProgression": {
|
|
"$then": true,
|
|
"$else": false
|
|
}
|
|
},
|
|
"$in": {
|
|
"$if": {
|
|
"$condition": {
|
|
"$and": [
|
|
"$arg _isonline",
|
|
"$not $.HideProgression",
|
|
"$.ValidContractType"
|
|
]
|
|
},
|
|
"$then": {
|
|
"masteryheader": "$.NameLocalized",
|
|
"masterytitle": "$.MasteryTitle",
|
|
"masterycompletion": "$.MasteryCompletion",
|
|
"masteryxpleft": "$.MasteryXpLeft",
|
|
"showUnit": "$.ShowUnit"
|
|
},
|
|
"$else": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"children": {
|
|
"view": "menu3.basic.CategoryElement",
|
|
"data": {
|
|
"title": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_ENTRANCE",
|
|
"icon": "starting"
|
|
},
|
|
"children": {
|
|
"controller": "group",
|
|
"view": "menu3.containers.ScrollingListContainer",
|
|
"direction": "horizontal",
|
|
"data": {
|
|
"direction": "horizontal"
|
|
},
|
|
"row": 1,
|
|
"pages": true,
|
|
"nrows": 3,
|
|
"ncols": 10,
|
|
"children": {
|
|
"$each $arg entrances": {
|
|
"$setup": {
|
|
"$set Item": "$.Unlockable",
|
|
"$set LocalizedReproItem": "$item $.Unlockable",
|
|
"$in": {
|
|
"id": "$.id",
|
|
"view": "menu3.basic.MenuTileSmall",
|
|
"nrows": 1.5,
|
|
"ncols": 2,
|
|
"pressable": "$.unlocked",
|
|
"data": {
|
|
"hidebarcode": true,
|
|
"header": {
|
|
"$if $.unlocked": {
|
|
"$then": {
|
|
"$if $not $isnull $.suitid": {
|
|
"$then": "$loc $($repository $.suitid).Name",
|
|
"$else": null
|
|
}
|
|
},
|
|
"$else": {
|
|
"$if $stringvalid $.unlocklevel": {
|
|
"$then": "$formatstring {$loc UI_MENU_PAGE_MASTERY_LEVEL} {$.unlocklevel}",
|
|
"$else": {
|
|
"$if $not $isnull $.suitid": {
|
|
"$then": "$loc $($repository $.suitid).Name",
|
|
"$else": null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"title": "$loc $($repository $.id).Name_LOC",
|
|
"image": "$res $($repository $.id).Image",
|
|
"icon": "starting",
|
|
"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": {
|
|
"enable-entrance": {
|
|
"target": "$.id",
|
|
"equip": "$.equip"
|
|
},
|
|
"request-back": {
|
|
"target": [
|
|
"contractcreation_planning",
|
|
"planning"
|
|
],
|
|
"usecache": false
|
|
}
|
|
},
|
|
"select": {
|
|
"replace-children": {
|
|
"target": "headline_container",
|
|
"children": [
|
|
{
|
|
"view": "menu3.basic.HeadlineElement",
|
|
"selectable": false,
|
|
"pressable": false,
|
|
"data": {
|
|
"header": {
|
|
"$if $not $isnull $.suitid": {
|
|
"$then": "$loc $($repository $.suitid).Name",
|
|
"$else": null
|
|
}
|
|
},
|
|
"title": "$loc $($repository $.id).Name_LOC",
|
|
"typeicon": {
|
|
"$if $.unlocked": {
|
|
"$then": "starting",
|
|
"$else": "locked"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"action-y": {
|
|
"show-modal": {
|
|
"config": {
|
|
"priority": "low",
|
|
"view": "menu3.modal.ModalDialogItemDetails",
|
|
"buttons": [
|
|
"$loc UI_DIALOG_OK",
|
|
{
|
|
"type": "cancel"
|
|
}
|
|
],
|
|
"data": {
|
|
"description": "$.LocalizedReproItem.desc",
|
|
"type": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_ENTRANCE",
|
|
"icon": "starting",
|
|
"item": "$($repository $.id)",
|
|
"displaybuttons": [
|
|
{
|
|
"actiontype": "cancel",
|
|
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_BACK",
|
|
"hideIndicator": true
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|