1
mirror of https://github.com/thepeacockproject/Peacock synced 2025-03-21 00:04:22 +01:00

Fix Stashpoint and Agency Pickup templates

This commit is contained in:
AnthonyFuller 2023-12-01 19:06:34 +00:00
parent 1f5eed2991
commit c6d0b5f9df
2 changed files with 287 additions and 239 deletions

@ -4,9 +4,13 @@
"location": "$.Contract.Metadata.Location" "location": "$.Contract.Metadata.Location"
}, },
"onpageopened": { "onpageopened": {
"set-selected": { "target": "$arg SelectedAgencyPickup" } "set-selected": {
"target": "$arg SelectedAgencyPickup"
}
},
"onpageclosed": {
"set-mastery-data": {}
}, },
"onpageclosed": { "set-mastery-data": {} },
"buttons": [ "buttons": [
{ {
"actiontype": "accept", "actiontype": "accept",
@ -25,11 +29,17 @@
"$setupcomponents": { "$setupcomponents": {
"difficulty-manager": { "difficulty-manager": {
"always-reload-setup": true, "always-reload-setup": true,
"setup": { "difficulty": "$.Contract.Metadata.Difficulty" } "setup": {
"difficulty": "$.Contract.Metadata.Difficulty"
}
} }
}, },
"controller": "list", "controller": "list",
"actions": { "select": { "select-category": {} } }, "actions": {
"select": {
"select-category": {}
}
},
"children": [ "children": [
{ {
"controller": "group", "controller": "group",
@ -44,7 +54,10 @@
"view": "menu3.basic.HeadlineElement" "view": "menu3.basic.HeadlineElement"
} }
}, },
{ "id": "category_container", "controller": "list" }, {
"id": "category_container",
"controller": "list"
},
{ {
"view": "menu3.containers.ScrollingTabsContainer", "view": "menu3.containers.ScrollingTabsContainer",
"controller": "category", "controller": "category",
@ -85,12 +98,22 @@
] ]
} }
}, },
{ "case": "orbis", "return": "ica" }, {
{ "case": "campaign", "return": "mission" }, "case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{ {
"case": "sniper", "case": "sniper",
"return": "sniperrifle" "return": "sniperrifle"
}, },
{
"case": "arcade",
"return": "arcademode"
},
{ {
"default": { "default": {
"$if $.Contract.Metadata.IsVersus": { "$if $.Contract.Metadata.IsVersus": {
@ -121,7 +144,9 @@
"case": "featured", "case": "featured",
"return": false "return": false
}, },
{ "default": true } {
"default": true
}
] ]
} }
} }
@ -209,7 +234,9 @@
"controller": "group", "controller": "group",
"view": "menu3.containers.ScrollingListContainer", "view": "menu3.containers.ScrollingListContainer",
"direction": "horizontal", "direction": "horizontal",
"data": { "direction": "horizontal" }, "data": {
"direction": "horizontal"
},
"row": 1, "row": 1,
"pages": true, "pages": true,
"nrows": 3, "nrows": 3,
@ -303,7 +330,9 @@
"rarity": "$($arg SelectedItem).rarity" "rarity": "$($arg SelectedItem).rarity"
} }
}, },
{ "default": null } {
"default": null
}
] ]
}, },
"locked": "$not $.unlocked", "locked": "$not $.unlocked",

