From c42f68d904257a0a82268d8b769db64f04898407 Mon Sep 17 00:00:00 2001 From: Animan8000 Date: Mon, 10 Nov 2025 00:43:38 -0800 Subject: [PATCH] feat: alertsRepeatable cheat (#3012) For anyone who prefers certain alerts to be replayable (QTCC, etc.). Works on Clem, Maroo, Arbitration, SP Incursions, Kuva Siphon, Nightmare and special alerts like QTCC & Void Corruption and probably more. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3012 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: Animan8000 Co-committed-by: Animan8000 --- src/models/inventoryModels/inventoryModel.ts | 1 + src/services/missionInventoryUpdateService.ts | 6 ++++-- src/types/inventoryTypes/inventoryTypes.ts | 1 + static/webui/index.html | 4 ++++ static/webui/script.js | 2 +- static/webui/translations/de.js | 1 + static/webui/translations/en.js | 1 + static/webui/translations/es.js | 1 + static/webui/translations/fr.js | 3 ++- static/webui/translations/ru.js | 1 + static/webui/translations/uk.js | 1 + static/webui/translations/zh.js | 1 + 12 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/models/inventoryModels/inventoryModel.ts b/src/models/inventoryModels/inventoryModel.ts index 909639cc..fa582fa0 100644 --- a/src/models/inventoryModels/inventoryModel.ts +++ b/src/models/inventoryModels/inventoryModel.ts @@ -1464,6 +1464,7 @@ const inventorySchema = new Schema( unlockDoubleCapacityPotatoesEverywhere: Boolean, unlockExilusEverywhere: Boolean, unlockArcanesEverywhere: Boolean, + alertsRepeatable: Boolean, syndicateMissionsRepeatable: Boolean, instantFinishRivenChallenge: Boolean, noDailyStandingLimits: Boolean, diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index 884813d5..58d57755 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -194,7 +194,7 @@ export const addMissionInventoryUpdates = async ( } } if (inventoryUpdates.RewardInfo) { - if (inventoryUpdates.RewardInfo.periodicMissionTag) { + if (inventoryUpdates.RewardInfo.periodicMissionTag && !inventory.alertsRepeatable) { const tag = inventoryUpdates.RewardInfo.periodicMissionTag; const existingCompletion = inventory.PeriodicMissionCompletions.find(completion => completion.tag === tag); @@ -1170,7 +1170,9 @@ export const addMissionRewards = async ( if (inventory.CompletedAlerts.includes(alert._id.$oid)) { logger.debug(`alert ${alert._id.$oid} already completed, skipping alert reward`); } else { - inventory.CompletedAlerts.push(alert._id.$oid); + if (!inventory.alertsRepeatable) { + inventory.CompletedAlerts.push(alert._id.$oid); + } if (alert.MissionInfo.missionReward) { missionCompletionCredits += addFixedLevelRewards( alert.MissionInfo.missionReward, diff --git a/src/types/inventoryTypes/inventoryTypes.ts b/src/types/inventoryTypes/inventoryTypes.ts index 6f2ed342..1bc2c61c 100644 --- a/src/types/inventoryTypes/inventoryTypes.ts +++ b/src/types/inventoryTypes/inventoryTypes.ts @@ -39,6 +39,7 @@ export interface IAccountCheats { unlockDoubleCapacityPotatoesEverywhere?: boolean; unlockExilusEverywhere?: boolean; unlockArcanesEverywhere?: boolean; + alertsRepeatable?: boolean; syndicateMissionsRepeatable?: boolean; instantFinishRivenChallenge?: boolean; noDailyStandingLimits?: boolean; diff --git a/static/webui/index.html b/static/webui/index.html index 75fa3d52..7c052786 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -1004,6 +1004,10 @@ +
+ + +
diff --git a/static/webui/script.js b/static/webui/script.js index 1eda8345..ace99d86 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -425,7 +425,7 @@ function fetchItemList() { InnateToxinDamage: loc("damageType_Poison") }; - // Add mods mising in data sources + // Add mods missing in data sources data.mods.push({ uniqueName: "/Lotus/Upgrades/Mods/Fusers/LegendaryModFuser", name: loc("code_legendaryCore") diff --git a/static/webui/translations/de.js b/static/webui/translations/de.js index 3bef4a97..2ce7e4c9 100644 --- a/static/webui/translations/de.js +++ b/static/webui/translations/de.js @@ -239,6 +239,7 @@ dict = { cheats_fullyStockedVendors: `Händler haben volles Inventar`, cheats_baroAlwaysAvailable: `Baro immer im Relais verfügbar`, cheats_baroFullyStocked: `Baro hat volles Inventar`, + cheats_alertsRepeatable: `Alarmierungen wiederholbar`, cheats_syndicateMissionsRepeatable: `Syndikat-Missionen wiederholbar`, cheats_unlockAllProfitTakerStages: `Alle Profiteintreiber-Phasen freischalten`, cheats_unlockSuccInventory: `Erfolgreich. Bitte beachte, dass du dein Inventar neu synchronisieren musst, z. B. durch Besuch eines Dojo/Relais oder durch erneutes Anmelden.`, diff --git a/static/webui/translations/en.js b/static/webui/translations/en.js index 75d3cd0c..dcb8267a 100644 --- a/static/webui/translations/en.js +++ b/static/webui/translations/en.js @@ -238,6 +238,7 @@ dict = { cheats_fullyStockedVendors: `Fully Stocked Vendors`, cheats_baroAlwaysAvailable: `Baro Always Available`, cheats_baroFullyStocked: `Baro Fully Stocked`, + cheats_alertsRepeatable: `Alerts Repeatable`, cheats_syndicateMissionsRepeatable: `Syndicate Missions Repeatable`, cheats_unlockAllProfitTakerStages: `Unlock All Profit Taker Stages`, cheats_unlockSuccInventory: `Success. Please note that you'll need to resync your inventory, e.g. by visiting a dojo/relay or relogging.`, diff --git a/static/webui/translations/es.js b/static/webui/translations/es.js index 5de24c77..836b7c4c 100644 --- a/static/webui/translations/es.js +++ b/static/webui/translations/es.js @@ -239,6 +239,7 @@ dict = { cheats_fullyStockedVendors: `Vendedores con stock completo`, cheats_baroAlwaysAvailable: `Baro siempre disponible`, cheats_baroFullyStocked: `Baro con stock completo`, + cheats_alertsRepeatable: `[UNTRANSLATED] Alerts Repeatable`, cheats_syndicateMissionsRepeatable: `Misiones de sindicato rejugables`, cheats_unlockAllProfitTakerStages: `Desbloquea todas las etapas del Roba-ganancias`, cheats_unlockSuccInventory: `[UNTRANSLATED] Success. Please note that you'll need to resync your inventory, e.g. by visiting a dojo/relay or relogging.`, diff --git a/static/webui/translations/fr.js b/static/webui/translations/fr.js index 5246d35d..7d0119eb 100644 --- a/static/webui/translations/fr.js +++ b/static/webui/translations/fr.js @@ -1,4 +1,4 @@ -// French translation by Vitruvio +// French translation by Vitruvio (zexal.) dict = { general_inventoryUpdateNote: `[UNTRANSLATED] Note: To see changes in-game, you need to resync your inventory, e.g. by visiting a dojo/relay or relogging.`, general_inventoryUpdateNoteGameWs: `Note : Rouvrir un menu est nécessaire pour voir les changements.`, @@ -239,6 +239,7 @@ dict = { cheats_fullyStockedVendors: `Les vendeurs ont un stock à 100%`, cheats_baroAlwaysAvailable: `Baro toujours présent`, cheats_baroFullyStocked: `Stock de Baro au max`, + cheats_alertsRepeatable: `[UNTRANSLATED] Alerts Repeatable`, cheats_syndicateMissionsRepeatable: `Mission syndicat répétables`, cheats_unlockAllProfitTakerStages: `Débloquer toutes les étapes du Preneur de Profit`, cheats_unlockSuccInventory: `[UNTRANSLATED] Success. Please note that you'll need to resync your inventory, e.g. by visiting a dojo/relay or relogging.`, diff --git a/static/webui/translations/ru.js b/static/webui/translations/ru.js index d9062c26..567d4736 100644 --- a/static/webui/translations/ru.js +++ b/static/webui/translations/ru.js @@ -239,6 +239,7 @@ dict = { cheats_fullyStockedVendors: `Полностью укомплектованные торговцы`, cheats_baroAlwaysAvailable: `Баро всегда доступен`, cheats_baroFullyStocked: `Баро полностью укомплектован`, + cheats_alertsRepeatable: `[UNTRANSLATED] Alerts Repeatable`, cheats_syndicateMissionsRepeatable: `Повторять миссии синдиката`, cheats_unlockAllProfitTakerStages: `Разблокировать все этапы Сферы извлечения прибыли`, cheats_unlockSuccInventory: `[UNTRANSLATED] Success. Please note that you'll need to resync your inventory, e.g. by visiting a dojo/relay or relogging.`, diff --git a/static/webui/translations/uk.js b/static/webui/translations/uk.js index 422a9e36..64e99c88 100644 --- a/static/webui/translations/uk.js +++ b/static/webui/translations/uk.js @@ -239,6 +239,7 @@ dict = { cheats_fullyStockedVendors: `Повністю укомплектовані продавці`, cheats_baroAlwaysAvailable: `Баро завжди доступний`, cheats_baroFullyStocked: `Баро повністю укомплектований`, + cheats_alertsRepeatable: `[UNTRANSLATED] Alerts Repeatable`, cheats_syndicateMissionsRepeatable: `Повторювати місії синдиката`, cheats_unlockAllProfitTakerStages: `Розблокувати всі етапи Привласнювачки`, cheats_unlockSuccInventory: `[UNTRANSLATED] Success. Please note that you'll need to resync your inventory, e.g. by visiting a dojo/relay or relogging.`, diff --git a/static/webui/translations/zh.js b/static/webui/translations/zh.js index b07c44a5..8d36c529 100644 --- a/static/webui/translations/zh.js +++ b/static/webui/translations/zh.js @@ -239,6 +239,7 @@ dict = { cheats_fullyStockedVendors: `商人贩卖所有商品`, cheats_baroAlwaysAvailable: `虚空商人可永久访问`, cheats_baroFullyStocked: `虚空商人贩卖所有商品`, + cheats_alertsRepeatable: `[UNTRANSLATED] Alerts Repeatable`, cheats_syndicateMissionsRepeatable: `集团任务可重复完成`, cheats_unlockAllProfitTakerStages: `解锁利润收割者圆蛛所有阶段`, cheats_unlockSuccInventory: `[UNTRANSLATED] Success. Please note that you'll need to resync your inventory, e.g. by visiting a dojo/relay or relogging.`,