Skip to content

Commit

Permalink
based
Browse files Browse the repository at this point in the history
Added TS6, bumped server versions, updated store data and unlockables
  • Loading branch information
riisikumi committed Aug 20, 2023
1 parent 7725c91 commit a962604
Show file tree
Hide file tree
Showing 27 changed files with 2,576 additions and 23 deletions.
9 changes: 8 additions & 1 deletion components/contracts/missionsInLocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,14 @@ export const missionsInLocations = {
LOCATION_CAGED_FALCON: ["25b20d86-bb5a-4ebd-b6bb-81ed2779c180"],
},
elusive: {},
sarajevo: {},
sarajevo: {
LOCATION_PARIS: ["dd906289-7c32-427f-b689-98ae645b407f"],
LOCATION_COASTALTOWN: ["350ceea9-cfa9-4639-a66b-0d4de586eeee"],
LOCATION_MARRAKECH: ["59966a7f-3348-48da-a56c-4447aa548c85"],
LOCATION_BANGKOK: ["30c3546d-9881-45fa-8c7a-8b2c76b03e59"],
LOCATION_COLORADO: ["1c82c1e3-fe61-4001-a173-81fa11023460"],
LOCATION_HOKKAIDO: ["781c68ca-9318-40bf-9cc1-232007be02bf"],
},
/**
* Special property for pro mode missions (2016 exclusive).
* Mapping of location parent to pro mode contract ID, instead of the typical mission array.
Expand Down
46 changes: 44 additions & 2 deletions components/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,10 +510,52 @@ export class Controller {
}

if (lastServerSideData?.contracts) {
for (const [contractId, contractData] of Object.entries(
for (const contractData of Object.values(
lastServerSideData.contracts,
)) {
this.contracts.set(contractId, contractData)
this.addMission(contractData)

if (contractData.SMF?.destinations?.addToDestinations) {
if (
typeof contractData.SMF.destinations
.peacockIntegration === "undefined" ||
contractData.SMF.destinations.peacockIntegration
) {
if (contractData.SMF.destinations.placeBefore) {
controller.missionsInLocations[
contractData.Metadata.Location
].splice(
controller.missionsInLocations[
contractData.Metadata.Location
].indexOf(
contractData.SMF.destinations
.placeBefore,
),
0,
contractData.Metadata.Id,
)
} else if (
contractData.SMF.destinations.placeAfter
) {
controller.missionsInLocations[
contractData.Metadata.Location
].splice(
controller.missionsInLocations[
contractData.Metadata.Location
].indexOf(
contractData.SMF.destinations
.placeAfter,
) + 1,
0,
contractData.Metadata.Id,
)
} else {
controller.missionsInLocations[
contractData.Metadata.Location
].push(contractData.Metadata.Id)
}
}
}

if (contractData.SMF.destinations?.addToDestinations) {
if (contractData.SMF.destinations.peacockIntegration) {
Expand Down
4 changes: 2 additions & 2 deletions components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ app.use(
break
case "fghi4567xQOCheZIin0pazB47qGUvZw4":
case STEAM_NAMESPACE_2021:
req.serverVersion = "8-12"
req.serverVersion = "8-13"
break
default:
res.status(400).json({ message: "no game data" })
Expand Down Expand Up @@ -483,7 +483,7 @@ app.use(
}

if (
["6-74", "7-3", "7-17", "8-12"].includes(
["6-74", "7-3", "7-17", "8-13"].includes(
<string>req.serverVersion,
)
) {
Expand Down
6 changes: 3 additions & 3 deletions components/menuData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1122,9 +1122,9 @@ menuDataRouter.get(
[undefined, "Missions"],
["elusive", "ElusiveMissions"],
],
...(req.gameVersion === "h1" ||
(req.gameVersion === "h3" &&
missionsInLocations.sarajevo["h3enabled"])
...((req.gameVersion === "h1" &&
missionsInLocations.sarajevo["h2016enabled"]) ||
req.gameVersion === "h3"
? [["sarajevo", "SarajevoSixMissions"]]
: []),
]
Expand Down
33 changes: 33 additions & 0 deletions components/menus/campaigns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,39 @@ export function makeCampaigns(
],
},
pzCampaign,
{
Name: "UI_MENU_PAGE_HITS_ELEMENT_CATEGORY_SARAJEVOSIX",
Image: "",
Type: "campaign",
BackgroundImage:
"images/story/background_sarajevosix.jpg",
StoryData: [
genSingleMission(
"dd906289-7c32-427f-b689-98ae645b407f",
gameVersion,
),
genSingleMission(
"350ceea9-cfa9-4639-a66b-0d4de586eeee",
gameVersion,
),
genSingleMission(
"59966a7f-3348-48da-a56c-4447aa548c85",
gameVersion,
),
genSingleMission(
"30c3546d-9881-45fa-8c7a-8b2c76b03e59",
gameVersion,
),
genSingleMission(
"1c82c1e3-fe61-4001-a173-81fa11023460",
gameVersion,
),
genSingleMission(
"781c68ca-9318-40bf-9cc1-232007be02bf",
gameVersion,
),
],
},
{
Name: "UI_MENU_PAGE_BONUS_MISSIONS_TITLE",
Image: "",
Expand Down
2 changes: 1 addition & 1 deletion components/menus/menuSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { SyncBailHook, SyncHook } from "../hooksImpl"
const menuSystemPreRouter = Router()
const menuSystemRouter = Router()

// /resources-8-12/
// /resources-8-13/

/**
* A class for managing the menu system's fetched JSON data.
Expand Down
2 changes: 1 addition & 1 deletion components/officialServerAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function createUrlencodedBody(params: Record<string, string>): string {

const requestHeadersH3 = {
"User-agent": "G2 Http/1.0 (Windows NT 10.0; DX12/1; d3d12/1)",
Version: "8.12.0",
Version: "8.13.0",
}

const requestHeadersH2 = {
Expand Down
2 changes: 2 additions & 0 deletions components/platformEntitlements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ export const H3_EPIC_ENTITLEMENTS = [
"08d2bc4d20754191b6c488541d2b4fa1",
// CONCRETEART:
"a1e9a63fa4f3425aa66b9b8fa3c9cc35",
// THESARAJEVOSIX:
"28455871cd0d4ffab52f557cc012ea5e",
]

export const H2_STEAM_ENTITLEMENTS = [
Expand Down
44 changes: 44 additions & 0 deletions contractdata/BANGKOK/THEVETERAN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"Data": {
"EnableSaving": false,
"Objectives": [
{
"Id": "6bd1e308-9bf9-4f9d-97d7-12caf1db6b95",
"Primary": true,
"SuccessEvent": {
"EventName": "Kill",
"EventValues": {
"RepositoryId": "731db58c-ec2f-40e1-92a1-6c367683b7d9"
}
}
}
],
"Bricks": [
"assembly:/_pro/scenes/missions/bangkok/mission_ts6_gimlet.brick"
],
"GameChangers": []
},
"Metadata": {
"Id": "30c3546d-9881-45fa-8c7a-8b2c76b03e59",
"IsPublished": true,
"Year": 1,
"Title": "UI_CONTRACT_GIMLET_TITLE",
"Description": "UI_CONTRACT_GIMLET_DESC",
"BriefingVideo": "briefing_gimlet",
"DebriefingVideo": "debriefing_gimlet",
"CodeName_Hint": "Gimlet",
"ScenePath": "assembly:/_PRO/Scenes/Missions/bangkok/_Scene_Tiger.entity",
"TileImage": "images/contracts/sarajevosix/Orbis004_Gimlet/Title.jpg",
"Location": "LOCATION_BANGKOK",
"LastUpdate": "2015-03-10T12:00:00.441Z",
"CreationTimestamp": "2023-08-17T11:03:06.1530891Z",
"CreatorUserId": "fadb923c-e6bb-4283-a537-eb4d1150262e",
"Type": "orbis",
"Release": "1.4.x",
"RequiredUnlockable": "ACCESS_SARAJEVO6_GIMLET",
"Entitlements": ["H3_SARAJEVO_SIX"],
"Drops": ["ACCESS_SARAJEVO6_BLACK_RUSSIAN"],
"PublicId": "008825915747"
},
"UserData": {}
}
Loading

0 comments on commit a962604

Please sign in to comment.