@ -147,6 +147,10 @@
"case": "sniper", "case": "sniper",
"return": "sniperrifle" "return": "sniperrifle"
}, },
{
"case": "arcade",
"return": "arcademode"
},
{ {
"default": { "default": {
"$if $.Contract.Metadata.IsVersus": { "$if $.Contract.Metadata.IsVersus": {
@ -279,7 +283,7 @@
"$if $eq ($arraysize $.Items,0)": { "$if $eq ($arraysize $.Items,0)": {
"$then": { "$then": {
"$setup": { "$setup": {
"$set Title": "$loc UI_MENU_PAGE_NO_CHALLENGES_AVAILABLE", "$set Title": "$loc UI_MENU_ELEMENT_NO_CONTENT",
"$in": { "$in": {
"view": "menu3.basic.DefaultNoContentHeader", "view": "menu3.basic.DefaultNoContentHeader",
"selectable": false, "selectable": false,
@ -328,222 +332,266 @@
} }
}, },
{ {
"$setpageargs": { "$setup": {
"ShowPrevNextButtonPrompt": "$gt ($arraysize $.Items,1)" "$set GroupedItems": {
}, "$groupby": {
"controller": "category", "from": {
"id": "sub_category_controller", "$orderby": {
"container": "sub_category_container", "from": "$.Items",
"view": "menu3.containers.ScrollingTabsContainer", "by": "Item.Unlockable.Subtype",
"ncols": 10, "order": [
"direction": "horizontal", "container",
"submenu-navigation": true, "pistol",
"prevnextnav": true, "smg",
"data": { "shotgun",
"direction": "horizontal", "assaultrifle",
"submenu": true "sniperrifle",
}, "melee",
"children": { "tool",
"$each": { "distraction",
"in": { "poison",
"$groupby": { "explosive",
"from": { "classic",
"$orderby": { "formal",
"from": "$.Items", "coats",
"by": "Item.Unlockable.Subtype", "casual",
"order": [ "tactical",
"container", "themed"
"pistol", ]
"smg",
"shotgun",
"assaultrifle",
"sniperrifle",
"melee",
"tool",
"distraction",
"poison",
"explosive",
"classic",
"formal",
"coats",
"casual",
"tactical",
"themed"
]
}
},
"by": "Item.Unlockable.Subtype"
}
},
"do": {
"id": "$formatstring {$.by}_container",
"view": "menu3.basic.SubCategoryElement",
"data": {
"title": "$loc $formatstring UI_ITEM_SUBTYPE_IN_PLURAL_{$.by}"
},
"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": { "by": "Item.Unlockable.Subtype"
"id": "$formatstring scroll_container_{$.by}", }
"controller": "group", },
"view": "menu3.containers.ScrollingListContainer", "$in": {
"row": 1.0, "$setpageargs": {
"nrows": 3, "ShowPrevNextButtonPrompt": "$gt ($arraysize $.GroupedItems,1)"
"ncols": 10, },
"pages": true, "controller": "category",
"direction": "horizontal", "id": "sub_category_controller",
"data": { "container": "sub_category_container",
"direction": "horizontal" "view": "menu3.containers.ScrollingTabsContainer",
}, "ncols": 10,
"children": { "direction": "horizontal",
"$each": { "submenu-navigation": true,
"in": { "prevnextnav": true,
"$orderby": { "data": {
"from": "$.group", "direction": "horizontal",
"by": { "submenu": true
"$if $eqs ($.Item.Unlockable.Type,disguise)": { },
"$then": { "children": {
"$if $not $isnull $.Item.Unlockable.Properties.OrderIndex": { "$each": {
"$then": "$.Item.Unlockable.Properties.OrderIndex", "in": "$.GroupedItems",
"$else": 10000 "do": {
} "id": "$formatstring {$.by}_container",
}, "view": "menu3.basic.SubCategoryElement",
"$else": "$($item $.Item).name" "data": {
"title": "$loc $formatstring UI_ITEM_SUBTYPE_IN_PLURAL_{$.by}"
},
"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": {
"id": "$formatstring scroll_container_{$.by}",
"controller": "group",
"view": "menu3.containers.ScrollingListContainer",
"row": 1.0,
"nrows": 3,
"ncols": 10,
"pages": true,
"direction": "horizontal",
"data": {
"direction": "horizontal"
}, },
"do": { "children": {
"$mergeobjects": [ "$each": {
{ "in": {
"$if $arg usetalltile": { "$orderby": {
"$then": { "from": "$.group",
"view": "menu3.basic.ItemTileTall", "by": {
"nrows": 3 "$if $eqs ($.Item.Unlockable.Type,disguise)": {
}, "$then": {
"$else": { "$if $not $isnull $.Item.Unlockable.Properties.OrderIndex": {
"view": "menu3.basic.ItemTileSmall", "$then": "$.Item.Unlockable.Properties.OrderIndex",
"nrows": 1.5 "$else": 10000
}
},
"$else": "$($item $.Item).name"
}
} }
} }
}, },
{ "do": {
"$setup": { "$if ": {
"$set LocalizedReproItem": "$item $.Item", "$condition": {
"$in": { "$or": [
"ncols": 2, "$not $eqs ($.Item.Unlockable.Id,TOKEN_OUTFIT_WET_SUIT)",
"id": "$.LocalizedReproItem.id", "$not $eqs ($arg location,LOCATION_NEWZEALAND)"
"data": { ]
"_header": "$loc $formatstring UI_ITEM_SUBTYPE_{$.Item.Unlockable.Subtype}", },
"title": "$.LocalizedReproItem.name", "$then": {
"image": "$.LocalizedReproItem.image", "$mergeobjects": [
"rarity": "$.LocalizedReproItem.rarity",
"icon": {
"$if $eqs ($.Item.Unlockable.Type,disguise)": {
"$then": "disguise",
"$else": "$.Item.Unlockable.Subtype"
}
},
"perks": "$.LocalizedReproItem.perks",
"itemcount": "$.LocalizedReproItem.itemcount",
"header": {
"$if $isinloadout $.LocalizedReproItem.repositoryid": {
"$then": "$loc UI_MENU_PAGE_LOADOUT_ALREADY_IN_USE",
"$else": "$loc $formatstring UI_ITEM_SUBTYPE_{$.Item.Unlockable.Subtype}"
}
}
},
"buttons": [
{ {
"actiontype": "action-y", "$if $arg usetalltile": {
"actionlabel": "$loc UI_DIALOG_SHOW_DETAILS" "$then": {
} "view": "menu3.basic.ItemTileTall",
], "nrows": 3
"actions": { },
"select": { "$else": {
"replace-children": { "view": "menu3.basic.ItemTileSmall",
"target": "headline_container", "nrows": 1.5
"children": [ }
{ }
"view": "menu3.basic.ItemHeadlineElement",
"id": "headline_element"
}
]
},
"update-content": {
"target": "headline_element"
},
"update-buttons": {
"type": "slotitem",
"slotid": "$.SlotId",
"instanceId": "$.Item.InstanceId"
},
"set-repositoryitem-selected": "$.LocalizedReproItem.repositoryid"
}, },
"action-y": { {
"show-modal": { "$setup": {
"config": { "$set LocalizedReproItem": "$item $.Item",
"priority": "low", "$in": {
"view": "menu3.modal.ModalDialogItemDetails", "ncols": 2,
"buttons": [ "id": "$.LocalizedReproItem.id",
"$loc UI_DIALOG_OK",
{
"type": "cancel"
}
],
"data": { "data": {
"description": "$.LocalizedReproItem.desc", "_header": "$loc $formatstring UI_ITEM_SUBTYPE_{$.Item.Unlockable.Subtype}",
"name": "$.LocalizedReproItem.name", "title": "$.LocalizedReproItem.name",
"type": "$.Item.Unlockable.Type", "image": "$.LocalizedReproItem.image",
"subtype": { "rarity": "$.LocalizedReproItem.rarity",
"icon": {
"$if $eqs ($.Item.Unlockable.Type,disguise)": { "$if $eqs ($.Item.Unlockable.Type,disguise)": {
"$then": "disguise", "$then": "disguise",
"$else": "$.Item.Unlockable.Subtype" "$else": "$.Item.Unlockable.Subtype"
} }
}, },
"image": "$.LocalizedReproItem.image",
"rarity": "$.LocalizedReproItem.rarity",
"perks": "$.LocalizedReproItem.perks", "perks": "$.LocalizedReproItem.perks",
"item": "$($repository $.LocalizedReproItem.repositoryid)", "itemcount": "$.LocalizedReproItem.itemcount",
"displaybuttons": [ "header": {
{ "$if $isinloadout $.LocalizedReproItem.repositoryid": {
"actiontype": "cancel", "$then": "$loc UI_MENU_PAGE_LOADOUT_ALREADY_IN_USE",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_BACK", "$else": "$loc $formatstring UI_ITEM_SUBTYPE_{$.Item.Unlockable.Subtype}"
"hideIndicator": true
} }
], }
"actionAndKillTypes": { },
"$setup": { "buttons": [
"$set ItemRepositoryId": "$repository $.Item.Unlockable.Properties.RepositoryId", {
"$in": { "actiontype": "action-y",
"$convertarray": { "actionlabel": "$loc UI_DIALOG_SHOW_DETAILS"
"discardElementsWithoutConversion": true, }
"sourceArray": "$.ItemRepositoryId.OnlineTraits", ],
"conversionRules": { "actions": {
"melee_nonlethal": "$loc UI_ITEM_ONLINETRAITS_MELEE_NONLETHAL", "select": {
"melee_lethal": "$loc UI_ITEM_ONLINETRAITS_MELEE_LETHAL", "replace-children": {
"throw_nonlethal": "$loc UI_ITEM_ONLINETRAITS_THROW_NONLETHAL", "target": "headline_container",
"throw_lethal": "$loc UI_ITEM_ONLINETRAITS_THROW_LETHAL", "children": [
"fiberwire": "$loc UI_ITEM_ONLINETRAITS_FIBERWIRE", {
"syringe_poison": "$loc UI_ITEM_ONLINETRAITS_SYRINGE_POISON", "view": "menu3.basic.ItemHeadlineElement",
"consumable_poison": "$loc UI_ITEM_ONLINETRAITS_CONSUMABLE_POISON", "id": "headline_element"
"accident_explosion": "$loc UI_KILL_METHOD_ACCIDENT_EXPLOSION", }
"detonator_explosive_device": "$loc UI_KILL_METHOD_EXPLOSIVE", ]
"explosive_device": "$loc UI_KILL_METHOD_EXPLOSIVE" },
"update-content": {
"target": "headline_element"
},
"update-buttons": {
"type": "slotitem",
"slotid": "$.SlotId",
"instanceId": "$.Item.InstanceId"
},
"set-repositoryitem-selected": "$.LocalizedReproItem.repositoryid"
},
"action-y": {
"show-modal": {
"config": {
"priority": "low",
"view": "menu3.modal.ModalDialogItemDetails",
"buttons": [
"$loc UI_DIALOG_OK",
{
"type": "cancel"
} }
],
"data": {
"description": "$.LocalizedReproItem.desc",
"name": "$.LocalizedReproItem.name",
"type": "$.Item.Unlockable.Type",
"subtype": {
"$if $eqs ($.Item.Unlockable.Type,disguise)": {
"$then": "disguise",
"$else": "$.Item.Unlockable.Subtype"
}
},
"image": "$.LocalizedReproItem.image",
"rarity": "$.LocalizedReproItem.rarity",
"perks": "$.LocalizedReproItem.perks",
"item": "$($repository $.LocalizedReproItem.repositoryid)",
"displaybuttons": [
{
"actiontype": "cancel",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_BACK",
"hideIndicator": true
}
],
"actionAndKillTypes": {
"$setup": {
"$set ItemRepositoryId": "$repository $.Item.Unlockable.Properties.RepositoryId",
"$in": {
"$convertarray": {
"discardElementsWithoutConversion": true,
"sourceArray": "$.ItemRepositoryId.OnlineTraits",
"conversionRules": {
"melee_nonlethal": "$loc UI_ITEM_ONLINETRAITS_MELEE_NONLETHAL",
"melee_lethal": "$loc UI_ITEM_ONLINETRAITS_MELEE_LETHAL",
"throw_nonlethal": "$loc UI_ITEM_ONLINETRAITS_THROW_NONLETHAL",
"throw_lethal": "$loc UI_ITEM_ONLINETRAITS_THROW_LETHAL",
"fiberwire": "$loc UI_ITEM_ONLINETRAITS_FIBERWIRE",
"syringe_poison": "$loc UI_ITEM_ONLINETRAITS_SYRINGE_POISON",
"consumable_poison": "$loc UI_ITEM_ONLINETRAITS_CONSUMABLE_POISON",
"accident_explosion": "$loc UI_KILL_METHOD_ACCIDENT_EXPLOSION",
"detonator_explosive_device": "$loc UI_KILL_METHOD_EXPLOSIVE",
"explosive_device": "$loc UI_KILL_METHOD_EXPLOSIVE"
}
}
}
}
}
}
}
}
},
"accept": {
"select-stashpoint": {
"target": {
"$if $arg set-stashpoint": {
"$then": "$arg stashpoint",
"$else": null
}
}
},
"loadout_equip_unequip": {
"slotid": "$.SlotId",
"instance": "$.Item",
"mode": "equip"
},
"request-back": {
"target": [
"contractcreation_planning",
"planning",
"multiplayer",
"gamemode_versus"
],
"usecache": {
"$if $isnull $arg usecacheonreturn": {
"$then": false,
"$else": "$arg usecacheonreturn"
} }
} }
} }
@ -551,41 +599,12 @@
} }
} }
} }
},
"accept": {
"select-stashpoint": {
"target": {
"$if $arg set-stashpoint": {
"$then": "$arg stashpoint",
"$else": null
}
}
},
"loadout_equip_unequip": {
"slotid": "$.SlotId",
"instance": "$.Item",
"mode": "equip"
},
"request-back": {
"target": [
"contractcreation_planning",
"planning",
"multiplayer",
"gamemode_versus"
],
"usecache": {
"$if $isnull $arg usecacheonreturn": {
"$then": false,
"$else": "$arg usecacheonreturn"
}
}
}
} }
} ]
} }
} }
} }
] }
} }
} }
} }