feat: add config options for event boosters
All checks were successful
Build / build (20) (push) Successful in 40s
Build / build (18) (push) Successful in 1m6s
Build / build (22) (push) Successful in 1m0s
Build / build (18) (pull_request) Successful in 43s
Build / build (20) (pull_request) Successful in 1m4s
Build / build (22) (pull_request) Successful in 1m0s

This commit is contained in:
Sainan 2025-03-14 19:56:38 +01:00
parent 0facdd1af9
commit b4c5cf6af8
3 changed files with 56 additions and 0 deletions

View File

@ -38,6 +38,9 @@
"fastClanAscension": false, "fastClanAscension": false,
"spoofMasteryRank": -1, "spoofMasteryRank": -1,
"events": { "events": {
"creditBoost": false,
"affinityBoost": false,
"resourceBoost": false,
"starDays": true "starDays": true
} }
} }

View File

@ -17,6 +17,7 @@ export const worldStateController: RequestHandler = (req, res) => {
: buildConfig.buildLabel, : buildConfig.buildLabel,
Time: Math.round(Date.now() / 1000), Time: Math.round(Date.now() / 1000),
Goals: [], Goals: [],
GlobalUpgrades: [],
EndlessXpChoices: [], EndlessXpChoices: [],
...staticWorldState ...staticWorldState
}; };
@ -76,6 +77,43 @@ export const worldStateController: RequestHandler = (req, res) => {
Nodes: [] Nodes: []
}; };
if (config.events?.creditBoost) {
worldState.GlobalUpgrades.push({
_id: { $oid: "5b23106f283a555109666672" },
Activation: { $date: { $numberLong: "1740164400000" } },
ExpiryDate: { $date: { $numberLong: "2000000000000" } },
UpgradeType: "GAMEPLAY_MONEY_REWARD_AMOUNT",
OperationType: "MULTIPLY",
Value: 2,
LocalizeTag: "",
LocalizeDescTag: ""
});
}
if (config.events?.affinityBoost) {
worldState.GlobalUpgrades.push({
_id: { $oid: "5b23106f283a555109666673" },
Activation: { $date: { $numberLong: "1740164400000" } },
ExpiryDate: { $date: { $numberLong: "2000000000000" } },
UpgradeType: "GAMEPLAY_KILL_XP_AMOUNT",
OperationType: "MULTIPLY",
Value: 2,
LocalizeTag: "",
LocalizeDescTag: ""
});
}
if (config.events?.resourceBoost) {
worldState.GlobalUpgrades.push({
_id: { $oid: "5b23106f283a555109666674" },
Activation: { $date: { $numberLong: "1740164400000" } },
ExpiryDate: { $date: { $numberLong: "2000000000000" } },
UpgradeType: "GAMEPLAY_PICKUP_AMOUNT",
OperationType: "MULTIPLY",
Value: 2,
LocalizeTag: "",
LocalizeDescTag: ""
});
}
// Circuit choices cycling every week // Circuit choices cycling every week
worldState.EndlessXpChoices.push({ worldState.EndlessXpChoices.push({
Category: "EXC_NORMAL", Category: "EXC_NORMAL",
@ -158,6 +196,7 @@ interface IWorldState {
Time: number; Time: number;
Goals: IGoal[]; Goals: IGoal[];
SyndicateMissions: ISyndicateMission[]; SyndicateMissions: ISyndicateMission[];
GlobalUpgrades: IGlobalUpgrade[];
NodeOverrides: INodeOverride[]; NodeOverrides: INodeOverride[];
EndlessXpChoices: IEndlessXpChoice[]; EndlessXpChoices: IEndlessXpChoice[];
KnownCalendarSeasons: ICalendarSeason[]; KnownCalendarSeasons: ICalendarSeason[];
@ -188,6 +227,17 @@ interface ISyndicateMission {
Nodes: string[]; Nodes: string[];
} }
interface IGlobalUpgrade {
_id: IOid;
Activation: IMongoDate;
ExpiryDate: IMongoDate;
UpgradeType: string;
OperationType: string;
Value: number;
LocalizeTag: string;
LocalizeDescTag: string;
}
interface INodeOverride { interface INodeOverride {
_id: IOid; _id: IOid;
Activation?: IMongoDate; Activation?: IMongoDate;

View File

@ -64,6 +64,9 @@ interface IConfig {
fastClanAscension?: boolean; fastClanAscension?: boolean;
spoofMasteryRank?: number; spoofMasteryRank?: number;
events?: { events?: {
creditBoost?: boolean;
affinityBoost?: boolean;
resourceBoost?: boolean;
starDays?: boolean; starDays?: boolean;
}; };
} }