mirror of
https://github.com/thepeacockproject/Peacock
synced 2024-11-22 22:12:45 +01:00
2ed110a703
* add debriefing challenges page
2130 lines
297 KiB
JSON
2130 lines
297 KiB
JSON
{
|
|
"$if $($arg _isonline)": {
|
|
"$then": {
|
|
"view": "menu3.basic.CategoryElement",
|
|
"id": "challenges_tab",
|
|
"data": {
|
|
"title": "$loc UI_MENU_PAGE_PLANNING_CHALLENGES",
|
|
"icon": "challenge"
|
|
},
|
|
"children": {
|
|
"$use $.ChallengeData": {
|
|
"$if $eq ($arraysize $.Children,0)": {
|
|
"$then": {
|
|
"$setup": {
|
|
"$set Title": "$loc UI_MENU_PAGE_NO_CHALLENGES_AVAILABLE",
|
|
"$in": {
|
|
"view": "menu3.basic.DefaultNoContentHeader",
|
|
"selectable": false,
|
|
"pressable": false,
|
|
"data": {
|
|
"header": "$.Header",
|
|
"title": "$.Title",
|
|
"typeicon": {
|
|
"$if $.Icon": {
|
|
"$then": "$.Icon",
|
|
"$else": "info"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"$else": [
|
|
{
|
|
"controller": "list",
|
|
"id": "sub_category_container",
|
|
"row": 0.1,
|
|
"col": 0,
|
|
"_comment": "enable analog handling to allow the submenu to handle LT/RT",
|
|
"handleanalog": true,
|
|
"actions": {
|
|
"$if $not $arg _isingame": {
|
|
"$then": {
|
|
"on-add-child": {
|
|
"show-background-layers": {
|
|
"showMenuBackgroundFullOverlay": true
|
|
}
|
|
},
|
|
"on-remove-child": {
|
|
"show-background-layers": {
|
|
"showMenuBackgroundFullOverlay": false
|
|
}
|
|
},
|
|
"on-page-closed": {
|
|
"show-background-layers": {
|
|
"showMenuBackgroundFullOverlay": false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"$setpageargs": {
|
|
"ShowPrevNextButtonPrompt": "$gt ($arraysize $.Children,1)"
|
|
},
|
|
"controller": "category",
|
|
"id": "sub_category_controller",
|
|
"container": "sub_category_container",
|
|
"view": "menu3.containers.ScrollingTabsContainer",
|
|
"direction": "horizontal",
|
|
"submenu-navigation": true,
|
|
"prevnextnav": true,
|
|
"ncols": 10,
|
|
"data": {
|
|
"direction": "horizontal",
|
|
"submenu": true
|
|
},
|
|
"children": {
|
|
"$each $.Children": {
|
|
"id": "$formatstring challenge_category_{$.Name}",
|
|
"view": "menu3.basic.SubCategoryElement",
|
|
"data": {
|
|
"$setup": {
|
|
"$set totalcompleted": "$formatstring {$.CompletedChallengesCount, .f}",
|
|
"$set totalcount": "$formatstring {$.ChallengesCount, .f}",
|
|
"$in": {
|
|
"title": "$formatstring {$loc $.Name} {$.totalcompleted} / {$.totalcount}"
|
|
}
|
|
}
|
|
},
|
|
"buttons": [
|
|
{
|
|
"$if $arg ShowPrevNextButtonPrompt": {
|
|
"$then": {
|
|
"actiontype": "lt_rt",
|
|
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_PREVNEXT_CATEGORY",
|
|
"customplatform": {
|
|
"platform": "key",
|
|
"hide": true,
|
|
"actiontype": "mouse_lmb"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"children": {
|
|
"$use $.SwitchData.Data": {
|
|
"$if $eq ($arraysize $.Challenges,0)": {
|
|
"$then": {
|
|
"$setup": {
|
|
"$set Title": "$loc UI_MENU_PAGE_NO_CHALLENGES_AVAILABLE",
|
|
"$in": {
|
|
"view": "menu3.basic.DefaultNoContentHeader",
|
|
"selectable": false,
|
|
"pressable": false,
|
|
"data": {
|
|
"header": "$.Header",
|
|
"title": "$.Title",
|
|
"typeicon": {
|
|
"$if $.Icon": {
|
|
"$then": "$.Icon",
|
|
"$else": "info"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"$else": {
|
|
"$merge": [
|
|
{
|
|
"controller": "list",
|
|
"col": 3,
|
|
"row": 3,
|
|
"selectable": false,
|
|
"pressable": false,
|
|
"id": "detail_view_container",
|
|
"children": []
|
|
},
|
|
{
|
|
"controller": "context-selector",
|
|
"id": "context_selector_container",
|
|
"context-activation-input": "down",
|
|
"target": "$formatstring challenge_list_{$.CategoryData.Name}",
|
|
"target-context": "challenge_action_container",
|
|
"children": [
|
|
{
|
|
"controller": "filter",
|
|
"id": "$formatstring challenge_list_{$.CategoryData.Name}",
|
|
"view": "menu3.containers.ThumbnailScrollingListContainer",
|
|
"row": 1.0,
|
|
"nrows": 1,
|
|
"ncols": 10,
|
|
"height": 660,
|
|
"direction": "horizontal",
|
|
"data": {
|
|
"direction": "horizontal",
|
|
"hidescrollbar": true,
|
|
"masktopoffset": 70,
|
|
"maskleftoffset": 250,
|
|
"isleaf": true,
|
|
"treenav": true,
|
|
"hasprevious": "$.HasPrevious",
|
|
"hasnext": "$.HasNext",
|
|
"previousicon": "$.PreviousCategoryIcon",
|
|
"nexticon": "$.NextCategoryIcon",
|
|
"containeremptydata": {
|
|
"title": "$loc $.CategoryData.Name",
|
|
"totalcompleted": "$formatstring {$.CategoryData.CompletedChallengesCount, .0f}",
|
|
"totalcount": "$formatstring {$.CategoryData.ChallengesCount, .0f}",
|
|
"icon": "$.CategoryData.Icon",
|
|
"image": "$res $.CategoryData.Image"
|
|
}
|
|
},
|
|
"actions": {
|
|
"on-filtered-list-empty": [
|
|
{
|
|
"replace-children": {
|
|
"target": "detail_view_container",
|
|
"children": {}
|
|
}
|
|
},
|
|
{
|
|
"replace-children": {
|
|
"target": "challenge_action_container",
|
|
"children": null
|
|
}
|
|
}
|
|
],
|
|
"on-filtered-list-not-empty": [
|
|
{
|
|
"replace-children": {
|
|
"target": "headline_container",
|
|
"children": {}
|
|
}
|
|
},
|
|
{
|
|
"$if $not $arg DisableChallengesMasteryHandling": {
|
|
"$then": {
|
|
"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": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"on-remove-child": {
|
|
"save-ui-options": "",
|
|
"replace-children": {
|
|
"target": "headline_container",
|
|
"children": []
|
|
}
|
|
},
|
|
"on-page-closed": {
|
|
"save-ui-options": ""
|
|
}
|
|
},
|
|
"filter-option-id": "UI_OPTION_GAME_CHALLENGES_FILTER",
|
|
"filter-toggle-action": "action-y",
|
|
"filter-definitions": [
|
|
{
|
|
"_comment": "no filter",
|
|
"toggle-button-title": "$loc UI_MENU_PAGE_CHALLENGES_NOT_COMPLETED",
|
|
"predicate": true,
|
|
"default-filter": true
|
|
},
|
|
{
|
|
"_comment": "show unfinished challenges",
|
|
"toggle-button-title": "$loc UI_MENU_PAGE_CHALLENGES_COMPLETED",
|
|
"predicate": {
|
|
"$notransform": {
|
|
"$if $.data.completed": {
|
|
"$then": false,
|
|
"$else": true
|
|
}
|
|
}
|
|
},
|
|
"actions": {
|
|
"$setup": {
|
|
"$set HeadlineTitle": "UI_MENU_PAGE_NO_UNCOMPLETED_CHALLENGES_AVAILABLE",
|
|
"$in": {
|
|
"select": [
|
|
{
|
|
"replace-children": {
|
|
"target": "headline_container",
|
|
"children": {
|
|
"view": "menu3.basic.HeadlineElement",
|
|
"selectable": false,
|
|
"pressable": false,
|
|
"data": {
|
|
"header": "",
|
|
"title": {
|
|
"$loc": {
|
|
"key": "$.HeadlineTitle",
|
|
"data": "$loc $.CategoryData.Name"
|
|
}
|
|
},
|
|
"typeicon": "$.CategoryData.Icon",
|
|
"multilinetitle": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"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": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"on-filtered-list-empty": [
|
|
{
|
|
"replace-children": {
|
|
"target": "headline_container",
|
|
"children": {
|
|
"view": "menu3.basic.HeadlineElement",
|
|
"selectable": false,
|
|
"pressable": false,
|
|
"data": {
|
|
"header": "",
|
|
"title": {
|
|
"$loc": {
|
|
"key": "$.HeadlineTitle",
|
|
"data": "$loc $.CategoryData.Name"
|
|
}
|
|
},
|
|
"typeicon": "$.CategoryData.Icon",
|
|
"multilinetitle": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"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": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"_comment": "show completed challenges",
|
|
"toggle-button-title": "$loc UI_MENU_PAGE_NO_FILTER",
|
|
"predicate": {
|
|
"$notransform": {
|
|
"$if $.data.completed": {
|
|
"$then": true,
|
|
"$else": false
|
|
}
|
|
}
|
|
},
|
|
"actions": {
|
|
"$setup": {
|
|
"$set HeadlineTitle": "UI_MENU_PAGE_NO_COMPLETED_CHALLENGES_AVAILABLE",
|
|
"$in": {
|
|
"select": [
|
|
{
|
|
"replace-children": {
|
|
"target": "headline_container",
|
|
"children": {
|
|
"view": "menu3.basic.HeadlineElement",
|
|
"selectable": false,
|
|
"pressable": false,
|
|
"data": {
|
|
"header": "",
|
|
"title": {
|
|
"$loc": {
|
|
"key": "$.HeadlineTitle",
|
|
"data": "$loc $.CategoryData.Name"
|
|
}
|
|
},
|
|
"typeicon": "$.CategoryData.Icon",
|
|
"multilinetitle": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"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": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"on-filtered-list-empty": [
|
|
{
|
|
"replace-children": {
|
|
"target": "headline_container",
|
|
"children": {
|
|
"view": "menu3.basic.HeadlineElement",
|
|
"selectable": false,
|
|
"pressable": false,
|
|
"data": {
|
|
"header": "",
|
|
"title": {
|
|
"$loc": {
|
|
"key": "$.HeadlineTitle",
|
|
"data": "$loc $.CategoryData.Name"
|
|
}
|
|
},
|
|
"typeicon": "$.CategoryData.Icon",
|
|
"multilinetitle": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"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": {
|
|
"$each $.Challenges": {
|
|
"view": "menu3.basic.ThumbnailItemTile",
|
|
"id": "$formatstring challengeItem_{$.Name}",
|
|
"nrows": 1,
|
|
"ncols": 1,
|
|
"pressable": false,
|
|
"data": {
|
|
"ondemand": true,
|
|
"showningame": {
|
|
"$if $arg _isingame": {
|
|
"$then": true,
|
|
"$else": false
|
|
}
|
|
},
|
|
"image": "$res $.ImageName",
|
|
"completed": "$.Completed",
|
|
"desaturateNotComplete": true,
|
|
"icon": {
|
|
"$if $.Completed": {
|
|
"$then": "check"
|
|
}
|
|
},
|
|
"icon2": {
|
|
"$if $gt ($arraysize $.DifficultyLevels,0)": {
|
|
"$then": {
|
|
"$setup": {
|
|
"$set DifficultyLevelsOrdered": {
|
|
"$orderby": {
|
|
"from": "$.DifficultyLevels",
|
|
"by": "",
|
|
"order": [
|
|
"easy",
|
|
"normal",
|
|
"hard"
|
|
]
|
|
}
|
|
},
|
|
"$in": {
|
|
"$switch $.DifficultyLevelsOrdered[0]": [
|
|
{
|
|
"case": "easy",
|
|
"return": "difficultyeasy"
|
|
},
|
|
{
|
|
"case": "normal",
|
|
"return": "difficultynormal"
|
|
},
|
|
{
|
|
"case": "hard",
|
|
"return": "difficultyhard"
|
|
},
|
|
{
|
|
"default": null
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"actions": {
|
|
"select": [
|
|
{
|
|
"replace-children": {
|
|
"target": "detail_view_container",
|
|
"children": {
|
|
"selectable": false,
|
|
"children": {
|
|
"$if $.Completed": {
|
|
"$then": {
|
|
"view": "menu3.ChallengeDetailTile",
|
|
"selectable": false,
|
|
"pressable": false,
|
|
"data": {
|
|
"header": "$loc $.CategoryName",
|
|
"title": "$loc $.Name",
|
|
"icon": "$.Icon",
|
|
"description": "$loc $.Description",
|
|
"rewardsTitle": "$loc UI_MENU_PAGE_PROFILE_CHALLENGES_DETAILS_REWARDS",
|
|
"unlocks": {
|
|
"$each $.Drops": {
|
|
"$setup": {
|
|
"$set Item": "$item $.",
|
|
"$in": {
|
|
"name": "$.Item.name",
|
|
"image": "$.Item.image",
|
|
"rarity": "$.Item.rarity",
|
|
"perks": "$($repository $.Item.repositoryid).Perks",
|
|
"multiplier": "$.Item.multiplier"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"isnew": "$.IsNew",
|
|
"status": {
|
|
"$if $.Completed": {
|
|
"$then": "$loc UI_MENU_PAGE_PROFILE_CHALLENGE_ACCOMPLISHED",
|
|
"$else": "$loc UI_MENU_PAGE_PROFILE_CHALLENGE_NOT_ACCOMPLISHED"
|
|
}
|
|
},
|
|
"completed": "$.Completed",
|
|
"statusdate": "",
|
|
"disablerewards": "$.HideProgression",
|
|
"rewards": [
|
|
{
|
|
"name": "$loc UI_PERFORMANCE_MASTERY_XP",
|
|
"amount": "$.Rewards.MasteryXP"
|
|
}
|
|
],
|
|
"progress": "$.ChallengeProgress"
|
|
}
|
|
},
|
|
"$else": {
|
|
"$if $eq ($queryoption UI_OPTION_GAME_AID_CHALLENGEDESCRIPTION,2)": {
|
|
"$then": {
|
|
"view": "menu3.ChallengeDetailTile",
|
|
"selectable": false,
|
|
"pressable": false,
|
|
"data": {
|
|
"header": "",
|
|
"title": "",
|
|
"description": "$loc UI_MENU_PAGE_CHALLENGES_VERBOSITY_WARNING",
|
|
"rewardsTitle": "$loc UI_MENU_PAGE_PROFILE_CHALLENGES_DETAILS_REWARDS",
|
|
"unlocks": {
|
|
"$each $.Drops": {
|
|
"$setup": {
|
|
"$set Item": "$item $.",
|
|
"$in": {
|
|
"name": "$.Item.name",
|
|
"image": "$.Item.image",
|
|
"rarity": "$.Item.rarity",
|
|
"perks": "$($repository $.Item.repositoryid).Perks",
|
|
"multiplier": "$.Item.multiplier"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"isnew": "$.IsNew",
|
|
"status": "$loc UI_MENU_PAGE_PROFILE_CHALLENGE_NOT_ACCOMPLISHED",
|
|
"completed": false,
|
|
"statusdate": "",
|
|
"disablerewards": "$.HideProgression",
|
|
"rewards": [
|
|
{
|
|
"name": "$loc UI_PERFORMANCE_MASTERY_XP",
|
|
"amount": "$.Rewards.MasteryXP"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"$else": {
|
|
"$if $eq ($queryoption UI_OPTION_GAME_AID_CHALLENGEDESCRIPTION,1)": {
|
|
"$then": {
|
|
"view": "menu3.ChallengeDetailTile",
|
|
"selectable": false,
|
|
"pressable": false,
|
|
"data": {
|
|
"header": "$loc $.CategoryName",
|
|
"title": "$loc $.Name",
|
|
"icon": "$.Icon",
|
|
"description": "$loc UI_MENU_PAGE_CHALLENGES_VERBOSITY_WARNING",
|
|
"rewardsTitle": "$loc UI_MENU_PAGE_PROFILE_CHALLENGES_DETAILS_REWARDS",
|
|
"unlocks": {
|
|
"$each $.Drops": {
|
|
"$setup": {
|
|
"$set Item": "$item $.",
|
|
"$in": {
|
|
"name": "$.Item.name",
|
|
"image": "$.Item.image",
|
|
"rarity": "$.Item.rarity",
|
|
"perks": "$($repository $.Item.repositoryid).Perks",
|
|
"multiplier": "$.Item.multiplier"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"isnew": "$.IsNew",
|
|
"status": "$loc UI_MENU_PAGE_PROFILE_CHALLENGE_NOT_ACCOMPLISHED",
|
|
"completed": false,
|
|
"statusdate": "",
|
|
"disablerewards": "$.HideProgression",
|
|
"rewards": [
|
|
{
|
|
"name": "$loc UI_PERFORMANCE_MASTERY_XP",
|
|
"amount": "$.Rewards.MasteryXP"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"$else": {
|
|
"view": "menu3.ChallengeDetailTile",
|
|
"selectable": false,
|
|
"pressable": false,
|
|
"data": {
|
|
"header": "$loc $.CategoryName",
|
|
"title": "$loc $.Name",
|
|
"icon": "$.Icon",
|
|
"description": "$loc $.Description",
|
|
"rewardsTitle": "$loc UI_MENU_PAGE_PROFILE_CHALLENGES_DETAILS_REWARDS",
|
|
"unlocks": {
|
|
"$each $.Drops": {
|
|
"$setup": {
|
|
"$set Item": "$item $.",
|
|
"$in": {
|
|
"name": "$.Item.name",
|
|
"image": "$.Item.image",
|
|
"rarity": "$.Item.rarity",
|
|
"perks": "$($repository $.Item.repositoryid).Perks",
|
|
"multiplier": "$.Item.multiplier"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"isnew": "$.IsNew",
|
|
"status": {
|
|
"$if $.Completed": {
|
|
"$then": "$loc UI_MENU_PAGE_PROFILE_CHALLENGE_ACCOMPLISHED",
|
|
"$else": "$loc UI_MENU_PAGE_PROFILE_CHALLENGE_NOT_ACCOMPLISHED"
|
|
}
|
|
},
|
|
"completed": "$.Completed",
|
|
"statusdate": "",
|
|
"disablerewards": "$.HideProgression",
|
|
"rewards": [
|
|
{
|
|
"name": "$loc UI_PERFORMANCE_MASTERY_XP",
|
|
"amount": "$.Rewards.MasteryXP"
|
|
}
|
|
],
|
|
"progress": "$.ChallengeProgress"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"$if $not $arg DisableChallengesMasteryHandling": {
|
|
"$then": {
|
|
"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": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"select-changed": {
|
|
"replace-children": {
|
|
"target": "challenge_action_container",
|
|
"children": {
|
|
"$if": {
|
|
"$condition": {
|
|
"$and": [
|
|
"$.IsPlayable",
|
|
{
|
|
"$if": {
|
|
"$condition": {
|
|
"$and": [
|
|
"$timeexpired $.UserCentricContract.Contract.Metadata.PlayableUntil",
|
|
{
|
|
"$equal": [
|
|
"elusive",
|
|
"$.UserCentricContract.Contract.Metadata.Type"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"$then": false,
|
|
"$else": true
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"$then": {
|
|
"view": "menu3.basic.ChallengeActionButton",
|
|
"pressable": {
|
|
"$switch $.Type": [
|
|
{
|
|
"case": "global",
|
|
"return": false
|
|
},
|
|
{
|
|
"default": {
|
|
"$use $.UserCentricContract": {
|
|
"$switch $.Contract.Metadata.Type": [
|
|
{
|
|
"case": "usercreated",
|
|
"return": {
|
|
"$if $($arg _ugcrestricted)": {
|
|
"$then": false,
|
|
"$else": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"default": true
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"data": {
|
|
"header": {
|
|
"$switch $.Type": [
|
|
{
|
|
"case": "global",
|
|
"return": "$loc UI_MENU_PAGE_CHALLENGE_HEADER_GLOBAL"
|
|
},
|
|
{
|
|
"case": "contract",
|
|
"return": {
|
|
"$switch $.UserCentricContract.Contract.Metadata.Type": [
|
|
{
|
|
"case": "campaign",
|
|
"return": "$loc $.UserCentricContract.Contract.Metadata.GroupTitle"
|
|
},
|
|
{
|
|
"case": "flashback",
|
|
"return": {
|
|
"$use $.UserCentricContract": {
|
|
"$if": {
|
|
"$condition": {
|
|
"$and": [
|
|
"$eqs ($.Contract.Metadata.Type,flashback)",
|
|
"$not $.Data.IsFreeDLC"
|
|
]
|
|
},
|
|
"$then": {
|
|
"$if $not $stringvalid $.Contract.Metadata.Subtype": {
|
|
"$then": "$loc UI_CONTRACT_HEADER_SEASONAL",
|
|
"$else": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Subtype}"
|
|
}
|
|
},
|
|
"$else": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"case": "sniper",
|
|
"return": "$loc $formatstring UI_CONTRACT_HEADER_SNIPER"
|
|
},
|
|
{
|
|
"default": "$loc $formatstring UI_MENU_PAGE_CHALLENGE_HEADER_{$.UserCentricContract.Contract.Metadata.Type}"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"case": "location",
|
|
"return": "$loc UI_MENU_PAGE_CHALLENGE_HEADER_LOCATION"
|
|
},
|
|
{
|
|
"case": "parentlocation",
|
|
"return": "$loc UI_MENU_PAGE_CHALLENGE_HEADER_LOCATION"
|
|
},
|
|
{
|
|
"default": "$loc UI_MENU_PAGE_CHALLENGE_HEADER_CHALLENGE"
|
|
}
|
|
]
|
|
},
|
|
"title": {
|
|
"$switch $.Type": [
|
|
{
|
|
"case": "global",
|
|
"return": "$loc UI_MENU_PAGE_CHALLENGE_TITLE_GLOBAL"
|
|
},
|
|
{
|
|
"case": "contract",
|
|
"return": "$loc $.UserCentricContract.Contract.Metadata.Title"
|
|
},
|
|
{
|
|
"case": "location",
|
|
"return": "$loc $formatstring UI_{$.LocationId}_TITLE"
|
|
},
|
|
{
|
|
"case": "parentlocation",
|
|
"return": "$loc $formatstring UI_{$.ParentLocationId}_CITY"
|
|
},
|
|
{
|
|
"default": "$loc $.Name"
|
|
}
|
|
]
|
|
},
|
|
"icon": {
|
|
"$switch $.Type": [
|
|
{
|
|
"case": "contract",
|
|
"return": "mission"
|
|
},
|
|
{
|
|
"case": "location",
|
|
"return": "location"
|
|
},
|
|
{
|
|
"case": "parentlocation",
|
|
"return": "location"
|
|
},
|
|
{
|
|
"default": "challenge"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"stateproviders": [
|
|
{
|
|
"type": "contractavailability",
|
|
"contract": "$.UserCentricContract.Contract"
|
|
}
|
|
],
|
|
"actions": {
|
|
"$if": {
|
|
"$condition": {
|
|
"$or": [
|
|
"$eqs ($.Type,parentlocation)",
|
|
"$eqs ($.Type,location)"
|
|
]
|
|
},
|
|
"$then": {
|
|
"accept": {
|
|
"$switch $arg _pagename": [
|
|
{
|
|
"case": "destination",
|
|
"return": [
|
|
{
|
|
"set-selected": {
|
|
"target": "destination_mission_tab"
|
|
}
|
|
},
|
|
{
|
|
"set-selected": {
|
|
"target": "$formatstring {$.LocationId}_container"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"default": {
|
|
"push-menu-context": {
|
|
"onpageopened": {
|
|
"set-selected": {
|
|
"target": "$formatstring {$.LocationId}_container"
|
|
}
|
|
}
|
|
},
|
|
"link": {
|
|
"page": "destination",
|
|
"args": {
|
|
"locationId": "$.ParentLocationId",
|
|
"url": "destination",
|
|
"args": {
|
|
"locationId": "$.ParentLocationId"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"$else": {
|
|
"$switch $.Type": [
|
|
{
|
|
"case": "global",
|
|
"return": {}
|
|
},
|
|
{
|
|
"default": {
|
|
"$use $.UserCentricContract": {
|
|
"$mergeobjects": [
|
|
{
|
|
"on-content-unknown": {
|
|
"_comment": "No DLC could be found containing contract",
|
|
"alter-actions": {
|
|
"path": "accept",
|
|
"value": {
|
|
"show-modal": {
|
|
"config": {
|
|
"view": "menu3.modal.ModalDialogGeneric",
|
|
"buttons": [
|
|
"$loc UI_DIALOG_OK"
|
|
],
|
|
"data": {
|
|
"title": "$loc UI_CONTENT_UNKNOWN_DLC_TITLE",
|
|
"description": "$loc UI_CONTENT_UNKNOWN_DLC_TEXT"
|
|
}
|
|
},
|
|
"onbutton": []
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"on-content-not-owned": {
|
|
"_comment": "DLC is not owned",
|
|
"alter-actions": {
|
|
"path": "accept",
|
|
"value": {
|
|
"show-modal": {
|
|
"config": {
|
|
"view": "menu3.modal.ModalDialogGeneric",
|
|
"buttons": [
|
|
"$loc UI_DIALOG_OK"
|
|
],
|
|
"data": {
|
|
"title": "$loc UI_CONTENT_UNKNOWN_DLC_TITLE",
|
|
"description": "$loc UI_CONTENT_UNKNOWN_DLC_TEXT"
|
|
}
|
|
},
|
|
"onbutton": []
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"on-content-not-installed": {
|
|
"_comment": "DLC owned but not installed",
|
|
"alter-actions": {
|
|
"path": "accept",
|
|
"value": {
|
|
"show-modal": {
|
|
"config": {
|
|
"view": "menu3.modal.ModalDialogGeneric",
|
|
"buttons": [
|
|
"$loc UI_DIALOG_OK"
|
|
],
|
|
"data": {
|
|
"title": "$loc UI_CONTENT_UNKNOWN_DLC_TITLE",
|
|
"description": "$loc UI_CONTENT_UNKNOWN_DLC_TEXT"
|
|
}
|
|
},
|
|
"onbutton": []
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"on-content-downloading": {
|
|
"_comment": "DLC owned and currently downloading",
|
|
"alter-actions": {
|
|
"path": "accept",
|
|
"value": {
|
|
"show-modal": {
|
|
"config": {
|
|
"view": "menu3.modal.ModalDialogGeneric",
|
|
"buttons": [
|
|
"$loc UI_DIALOG_OK"
|
|
],
|
|
"data": {
|
|
"title": "$loc UI_CONTENT_UNKNOWN_DLC_TITLE",
|
|
"description": "$loc UI_CONTENT_UNKNOWN_DLC_TEXT"
|
|
}
|
|
},
|
|
"onbutton": []
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"on-content-update-required": {
|
|
"_comment": "DLC owned and update is required",
|
|
"alter-actions": {
|
|
"path": "accept",
|
|
"value": {
|
|
"show-modal": {
|
|
"config": {
|
|
"view": "menu3.modal.ModalDialogGeneric",
|
|
"buttons": [
|
|
"$loc UI_DIALOG_OK"
|
|
],
|
|
"data": {
|
|
"title": "$loc UI_CONTENT_UNKNOWN_DLC_TITLE",
|
|
"description": "$loc UI_CONTENT_UNKNOWN_DLC_TEXT"
|
|
}
|
|
},
|
|
"onbutton": []
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"on-content-installing": {
|
|
"_comment": "DLC owned and currently installing",
|
|
"alter-actions": {
|
|
"path": "accept",
|
|
"value": {
|
|
"show-modal": {
|
|
"config": {
|
|
"view": "menu3.modal.ModalDialogGeneric",
|
|
"buttons": [
|
|
"$loc UI_DIALOG_OK"
|
|
],
|
|
"data": {
|
|
"title": "$loc UI_CONTENT_UNKNOWN_DLC_TITLE",
|
|
"description": "$loc UI_CONTENT_UNKNOWN_DLC_TEXT"
|
|
}
|
|
},
|
|
"onbutton": []
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"on-entitlement-missing": {
|
|
"_comment": "Entitlement missing",
|
|
"alter-actions": {
|
|
"path": "accept",
|
|
"value": {
|
|
"show-modal": {
|
|
"config": {
|
|
"view": "menu3.modal.ModalDialogGeneric",
|
|
"buttons": [
|
|
"$loc UI_DIALOG_OK"
|
|
],
|
|
"data": {
|
|
"title": "$loc UI_CONTENT_UNKNOWN_DLC_TITLE",
|
|
"description": "$loc UI_CONTENT_UNKNOWN_DLC_TEXT"
|
|
}
|
|
},
|
|
"onbutton": []
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"on-content-available": {
|
|
"_comment": "Contract is ready to be played",
|
|
"alter-actions": {
|
|
"path": "accept",
|
|
"value": {
|
|
"$if": {
|
|
"$condition": {
|
|
"$and": [
|
|
"$.Data.IsLocked",
|
|
{
|
|
"$or": [
|
|
"$isnull $.lockoverride",
|
|
"$.lockoverride"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"$then": {
|
|
"show-modal": {
|
|
"config": {
|
|
"view": "menu3.modal.ModalDialogGeneric",
|
|
"buttons": [
|
|
"$loc UI_DIALOG_CONFIRM",
|
|
{
|
|
"label": "$loc UI_DIALOG_CANCEL",
|
|
"type": "cancel"
|
|
}
|
|
],
|
|
"data": {
|
|
"title": "$loc UI_LOCKED_CONTENT_DIALOGUE_TITLE",
|
|
"description": {
|
|
"$switch $.Contract.Metadata.Type": [
|
|
{
|
|
"case": "orbis",
|
|
"return": "$loc UI_LOCKED_CONTENT_DIALOGUE_TEXT_SARAJEVO6"
|
|
},
|
|
{
|
|
"default": "$loc UI_LOCKED_CONTENT_DIALOGUE_TEXT"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"onbutton": [
|
|
{
|
|
"trigger-action": {
|
|
"name": "on-goto-planning"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"$else": {
|
|
"trigger-action": {
|
|
"name": "on-goto-planning"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"on-goto-planning": {
|
|
"$switch $.Contract.Metadata.Type": [
|
|
{
|
|
"case": "creation",
|
|
"return": {
|
|
"link": {
|
|
"page": "contractcreation_planning",
|
|
"args": {
|
|
"url": "contractcreation/planning",
|
|
"args": {
|
|
"location": "$.Contract.Metadata.Location",
|
|
"contractCreationIdOverwrite": "$.Contract.Metadata.Id"
|
|
},
|
|
"contractid": "$.Contract.Metadata.Id"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"default": {
|
|
"$if": {
|
|
"$condition": {
|
|
"$isfreeprologueuser": ""
|
|
},
|
|
"$then": {
|
|
"$if $.fspdashboardcontract": {
|
|
"$then": {
|
|
"clear-contract-menu-context": {},
|
|
"set-contract-loading-screen-data": {
|
|
"contract": "$.Contract"
|
|
},
|
|
"start-contract": {
|
|
"contractid": "$.fspdashboardcontract.contractid"
|
|
}
|
|
},
|
|
"$else": {
|
|
"is-playable": {
|
|
"playableSince": "$.Contract.Metadata.PlayableSince",
|
|
"on-success": {
|
|
"$merge": [
|
|
{
|
|
"$if": {
|
|
"$condition": {
|
|
"$and": [
|
|
"$eqs ($.Contract.Metadata.Type,placeholder)",
|
|
"$.Data.LastPlayedAt",
|
|
"$.Data.EscalationCompleted"
|
|
]
|
|
},
|
|
"$then": [
|
|
{
|
|
"alter-history": {
|
|
"target": "destination",
|
|
"force-no-cache": true
|
|
}
|
|
},
|
|
{
|
|
"alter-history": {
|
|
"target": "hub",
|
|
"force-no-cache": true
|
|
}
|
|
}
|
|
],
|
|
"$else": null
|
|
}
|
|
},
|
|
{
|
|
"$switch $.Contract.Metadata.BriefingVideo": [
|
|
{
|
|
"case": null,
|
|
"return": {
|
|
"link": {
|
|
"page": {
|
|
"$if $eqs ($.EngineMode,multiplayer)": {
|
|
"$then": "planning_multiplayer",
|
|
"$else": "planning"
|
|
}
|
|
},
|
|
"isMultiplayer": {
|
|
"$if $eqs ($.EngineMode,multiplayer)": {
|
|
"$then": true,
|
|
"$else": false
|
|
}
|
|
},
|
|
"args": {
|
|
"url": "planning",
|
|
"args": {
|
|
"contractid": "$.Contract.Metadata.Id",
|
|
"resetescalation": {
|
|
"$if": {
|
|
"$condition": {
|
|
"$and": [
|
|
"$eqs ($.Contract.Metadata.Type,placeholder)",
|
|
"$.Data.LastPlayedAt",
|
|
"$.Data.EscalationCompleted"
|
|
]
|
|
},
|
|
"$then": true,
|
|
"$else": false
|
|
}
|
|
}
|
|
},
|
|
"contractid": "$.Contract.Metadata.Id"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"default": {
|
|
"link": {
|
|
"page": "video",
|
|
"addtohistory": false,
|
|
"args": {
|
|
"videoid": "$.Contract.Metadata.BriefingVideo",
|
|
"mountrootresources": "$formatstring [{$.Contract.Metadata.ScenePath}].entitytemplate",
|
|
"skipifshown": true,
|
|
"EngineMode": "$.EngineMode",
|
|
"link": {
|
|
"page": {
|
|
"$if $eqs ($.EngineMode,multiplayer)": {
|
|
"$then": "planning_multiplayer",
|
|
"$else": "planning"
|
|
}
|
|
},
|
|
"isMultiplayer": {
|
|
"$if $eqs ($.EngineMode,multiplayer)": {
|
|
"$then": true,
|
|
"$else": false
|
|
}
|
|
},
|
|
"args": {
|
|
"url": "planning",
|
|
"args": {
|
|
"contractid": "$.Contract.Metadata.Id",
|
|
"resetescalation": {
|
|
"$if": {
|
|
"$condition": {
|
|
"$and": [
|
|
"$eqs ($.Contract.Metadata.Type,placeholder)",
|
|
"$.Data.LastPlayedAt",
|
|
"$.Data.EscalationCompleted"
|
|
]
|
|
},
|
|
"$then": true,
|
|
"$else": false
|
|
}
|
|
}
|
|
},
|
|
"contractid": "$.Contract.Metadata.Id"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"on-failure-too-early": {
|
|
"$if": {
|
|
"$condition": {
|
|
"$and": [
|
|
"$eqs ($.Contract.Metadata.Type,elusive)",
|
|
"$stringvalid $.Data.ElusiveContractState",
|
|
"$stringvalid $.Data.LastPlayedAt",
|
|
"$lt ($converttimetonumber $.Data.LastPlayedAt,$converttimetonumber $.Contract.Metadata.PlayableSince)"
|
|
]
|
|
},
|
|
"$then": {
|
|
"show-modal": {
|
|
"config": {
|
|
"view": "menu3.modal.ModalDialogGeneric",
|
|
"buttons": [
|
|
{
|
|
"label": "$loc UI_DIALOG_CONFIRM_TITLE",
|
|
"type": "cancel"
|
|
}
|
|
],
|
|
"data": {
|
|
"title": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT_ET",
|
|
"description": "$loc UI_MENU_ERROR_STARTING_ELUSIVE_CONTRACT_NOT_PLAYABLE_YET_PREVIOUSLY_PLAYED_DESCRIPTION"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"$else": {
|
|
"show-modal": {
|
|
"config": {
|
|
"view": "menu3.modal.ModalDialogGeneric",
|
|
"buttons": [
|
|
{
|
|
"label": "$loc UI_DIALOG_CONFIRM_TITLE",
|
|
"type": "cancel"
|
|
}
|
|
],
|
|
"data": {
|
|
"title": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT_ET",
|
|
"description": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT_NOT_PLAYABLE_YET_DESCRIPTION_ET",
|
|
"_comment": "HACK: use typeoverride to make the buttons work",
|
|
"typeoverride": "online"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"on-failure-too-late": {
|
|
"_comment": "this is never reached, because we don't set playabelUntil above - by design",
|
|
"show-modal": {
|
|
"config": {
|
|
"view": "menu3.modal.ModalDialogGeneric",
|
|
"buttons": [
|
|
{
|
|
"label": "$loc UI_DIALOG_CONFIRM_TITLE",
|
|
"type": "cancel"
|
|
}
|
|
],
|
|
"data": {
|
|
"title": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT_ET",
|
|
"description": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT_NOT_PLAYABLE_ANYMORE_DESCRIPTION_ET"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"$else": {
|
|
"is-playable": {
|
|
"playableSince": "$.Contract.Metadata.PlayableSince",
|
|
"on-success": {
|
|
"$merge": [
|
|
{
|
|
"$if": {
|
|
"$condition": {
|
|
"$and": [
|
|
"$eqs ($.Contract.Metadata.Type,placeholder)",
|
|
"$.Data.LastPlayedAt",
|
|
"$.Data.EscalationCompleted"
|
|
]
|
|
},
|
|
"$then": [
|
|
{
|
|
"alter-history": {
|
|
"target": "destination",
|
|
"force-no-cache": true
|
|
}
|
|
},
|
|
{
|
|
"alter-history": {
|
|
"target": "hub",
|
|
"force-no-cache": true
|
|
}
|
|
}
|
|
],
|
|
"$else": null
|
|
}
|
|
},
|
|
{
|
|
"$switch $.Contract.Metadata.BriefingVideo": [
|
|
{
|
|
"case": null,
|
|
"return": {
|
|
"link": {
|
|
"page": {
|
|
"$if $eqs ($.EngineMode,multiplayer)": {
|
|
"$then": "planning_multiplayer",
|
|
"$else": "planning"
|
|
}
|
|
},
|
|
"isMultiplayer": {
|
|
"$if $eqs ($.EngineMode,multiplayer)": {
|
|
"$then": true,
|
|
"$else": false
|
|
}
|
|
},
|
|
"args": {
|
|
"url": "planning",
|
|
"args": {
|
|
"contractid": "$.Contract.Metadata.Id",
|
|
"resetescalation": {
|
|
"$if": {
|
|
"$condition": {
|
|
"$and": [
|
|
"$eqs ($.Contract.Metadata.Type,placeholder)",
|
|
"$.Data.LastPlayedAt",
|
|
"$.Data.EscalationCompleted"
|
|
]
|
|
},
|
|
"$then": true,
|
|
"$else": false
|
|
}
|
|
}
|
|
},
|
|
"contractid": "$.Contract.Metadata.Id"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"default": {
|
|
"link": {
|
|
"page": "video",
|
|
"addtohistory": false,
|
|
"args": {
|
|
"videoid": "$.Contract.Metadata.BriefingVideo",
|
|
"mountrootresources": "$formatstring [{$.Contract.Metadata.ScenePath}].entitytemplate",
|
|
"skipifshown": true,
|
|
"EngineMode": "$.EngineMode",
|
|
"link": {
|
|
"page": {
|
|
"$if $eqs ($.EngineMode,multiplayer)": {
|
|
"$then": "planning_multiplayer",
|
|
"$else": "planning"
|
|
}
|
|
},
|
|
"isMultiplayer": {
|
|
"$if $eqs ($.EngineMode,multiplayer)": {
|
|
"$then": true,
|
|
"$else": false
|
|
}
|
|
},
|
|
"args": {
|
|
"url": "planning",
|
|
"args": {
|
|
"contractid": "$.Contract.Metadata.Id",
|
|
"resetescalation": {
|
|
"$if": {
|
|
"$condition": {
|
|
"$and": [
|
|
"$eqs ($.Contract.Metadata.Type,placeholder)",
|
|
"$.Data.LastPlayedAt",
|
|
"$.Data.EscalationCompleted"
|
|
]
|
|
},
|
|
"$then": true,
|
|
"$else": false
|
|
}
|
|
}
|
|
},
|
|
"contractid": "$.Contract.Metadata.Id"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"on-failure-too-early": {
|
|
"$if": {
|
|
"$condition": {
|
|
"$and": [
|
|
"$eqs ($.Contract.Metadata.Type,elusive)",
|
|
"$stringvalid $.Data.ElusiveContractState",
|
|
"$stringvalid $.Data.LastPlayedAt",
|
|
"$lt ($converttimetonumber $.Data.LastPlayedAt,$converttimetonumber $.Contract.Metadata.PlayableSince)"
|
|
]
|
|
},
|
|
"$then": {
|
|
"show-modal": {
|
|
"config": {
|
|
"view": "menu3.modal.ModalDialogGeneric",
|
|
"buttons": [
|
|
{
|
|
"label": "$loc UI_DIALOG_CONFIRM_TITLE",
|
|
"type": "cancel"
|
|
}
|
|
],
|
|
"data": {
|
|
"title": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT_ET",
|
|
"description": "$loc UI_MENU_ERROR_STARTING_ELUSIVE_CONTRACT_NOT_PLAYABLE_YET_PREVIOUSLY_PLAYED_DESCRIPTION"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"$else": {
|
|
"show-modal": {
|
|
"config": {
|
|
"view": "menu3.modal.ModalDialogGeneric",
|
|
"buttons": [
|
|
{
|
|
"label": "$loc UI_DIALOG_CONFIRM_TITLE",
|
|
"type": "cancel"
|
|
}
|
|
],
|
|
"data": {
|
|
"title": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT_ET",
|
|
"description": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT_NOT_PLAYABLE_YET_DESCRIPTION_ET",
|
|
"_comment": "HACK: use typeoverride to make the buttons work",
|
|
"typeoverride": "online"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"on-failure-too-late": {
|
|
"_comment": "this is never reached, because we don't set playabelUntil above - by design",
|
|
"show-modal": {
|
|
"config": {
|
|
"view": "menu3.modal.ModalDialogGeneric",
|
|
"buttons": [
|
|
{
|
|
"label": "$loc UI_DIALOG_CONFIRM_TITLE",
|
|
"type": "cancel"
|
|
}
|
|
],
|
|
"data": {
|
|
"title": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT_ET",
|
|
"description": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT_NOT_PLAYABLE_ANYMORE_DESCRIPTION_ET"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"$else": null
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"deselect": {
|
|
"$if $not $arg DisableChallengesMasteryHandling": {
|
|
"$then": {
|
|
"set-mastery-data": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"buttons": [
|
|
{
|
|
"$if $arg ShowPrevNextButtonPrompt": {
|
|
"$then": {
|
|
"actiontype": "lt_rt",
|
|
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_PREVNEXT_CATEGORY",
|
|
"customplatform": {
|
|
"platform": "key",
|
|
"hide": true,
|
|
"actiontype": "mouse_lmb"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"controller": "group",
|
|
"id": "challenge_action_container",
|
|
"_comment": "contains the action button if available for selected element",
|
|
"row": 4.05,
|
|
"nrows": "0.5",
|
|
"ncols": "1",
|
|
"children": []
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"$else": {
|
|
"view": "menu3.basic.CategoryElement",
|
|
"data": {
|
|
"title": "$loc UI_MENU_PAGE_PLANNING_CHALLENGES",
|
|
"icon": "challenge"
|
|
},
|
|
"children": {
|
|
"selectable": true,
|
|
"pressable": false,
|
|
"actions": {
|
|
"select": {
|
|
"replace-children": {
|
|
"target": "headline_container",
|
|
"children": {
|
|
"view": "menu3.basic.DefaultNoContentHeader",
|
|
"selectable": false,
|
|
"pressable": false,
|
|
"data": {
|
|
"header": "",
|
|
"title": "$loc UI_MENU_PAGE_CONNECTION_REQUIRED",
|
|
"multilinetitle": true,
|
|
"typeicon": {
|
|
"$if $.Icon": {
|
|
"$then": "$.Icon",
|
|
"$else": "info"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"deselect": {
|
|
"replace-children": {
|
|
"target": "headline_container",
|
|
"children": []
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|