返回提交历史
Modified
src/services/worldStateService.ts
+68
-65
XFEstudio/XFESpaceNinjaServer
fix: don't push thermal fractures event if it's not activated yet (#2722)
Closes #2721 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2722 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
b5c6c3e4
代码差异
1 个文件
+68
-65
@@ -2644,75 +2644,78 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
2644
2644
const activation = config.worldState?.thermiaFracturesOverride ? 1740416400000 : getSortieTime(activeStartDay);
2645
2645
const expiry = config.worldState?.thermiaFracturesOverride ? 2000000000000 : getSortieTime(activeStartDay + 14);
2646
2646
2647
worldState.Goals.push({
2648
_id: { $oid: "5c7cb0d00000000000000000" },
2649
Activation: { $date: { $numberLong: activation.toString() } },
2650
Expiry: { $date: { $numberLong: expiry.toString() } },
2651
Node: "SolNode129",
2652
ScoreVar: "FissuresClosed",
2653
ScoreLocTag: "/Lotus/Language/G1Quests/HeatFissuresEventScore",
2654
Count: count,
2655
HealthPct: count / 100,
2656
Regions: [1],
2657
Desc: "/Lotus/Language/G1Quests/HeatFissuresEventName",
2658
ToolTip: "/Lotus/Language/G1Quests/HeatFissuresEventDesc",
2659
OptionalInMission: true,
2660
Tag: "HeatFissure",
2661
UpgradeIds: [{ $oid: "5c81cefa4c4566791728eaa7" }, { $oid: "5c81cefa4c4566791728eaa6" }],
2662
Personal: true,
2663
Community: true,
2664
Goal: 100,
2665
Reward: {
2666
items: ["/Lotus/StoreItems/Weapons/Corpus/LongGuns/CrpBFG/Vandal/VandalCrpBFG"]
2667
},
2668
InterimGoals: [5, 25, 50, 75],
2669
InterimRewards: [
2670
{ items: ["/Lotus/StoreItems/Upgrades/Skins/Clan/OrbBadgeItem"] },
2671
{
2672
items: [
2673
"/Lotus/StoreItems/Upgrades/Mods/DualSource/Shotgun/ShotgunMedicMod",
2674
"/Lotus/StoreItems/Upgrades/Mods/DualSource/Rifle/SerratedRushMod"
2675
]
2676
},
2677
{
2678
items: [
2679
"/Lotus/StoreItems/Upgrades/Mods/DualSource/Pistol/MultishotDodgeMod",
2680
"/Lotus/StoreItems/Upgrades/Mods/DualSource/Melee/CritDamageChargeSpeedMod"
2681
]
2682
},
2683
{ items: ["/Lotus/StoreItems/Upgrades/Skins/Sigils/OrbSigil"] }
2684
]
2685
});
2686
worldState.NodeOverrides.push({
2687
_id: { $oid: "5c7cb0d00000000000000000" },
2688
Activation: { $date: { $numberLong: activation.toString() } },
2689
Expiry: { $date: { $numberLong: expiry.toString() } },
2690
Node: "SolNode129",
2691
Faction: "FC_CORPUS",
2692
CustomNpcEncounters: ["/Lotus/Types/Gameplay/Venus/Encounters/Heists/ExploiterHeistFissure"]
2693
});
2694
if (count >= 35) {
2695
worldState.GlobalUpgrades.push({
2696
_id: { $oid: "5c81cefa4c4566791728eaa6" },
2647
// If we push it, the game may show the event even tho it's not activated yet (https://onlyg.it/OpenWF/SpaceNinjaServer/issues/2721)
2648
if (timeMs >= activation) {
2649
worldState.Goals.push({
2650
_id: { $oid: "5c7cb0d00000000000000000" },
2697
2651
Activation: { $date: { $numberLong: activation.toString() } },
2698
ExpiryDate: { $date: { $numberLong: expiry.toString() } },
2699
UpgradeType: "GAMEPLAY_MONEY_REWARD_AMOUNT",
2700
OperationType: "MULTIPLY",
2701
Value: 2,
2702
Nodes: ["SolNode129"]
2652
Expiry: { $date: { $numberLong: expiry.toString() } },
2653
Node: "SolNode129",
2654
ScoreVar: "FissuresClosed",
2655
ScoreLocTag: "/Lotus/Language/G1Quests/HeatFissuresEventScore",
2656
Count: count,
2657
HealthPct: count / 100,
2658
Regions: [1],
2659
Desc: "/Lotus/Language/G1Quests/HeatFissuresEventName",
2660
ToolTip: "/Lotus/Language/G1Quests/HeatFissuresEventDesc",
2661
OptionalInMission: true,
2662
Tag: "HeatFissure",
2663
UpgradeIds: [{ $oid: "5c81cefa4c4566791728eaa7" }, { $oid: "5c81cefa4c4566791728eaa6" }],
2664
Personal: true,
2665
Community: true,
2666
Goal: 100,
2667
Reward: {
2668
items: ["/Lotus/StoreItems/Weapons/Corpus/LongGuns/CrpBFG/Vandal/VandalCrpBFG"]
2669
},
2670
InterimGoals: [5, 25, 50, 75],
2671
InterimRewards: [
2672
{ items: ["/Lotus/StoreItems/Upgrades/Skins/Clan/OrbBadgeItem"] },
2673
{
2674
items: [
2675
"/Lotus/StoreItems/Upgrades/Mods/DualSource/Shotgun/ShotgunMedicMod",
2676
"/Lotus/StoreItems/Upgrades/Mods/DualSource/Rifle/SerratedRushMod"
2677
]
2678
},
2679
{
2680
items: [
2681
"/Lotus/StoreItems/Upgrades/Mods/DualSource/Pistol/MultishotDodgeMod",
2682
"/Lotus/StoreItems/Upgrades/Mods/DualSource/Melee/CritDamageChargeSpeedMod"
2683
]
2684
},
2685
{ items: ["/Lotus/StoreItems/Upgrades/Skins/Sigils/OrbSigil"] }
2686
]
2703
2687
});
2704
}
2705
// Not sure about that
2706
if (count == 100) {
2707
worldState.GlobalUpgrades.push({
2708
_id: { $oid: "5c81cefa4c4566791728eaa7" },
2688
worldState.NodeOverrides.push({
2689
_id: { $oid: "5c7cb0d00000000000000000" },
2709
2690
Activation: { $date: { $numberLong: activation.toString() } },
2710
ExpiryDate: { $date: { $numberLong: expiry.toString() } },
2711
UpgradeType: "GAMEPLAY_PICKUP_AMOUNT",
2712
OperationType: "MULTIPLY",
2713
Value: 2,
2714
Nodes: ["SolNode129"]
2691
Expiry: { $date: { $numberLong: expiry.toString() } },
2692
Node: "SolNode129",
2693
Faction: "FC_CORPUS",
2694
CustomNpcEncounters: ["/Lotus/Types/Gameplay/Venus/Encounters/Heists/ExploiterHeistFissure"]
2715
2695
});
2696
if (count >= 35) {
2697
worldState.GlobalUpgrades.push({
2698
_id: { $oid: "5c81cefa4c4566791728eaa6" },
2699
Activation: { $date: { $numberLong: activation.toString() } },
2700
ExpiryDate: { $date: { $numberLong: expiry.toString() } },
2701
UpgradeType: "GAMEPLAY_MONEY_REWARD_AMOUNT",
2702
OperationType: "MULTIPLY",
2703
Value: 2,
2704
Nodes: ["SolNode129"]
2705
});
2706
}
2707
// Not sure about that
2708
if (count == 100) {
2709
worldState.GlobalUpgrades.push({
2710
_id: { $oid: "5c81cefa4c4566791728eaa7" },
2711
Activation: { $date: { $numberLong: activation.toString() } },
2712
ExpiryDate: { $date: { $numberLong: expiry.toString() } },
2713
UpgradeType: "GAMEPLAY_PICKUP_AMOUNT",
2714
OperationType: "MULTIPLY",
2715
Value: 2,
2716
Nodes: ["SolNode129"]
2717
});
2718
}
2716
2719
}
2717
2720
}
2718
2721