feat: add config options for event boosters #1184
@ -38,6 +38,9 @@
|
||||
"fastClanAscension": false,
|
||||
"spoofMasteryRank": -1,
|
||||
"events": {
|
||||
"creditBoost": false,
|
||||
"affinityBoost": false,
|
||||
"resourceBoost": false,
|
||||
"starDays": true
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ export const worldStateController: RequestHandler = (req, res) => {
|
||||
: buildConfig.buildLabel,
|
||||
Time: Math.round(Date.now() / 1000),
|
||||
Goals: [],
|
||||
GlobalUpgrades: [],
|
||||
EndlessXpChoices: [],
|
||||
...staticWorldState
|
||||
};
|
||||
@ -76,6 +77,43 @@ export const worldStateController: RequestHandler = (req, res) => {
|
||||
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
|
||||
worldState.EndlessXpChoices.push({
|
||||
Category: "EXC_NORMAL",
|
||||
@ -158,6 +196,7 @@ interface IWorldState {
|
||||
Time: number;
|
||||
Goals: IGoal[];
|
||||
SyndicateMissions: ISyndicateMission[];
|
||||
GlobalUpgrades: IGlobalUpgrade[];
|
||||
NodeOverrides: INodeOverride[];
|
||||
EndlessXpChoices: IEndlessXpChoice[];
|
||||
KnownCalendarSeasons: ICalendarSeason[];
|
||||
@ -188,6 +227,17 @@ interface ISyndicateMission {
|
||||
Nodes: string[];
|
||||
}
|
||||
|
||||
interface IGlobalUpgrade {
|
||||
_id: IOid;
|
||||
Activation: IMongoDate;
|
||||
ExpiryDate: IMongoDate;
|
||||
UpgradeType: string;
|
||||
OperationType: string;
|
||||
Value: number;
|
||||
LocalizeTag: string;
|
||||
LocalizeDescTag: string;
|
||||
}
|
||||
|
||||
interface INodeOverride {
|
||||
_id: IOid;
|
||||
Activation?: IMongoDate;
|
||||
|
@ -64,6 +64,9 @@ interface IConfig {
|
||||
fastClanAscension?: boolean;
|
||||
spoofMasteryRank?: number;
|
||||
events?: {
|
||||
creditBoost?: boolean;
|
||||
affinityBoost?: boolean;
|
||||
resourceBoost?: boolean;
|
||||
starDays?: boolean;
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user