From 7c40a04d90f3be8283499d569268fc31e2053d4c Mon Sep 17 00:00:00 2001 From: Sainan Date: Thu, 6 Mar 2025 09:28:20 +0100 Subject: [PATCH] feat: fastDojoRoomDestruction cheat --- config.json.example | 1 + .../api/queueDojoComponentDestructionController.ts | 5 ++++- src/services/configService.ts | 1 + static/webui/index.html | 4 ++++ static/webui/translations/en.js | 1 + static/webui/translations/fr.js | 1 + static/webui/translations/ru.js | 1 + 7 files changed, 13 insertions(+), 1 deletion(-) diff --git a/config.json.example b/config.json.example index af2e9846..db0f6d41 100644 --- a/config.json.example +++ b/config.json.example @@ -33,6 +33,7 @@ "noDailyStandingLimits": true, "instantResourceExtractorDrones": false, "noDojoRoomBuildStage": true, + "fastDojoRoomDestruction": true, "noDojoResearchCosts": true, "noDojoResearchTime": true, "spoofMasteryRank": -1 diff --git a/src/controllers/api/queueDojoComponentDestructionController.ts b/src/controllers/api/queueDojoComponentDestructionController.ts index 40ef89ec..a4459cdd 100644 --- a/src/controllers/api/queueDojoComponentDestructionController.ts +++ b/src/controllers/api/queueDojoComponentDestructionController.ts @@ -1,3 +1,4 @@ +import { config } from "@/src/services/configService"; import { getDojoClient, getGuildForRequest } from "@/src/services/guildService"; import { RequestHandler } from "express"; @@ -5,7 +6,9 @@ export const queueDojoComponentDestructionController: RequestHandler = async (re const guild = await getGuildForRequest(req); const componentId = req.query.componentId as string; - guild.DojoComponents.id(componentId)!.DestructionTime = new Date(Date.now() + 2 * 3600_000); + guild.DojoComponents.id(componentId)!.DestructionTime = new Date( + Date.now() + (config.fastDojoRoomDestruction ? 5_000 : 2 * 3600_000) + ); await guild.save(); res.json(await getDojoClient(guild, 0, componentId)); diff --git a/src/services/configService.ts b/src/services/configService.ts index 788ee4bf..e1c79534 100644 --- a/src/services/configService.ts +++ b/src/services/configService.ts @@ -59,6 +59,7 @@ interface IConfig { noDailyStandingLimits?: boolean; instantResourceExtractorDrones?: boolean; noDojoRoomBuildStage?: boolean; + fastDojoRoomDestruction?: boolean; noDojoResearchCosts?: boolean; noDojoResearchTime?: boolean; spoofMasteryRank?: number; diff --git a/static/webui/index.html b/static/webui/index.html index a84fa719..77389791 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -525,6 +525,10 @@ +
+ + +
diff --git a/static/webui/translations/en.js b/static/webui/translations/en.js index 628abcd7..bc1472c0 100644 --- a/static/webui/translations/en.js +++ b/static/webui/translations/en.js @@ -111,6 +111,7 @@ dict = { cheats_noDailyStandingLimits: `No Daily Standing Limits`, cheats_instantResourceExtractorDrones: `Instant Resource Extractor Drones`, cheats_noDojoRoomBuildStage: `No Dojo Room Build Stage`, + cheats_fastDojoRoomDestruction: `Fast Dojo Room Destruction`, cheats_noDojoResearchCosts: `No Dojo Research Costs`, cheats_noDojoResearchTime: `No Dojo Research Time`, cheats_spoofMasteryRank: `Spoofed Mastery Rank (-1 to disable)`, diff --git a/static/webui/translations/fr.js b/static/webui/translations/fr.js index 45480bc5..5acce802 100644 --- a/static/webui/translations/fr.js +++ b/static/webui/translations/fr.js @@ -112,6 +112,7 @@ dict = { cheats_noDailyStandingLimits: `Pas de limite de réputation journalière`, cheats_instantResourceExtractorDrones: `Ressources de drone d'extraction instantannées`, cheats_noDojoRoomBuildStage: `No Dojo Room Build Stage`, + cheats_fastDojoRoomDestruction: `[UNTRANSLATED] Fast Dojo Room Destruction`, cheats_noDojoResearchCosts: `Aucun coût de recherche (Dojo)`, cheats_noDojoResearchTime: `Aucun temps de recherche (Dojo)`, cheats_spoofMasteryRank: `Spoofed Mastery Rank (-1 to disable)`, diff --git a/static/webui/translations/ru.js b/static/webui/translations/ru.js index d109c972..96deecc3 100644 --- a/static/webui/translations/ru.js +++ b/static/webui/translations/ru.js @@ -112,6 +112,7 @@ dict = { cheats_noDailyStandingLimits: `Без ежедневных ограничений репутации`, cheats_instantResourceExtractorDrones: `[UNTRANSLATED] Instant Resource Extractor Drones`, cheats_noDojoRoomBuildStage: `[UNTRANSLATED] No Dojo Room Build Stage`, + cheats_fastDojoRoomDestruction: `[UNTRANSLATED] Fast Dojo Room Destruction`, cheats_noDojoResearchCosts: `[UNTRANSLATED] No Dojo Research Costs`, cheats_noDojoResearchTime: `[UNTRANSLATED] No Dojo Research Time`, cheats_spoofMasteryRank: `Подделанный ранг мастерства (-1 для отключения)`,