From 727f6837bac55f612f532a70e7c6c67f281fee0b Mon Sep 17 00:00:00 2001 From: Animan8000 Date: Sun, 18 May 2025 01:33:16 -0700 Subject: [PATCH] feat: instantFinishRivenChallenge cheat (#2087) Closes #1952 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2087 Co-authored-by: Animan8000 Co-committed-by: Animan8000 --- Dockerfile | 1 + config.json.example | 1 + docker-compose.yml | 1 + src/controllers/api/activateRandomModController.ts | 11 +++++++++-- src/services/configService.ts | 1 + static/webui/index.html | 4 ++++ static/webui/translations/de.js | 1 + static/webui/translations/en.js | 1 + static/webui/translations/es.js | 1 + static/webui/translations/fr.js | 1 + static/webui/translations/ru.js | 1 + static/webui/translations/zh.js | 1 + 12 files changed, 23 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4e1428e4..a988b8bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,6 +32,7 @@ ENV APP_NO_MASTERY_RANK_UP_COOLDOWN=false ENV APP_NO_VENDOR_PURCHASE_LIMITS=true ENV APP_NO_DEATH_MARKS=false ENV APP_NO_KIM_COOLDOWNS=false +ENV APP_INSTANT_FINISH_RIVEN_CHALLENGE=false ENV APP_INSTANT_RESOURCE_EXTRACTOR_DRONES=false ENV APP_NO_RESOURCE_EXTRACTOR_DRONES_DAMAGE=false ENV APP_SKIP_CLAN_KEY_CRAFTING=false diff --git a/config.json.example b/config.json.example index fdf59b35..19d1d170 100644 --- a/config.json.example +++ b/config.json.example @@ -38,6 +38,7 @@ "noVendorPurchaseLimits": true, "noDeathMarks": false, "noKimCooldowns": false, + "instantFinishRivenChallenge": false, "instantResourceExtractorDrones": false, "noResourceExtractorDronesDamage": false, "skipClanKeyCrafting": false, diff --git a/docker-compose.yml b/docker-compose.yml index be0f9f68..55539ba3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -39,6 +39,7 @@ services: # APP_NO_VENDOR_PURCHASE_LIMITS: true # APP_NO_DEATH_MARKS: false # APP_NO_KIM_COOLDOWNS: false + # APP_INSTANT_FINISH_RIVEN_CHALLENGE: false # APP_INSTANT_RESOURCE_EXTRACTOR_DRONES: false # APP_NO_RESOURCE_EXTRACTOR_DRONES_DAMAGE: false # APP_SKIP_CLAN_KEY_CRAFTING: false diff --git a/src/controllers/api/activateRandomModController.ts b/src/controllers/api/activateRandomModController.ts index 5dc8499c..b0350434 100644 --- a/src/controllers/api/activateRandomModController.ts +++ b/src/controllers/api/activateRandomModController.ts @@ -1,11 +1,16 @@ import { toOid } from "@/src/helpers/inventoryHelpers"; -import { createVeiledRivenFingerprint, rivenRawToRealWeighted } from "@/src/helpers/rivenHelper"; +import { + createVeiledRivenFingerprint, + createUnveiledRivenFingerprint, + rivenRawToRealWeighted +} from "@/src/helpers/rivenHelper"; import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { addMods, getInventory } from "@/src/services/inventoryService"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getRandomElement } from "@/src/services/rngService"; import { RequestHandler } from "express"; import { ExportUpgrades } from "warframe-public-export-plus"; +import { config } from "@/src/services/configService"; export const activateRandomModController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); @@ -18,7 +23,9 @@ export const activateRandomModController: RequestHandler = async (req, res) => { } ]); const rivenType = getRandomElement(rivenRawToRealWeighted[request.ItemType])!; - const fingerprint = createVeiledRivenFingerprint(ExportUpgrades[rivenType]); + const fingerprint = config.instantFinishRivenChallenge + ? createUnveiledRivenFingerprint(ExportUpgrades[rivenType]) + : createVeiledRivenFingerprint(ExportUpgrades[rivenType]); const upgradeIndex = inventory.Upgrades.push({ ItemType: rivenType, diff --git a/src/services/configService.ts b/src/services/configService.ts index f17679d7..2157546a 100644 --- a/src/services/configService.ts +++ b/src/services/configService.ts @@ -44,6 +44,7 @@ interface IConfig { noVendorPurchaseLimits?: boolean; noDeathMarks?: boolean; noKimCooldowns?: boolean; + instantFinishRivenChallenge?: boolean; instantResourceExtractorDrones?: boolean; noResourceExtractorDronesDamage?: boolean; skipClanKeyCrafting?: boolean; diff --git a/static/webui/index.html b/static/webui/index.html index be72a678..15a00158 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -674,6 +674,10 @@ +
+ + +
diff --git a/static/webui/translations/de.js b/static/webui/translations/de.js index 4d7876c9..f8ca4d7b 100644 --- a/static/webui/translations/de.js +++ b/static/webui/translations/de.js @@ -151,6 +151,7 @@ dict = { cheats_noVendorPurchaseLimits: `Keine Kaufbeschränkungen bei Händlern`, cheats_noDeathMarks: `Keine Todesmarkierungen`, cheats_noKimCooldowns: `Keine Wartezeit bei KIM`, + cheats_instantFinishRivenChallenge: `Riven-Mod Herausforderung sofort abschließen`, cheats_instantResourceExtractorDrones: `Sofortige Ressourcen-Extraktor-Drohnen`, cheats_noResourceExtractorDronesDamage: `Kein Schaden für Ressourcen-Extraktor-Drohnen`, cheats_skipClanKeyCrafting: `Clan-Schlüsselherstellung überspringen`, diff --git a/static/webui/translations/en.js b/static/webui/translations/en.js index a8f8e858..6191ac71 100644 --- a/static/webui/translations/en.js +++ b/static/webui/translations/en.js @@ -150,6 +150,7 @@ dict = { cheats_noVendorPurchaseLimits: `No Vendor Purchase Limits`, cheats_noDeathMarks: `No Death Marks`, cheats_noKimCooldowns: `No KIM Cooldowns`, + cheats_instantFinishRivenChallenge: `Instant Finish Riven Challenge`, cheats_instantResourceExtractorDrones: `Instant Resource Extractor Drones`, cheats_noResourceExtractorDronesDamage: `No Resource Extractor Drones Damage`, cheats_skipClanKeyCrafting: `Skip Clan Key Crafting`, diff --git a/static/webui/translations/es.js b/static/webui/translations/es.js index 8f214edc..97302bb7 100644 --- a/static/webui/translations/es.js +++ b/static/webui/translations/es.js @@ -151,6 +151,7 @@ dict = { cheats_noVendorPurchaseLimits: `Sin límite de compras de vendedores`, cheats_noDeathMarks: `Sin marcas de muerte`, cheats_noKimCooldowns: `Sin tiempo de espera para conversaciones KIM`, + cheats_instantFinishRivenChallenge: `[UNTRANSLATED] Instant Finish Riven Challenge`, cheats_instantResourceExtractorDrones: `Drones de extracción de recursos instantáneos`, cheats_noResourceExtractorDronesDamage: `Sin daño a los drones extractores de recursos`, cheats_skipClanKeyCrafting: `Saltar la fabricación de la llave de clan`, diff --git a/static/webui/translations/fr.js b/static/webui/translations/fr.js index 63bdda1c..d9773d4c 100644 --- a/static/webui/translations/fr.js +++ b/static/webui/translations/fr.js @@ -151,6 +151,7 @@ dict = { cheats_noVendorPurchaseLimits: `Aucune limite d'achat chez les PNJ`, cheats_noDeathMarks: `Aucune marque d'assassin`, cheats_noKimCooldowns: `Aucun cooldown sur le KIM`, + cheats_instantFinishRivenChallenge: `[UNTRANSLATED] Instant Finish Riven Challenge`, cheats_instantResourceExtractorDrones: `Ressources de drones d'extraction instantannées`, cheats_noResourceExtractorDronesDamage: `Aucun dégâts aux drones d'extraction de resources`, cheats_skipClanKeyCrafting: `[UNTRANSLATED] Skip Clan Key Crafting`, diff --git a/static/webui/translations/ru.js b/static/webui/translations/ru.js index aa25b6a9..ccc1101a 100644 --- a/static/webui/translations/ru.js +++ b/static/webui/translations/ru.js @@ -151,6 +151,7 @@ dict = { cheats_noVendorPurchaseLimits: `Отсутствие лимитов на покупки у вендоров`, cheats_noDeathMarks: `Без меток сметри`, cheats_noKimCooldowns: `Чаты KIM без кулдауна`, + cheats_instantFinishRivenChallenge: `[UNTRANSLATED] Instant Finish Riven Challenge`, cheats_instantResourceExtractorDrones: `Мгновенные Экстракторы Ресурсов`, cheats_noResourceExtractorDronesDamage: `Без урона по дронам-сборщикам`, cheats_skipClanKeyCrafting: `Пропустить крафт кланового ключа`, diff --git a/static/webui/translations/zh.js b/static/webui/translations/zh.js index 8f5077a7..16d931f0 100644 --- a/static/webui/translations/zh.js +++ b/static/webui/translations/zh.js @@ -151,6 +151,7 @@ dict = { cheats_noVendorPurchaseLimits: `[UNTRANSLATED] No Vendor Purchase Limits`, cheats_noDeathMarks: `[UNTRANSLATED] No Death Marks`, cheats_noKimCooldowns: `[UNTRANSLATED] No KIM Cooldowns`, + cheats_instantFinishRivenChallenge: `[UNTRANSLATED] Instant Finish Riven Challenge`, cheats_instantResourceExtractorDrones: `即时资源采集无人机`, cheats_noResourceExtractorDronesDamage: `[UNTRANSLATED] No Resource Extractor Drones Damage`, cheats_skipClanKeyCrafting: `[UNTRANSLATED] Skip Clan Key Crafting`,