XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

feat: Void Corruption 2025 (#2865)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2865 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: Slayer55555 <slayer55555@noreply.localhost> Co-committed-by: Slayer55555 <slayer55555@noreply.localhost>

2ca895a5
Slayer55555 <slayer55555@noreply.localhost>
提交于

代码差异

14 个文件 +175 -2
Modified config-vanilla.json +4 -0
@@ -41,6 +41,10 @@
41 41 "naberusNightsOverride": null,
42 42 "proxyRebellion": false,
43 43 "proxyRebellionRewardsOverride": 0,
44 "voidCorruption2025Week1": false,
45 "voidCorruption2025Week2": false,
46 "voidCorruption2025Week3": false,
47 "voidCorruption2025Week4": false,
44 48 "galleonOfGhouls": 0,
45 49 "ghoulEmergenceOverride": null,
46 50 "plagueStarOverride": null,
Modified src/services/configService.ts +4 -0
@@ -51,6 +51,10 @@ export interface IConfig {
51 51 naberusNightsOverride?: boolean;
52 52 proxyRebellion?: boolean;
53 53 proxyRebellionRewardsOverride?: number;
54 voidCorruption2025Week1?: boolean;
55 voidCorruption2025Week2?: boolean;
56 voidCorruption2025Week3?: boolean;
57 voidCorruption2025Week4?: boolean;
54 58 galleonOfGhouls?: number;
55 59 ghoulEmergenceOverride?: boolean;
56 60 plagueStarOverride?: boolean;
Modified src/services/missionInventoryUpdateService.ts +21 -0
@@ -1151,6 +1151,27 @@ export const addMissionRewards = async (
1151 1151 let ConquestCompletedMissionsCount;
1152 1152
1153 1153 let missionCompletionCredits = 0;
1154
1155 if (rewardInfo.alertId) {
1156 const alert = getWorldState().Alerts.find(x => x._id.$oid == rewardInfo.alertId);
1157 if (!alert) {
1158 logger.warn(`mission completed unknown alert`, { alertId: rewardInfo.alertId });
1159 } else {
1160 if (inventory.CompletedAlerts.includes(alert._id.$oid)) {
1161 logger.debug(`alert ${alert._id.$oid} already completed, skipping alert reward`);
1162 } else {
1163 inventory.CompletedAlerts.push(alert._id.$oid);
1164 if (alert.MissionInfo.missionReward) {
1165 missionCompletionCredits += addFixedLevelRewards(
1166 alert.MissionInfo.missionReward,
1167 MissionRewards,
1168 rewardInfo
1169 );
1170 }
1171 }
1172 }
1173 }
1174
1154 1175 //inventory change is what the client has not rewarded itself, also the client needs to know the credit changes for display
1155 1176
1156 1177 if (rewardInfo.goalId) {
Modified src/services/worldStateService.ts +93 -0
@@ -19,6 +19,7 @@ import type {
19 19 ICalendarDay,
20 20 ICalendarEvent,
21 21 ICalendarSeason,
22 IAlert,
22 23 IGoal,
23 24 IInvasion,
24 25 ILiteSortie,
@@ -112,6 +113,89 @@ const sortieBossNode: Record<Exclude<TSortieBoss, "SORTIE_BOSS_CORRUPTED_VOR">,
112 113 SORTIE_BOSS_VOR: "SolNode108"
113 114 };
114 115
116 const configAlerts: Record<string, IAlert> = {
117 voidCorruption2025Week1: {
118 _id: { $oid: "677d452e2f324ee7b90f8ccf" },
119 Activation: { $date: { $numberLong: "1736524800000" } },
120 Expiry: { $date: { $numberLong: "2000000000000" } },
121 MissionInfo: {
122 location: "SolNode61",
123 missionType: "MT_SABOTAGE",
124 faction: "FC_CORPUS",
125 difficulty: 1,
126 missionReward: {
127 credits: 30000,
128 items: ["/Lotus/StoreItems/Upgrades/Mods/Pistol/DualStat/CorruptedFireRateDamagePistol"]
129 },
130 levelOverride: "/Lotus/Levels/Proc/Corpus/CorpusShipCoreSabotage",
131 enemySpec: "/Lotus/Types/Game/EnemySpecs/CorpusShipEnemySpecs/CorpusShipSquadA",
132 extraEnemySpec: "/Lotus/Types/Game/EnemySpecs/GamemodeExtraEnemySpecs/CorpusSabotageTiersA",
133 minEnemyLevel: 10,
134 maxEnemyLevel: 15
135 }
136 },
137 voidCorruption2025Week2: {
138 _id: { $oid: "677d45811daeae9de40e8c0f" },
139 Activation: { $date: { $numberLong: "1737129600000" } },
140 Expiry: { $date: { $numberLong: "2000000000000" } },
141 MissionInfo: {
142 location: "SettlementNode11",
143 missionType: "MT_DEFENSE",
144 faction: "FC_CORPUS",
145 difficulty: 1,
146 missionReward: {
147 credits: 30000,
148 items: ["/Lotus/StoreItems/Upgrades/Mods/Pistol/DualStat/CorruptedCritChanceFireRatePistol"]
149 },
150 levelOverride: "/Lotus/Levels/Proc/Corpus/CorpusShipDefense",
151 enemySpec: "/Lotus/Types/Game/EnemySpecs/CorpusShipEnemySpecs/CorpusShipSquadDefenseB",
152 minEnemyLevel: 20,
153 maxEnemyLevel: 25,
154 maxWaveNum: 6
155 }
156 },
157 voidCorruption2025Week3: {
158 _id: { $oid: "677d45a494ad716c90006b9a" },
159 Activation: { $date: { $numberLong: "1737734400000" } },
160 Expiry: { $date: { $numberLong: "2000000000000" } },
161 MissionInfo: {
162 location: "SolNode118",
163 missionType: "MT_ARTIFACT",
164 faction: "FC_CORPUS",
165 difficulty: 1,
166 missionReward: {
167 credits: 30000,
168 items: ["/Lotus/StoreItems/Upgrades/Mods/Pistol/DualStat/CorruptedCritDamagePistol"]
169 },
170 levelOverride: "/Lotus/Levels/Proc/Corpus/CorpusShipDisruption",
171 enemySpec: "/Lotus/Types/Game/EnemySpecs/CorpusShipEnemySpecs/CorpusShipSurvivalA",
172 extraEnemySpec: "/Lotus/Types/Game/EnemySpecs/SpecialMissionSpecs/DisruptionCorpusShip",
173 customAdvancedSpawners: ["/Lotus/Types/Enemies/AdvancedSpawners/ErrantSpecterInvasion"],
174 minEnemyLevel: 30,
175 maxEnemyLevel: 35
176 }
177 },
178 voidCorruption2025Week4: {
179 _id: { $oid: "677d4700682d173abb0e19fe" },
180 Activation: { $date: { $numberLong: "1738339200000" } },
181 Expiry: { $date: { $numberLong: "2000000000000" } },
182 MissionInfo: {
183 location: "SolNode4",
184 missionType: "MT_EXTERMINATION",
185 faction: "FC_CORPUS",
186 difficulty: 1,
187 missionReward: {
188 credits: 30000,
189 items: ["/Lotus/StoreItems/Upgrades/Mods/Pistol/DualStat/CorruptedDamageRecoilPistol"]
190 },
191 levelOverride: "/Lotus/Levels/Proc/Corpus/CorpusShipExterminate",
192 enemySpec: "/Lotus/Types/Game/EnemySpecs/CorpusShipEnemySpecs/CorpusShipExterminateMixed",
193 minEnemyLevel: 40,
194 maxEnemyLevel: 45
195 }
196 }
197 };
198
115 199 const eidolonJobs: readonly string[] = [
116 200 "/Lotus/Types/Gameplay/Eidolon/Jobs/AssassinateBountyAss",
117 201 "/Lotus/Types/Gameplay/Eidolon/Jobs/AssassinateBountyCap",
@@ -1481,6 +1565,15 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
1481 1565 worldState.VoidTraders.push(vt);
1482 1566 fullyStockBaro(vt);
1483 1567 }
1568
1569 if (config.worldState) {
1570 for (const [key, alert] of Object.entries(configAlerts)) {
1571 if (config.worldState[key as keyof typeof config.worldState]) {
1572 worldState.Alerts.push(alert);
1573 }
1574 }
1575 }
1576
1484 1577 const isFebruary = date.getUTCMonth() == 1;
1485 1578 if (config.worldState?.starDaysOverride ?? isFebruary) {
1486 1579 worldState.Goals.push({
Modified src/types/requestTypes.ts +1 -0
@@ -178,6 +178,7 @@ export interface IRewardInfo {
178 178 goalManifest?: string;
179 179 invasionId?: string;
180 180 invasionAllyFaction?: "FC_GRINEER" | "FC_CORPUS";
181 alertId?: string;
181 182 sortieId?: string;
182 183 sortieTag?: "Mission1" | "Mission2" | "Final";
183 184 sortiePrereqs?: string[];
Modified src/types/worldStateTypes.ts +24 -2
@@ -1,4 +1,4 @@
1 import type { IMissionReward } from "warframe-public-export-plus";
1 import type { IMissionReward, TFaction } from "warframe-public-export-plus";
2 2 import type { IMongoDate, IOid } from "./commonTypes.ts";
3 3
4 4 export interface IWorldState {
@@ -7,7 +7,7 @@ export interface IWorldState {
7 7 Time: number;
8 8 InGameMarket: IInGameMarket;
9 9 Goals: IGoal[];
10 Alerts: [];
10 Alerts: IAlert[];
11 11 Sorties: ISortie[];
12 12 LiteSorties: ILiteSortie[];
13 13 SyndicateMissions: ISyndicateMissionInfo[];
@@ -35,6 +35,28 @@ export interface IWorldState {
35 35 Tmp?: string;
36 36 }
37 37
38 export interface IAlert {
39 _id: IOid;
40 Activation: IMongoDate;
41 Expiry: IMongoDate;
42 MissionInfo: IAlertMissionInfo;
43 }
44
45 export interface IAlertMissionInfo {
46 location: string;
47 missionType: string;
48 faction: TFaction;
49 difficulty: number;
50 missionReward?: IMissionReward;
51 levelOverride?: string;
52 enemySpec?: string;
53 extraEnemySpec?: string;
54 customAdvancedSpawners?: string[];
55 minEnemyLevel?: number;
56 maxEnemyLevel?: number;
57 maxWaveNum?: number;
58 }
59
38 60 export interface IGoal {
39 61 _id: IOid;
40 62 Activation: IMongoDate;
Modified static/webui/index.html +21 -0
@@ -1232,6 +1232,27 @@
1232 1232 </select>
1233 1233 </div>
1234 1234 </div>
1235 <div class="mt-2">
1236 <label class="form-label" data-loc="worldState_voidCorruption" data-loc-replace="2025"></label>
1237 <div class="d-flex flex-wrap gap-3">
1238 <div class="form-check">
1239 <input class="form-check-input" type="checkbox" id="worldState.voidCorruptionWeek1" />
1240 <label class="form-check-label" for="worldState.voidCorruptionWeek1" data-loc="worldState_week" data-loc-replace="1"></label>
1241 </div>
1242 <div class="form-check">
1243 <input class="form-check-input" type="checkbox" id="worldState.voidCorruptionWeek2" />
1244 <label class="form-check-label" for="worldState.voidCorruptionWeek2" data-loc="worldState_week" data-loc-replace="2"></label>
1245 </div>
1246 <div class="form-check">
1247 <input class="form-check-input" type="checkbox" id="worldState.voidCorruptionWeek3" />
1248 <label class="form-check-label" for="worldState.voidCorruptionWeek3" data-loc="worldState_week" data-loc-replace="3"></label>
1249 </div>
1250 <div class="form-check">
1251 <input class="form-check-input" type="checkbox" id="worldState.voidCorruptionWeek4" />
1252 <label class="form-check-label" for="worldState.voidCorruptionWeek4" data-loc="worldState_week" data-loc-replace="4"></label>
1253 </div>
1254 </div>
1255 </div>
1235 1256 <div class="form-group mt-2">
1236 1257 <label class="form-label" for="worldState.galleonOfGhouls" data-loc="worldState_galleonOfGhouls"></label>
1237 1258 <abbr data-loc-inc="worldState_wolfHunt|worldState_anniversary|worldState_orphixVenom"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM320 200C333.3 200 344 210.7 344 224L344 336C344 349.3 333.3 360 320 360C306.7 360 296 349.3 296 336L296 224C296 210.7 306.7 200 320 200zM293.3 416C292.7 406.1 297.6 396.7 306.1 391.5C314.6 386.4 325.3 386.4 333.8 391.5C342.3 396.7 347.2 406.1 346.6 416C347.2 425.9 342.3 435.3 333.8 440.5C325.3 445.6 314.6 445.6 306.1 440.5C297.6 435.3 292.7 425.9 293.3 416z"/></svg></abbr>
Modified static/webui/translations/de.js +1 -0
@@ -279,6 +279,7 @@ dict = {
279 279 worldState_dogDays: `Hitzefrei`,
280 280 worldState_dogDaysRewards: `[UNTRANSLATED] Dog Days Rewards`,
281 281 worldState_wolfHunt: `Wolfsjagd (2025)`,
282 worldState_voidCorruption: `[UNTRANSLATED] Void Corruption (|VAL|)`,
282 283 worldState_orphixVenom: `Orphix Gift`,
283 284 worldState_longShadow: `Lange Schatten`,
284 285 worldState_hallowedFlame: `Geweihte Flamme`,
Modified static/webui/translations/en.js +1 -0
@@ -278,6 +278,7 @@ dict = {
278 278 worldState_dogDays: `Dog Days`,
279 279 worldState_dogDaysRewards: `Dog Days Rewards`,
280 280 worldState_wolfHunt: `Wolf Hunt (2025)`,
281 worldState_voidCorruption: `Void Corruption (|VAL|)`,
281 282 worldState_orphixVenom: `Orphix Venom`,
282 283 worldState_longShadow: `Long Shadow`,
283 284 worldState_hallowedFlame: `Hallowed Flame`,
Modified static/webui/translations/es.js +1 -0
@@ -279,6 +279,7 @@ dict = {
279 279 worldState_dogDays: `Canícula`,
280 280 worldState_dogDaysRewards: `Recompensas de Canícula`,
281 281 worldState_wolfHunt: `Cacería del Lobo (2025)`,
282 worldState_voidCorruption: `Corrupción del Vacío (|VAL|)`,
282 283 worldState_orphixVenom: `Veneno de Orphix`,
283 284 worldState_longShadow: `Sombra Prolongada`,
284 285 worldState_hallowedFlame: `Llama Sagrada`,
Modified static/webui/translations/fr.js +1 -0
@@ -279,6 +279,7 @@ dict = {
279 279 worldState_dogDays: `Bataille d'Eau`,
280 280 worldState_dogDaysRewards: `Récompenses de la Bataille d'Eau`,
281 281 worldState_wolfHunt: `Chasse au Loup (2025)`,
282 worldState_voidCorruption: `[UNTRANSLATED] Void Corruption (|VAL|)`,
282 283 worldState_orphixVenom: `Venin Orphix`,
283 284 worldState_longShadow: `La Propagation des Ombres`,
284 285 worldState_hallowedFlame: `Flamme Hantée`,
Modified static/webui/translations/ru.js +1 -0
@@ -279,6 +279,7 @@ dict = {
279 279 worldState_dogDays: `Знойные дни`,
280 280 worldState_dogDaysRewards: `Награды Знойных дней`,
281 281 worldState_wolfHunt: `Волчья Охота (2025)`,
282 worldState_voidCorruption: `[UNTRANSLATED] Void Corruption (|VAL|)`,
282 283 worldState_orphixVenom: `Яд Орфикса`,
283 284 worldState_longShadow: `Длинная Тень`,
284 285 worldState_hallowedFlame: `Священное пламя`,
Modified static/webui/translations/uk.js +1 -0
Modified static/webui/translations/zh.js +1 -0