diff --git a/config.json.example b/config.json.example index 4e52c750..626d2d7b 100644 --- a/config.json.example +++ b/config.json.example @@ -34,6 +34,7 @@ "noVendorPurchaseLimits": true, "instantResourceExtractorDrones": false, "noDojoRoomBuildStage": false, + "noDecoBuildStage": false, "fastDojoRoomDestruction": false, "noDojoResearchCosts": false, "noDojoResearchTime": false, diff --git a/src/controllers/api/placeDecoInComponentController.ts b/src/controllers/api/placeDecoInComponentController.ts index 7dab5bbf..cf50a90b 100644 --- a/src/controllers/api/placeDecoInComponentController.ts +++ b/src/controllers/api/placeDecoInComponentController.ts @@ -13,6 +13,7 @@ import { GuildPermission } from "@/src/types/guildTypes"; import { RequestHandler } from "express"; import { Types } from "mongoose"; import { ExportDojoRecipes, ExportResources } from "warframe-public-export-plus"; +import { config } from "@/src/services/configService"; export const placeDecoInComponentController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); @@ -62,42 +63,42 @@ export const placeDecoInComponentController: RequestHandler = async (req, res) = guild.VaultShipDecorations!.find(x => x.ItemType == itemType)!.ItemCount -= 1; } } - if (!meta || (meta.price == 0 && meta.ingredients.length == 0)) { - deco.CompletionTime = new Date(); - } else if ( - guild.AutoContributeFromVault && - guild.VaultRegularCredits && - guild.VaultMiscItems && - deco.Type != "/Lotus/Objects/Tenno/Props/TnoPaintBotDojoDeco" - ) { - if (guild.VaultRegularCredits >= scaleRequiredCount(guild.Tier, meta.price)) { - let enoughMiscItems = true; - for (const ingredient of meta.ingredients) { - if ( - getVaultMiscItemCount(guild, ingredient.ItemType) < - scaleRequiredCount(guild.Tier, ingredient.ItemCount) - ) { - enoughMiscItems = false; - break; - } - } - if (enoughMiscItems) { - guild.VaultRegularCredits -= scaleRequiredCount(guild.Tier, meta.price); - deco.RegularCredits = scaleRequiredCount(guild.Tier, meta.price); - - deco.MiscItems = []; - for (const ingredient of meta.ingredients) { - guild.VaultMiscItems.find(x => x.ItemType == ingredient.ItemType)!.ItemCount -= - scaleRequiredCount(guild.Tier, ingredient.ItemCount); - deco.MiscItems.push({ - ItemType: ingredient.ItemType, - ItemCount: scaleRequiredCount(guild.Tier, ingredient.ItemCount) - }); - } - - deco.CompletionTime = new Date(Date.now() + meta.time * 1000); + if (deco.Type != "/Lotus/Objects/Tenno/Props/TnoPaintBotDojoDeco") { + if (!meta || (meta.price == 0 && meta.ingredients.length == 0) || config.noDojoDecoBuildStage) { + deco.CompletionTime = new Date(); + if (meta) { processDojoBuildMaterialsGathered(guild, meta); } + } else if (guild.AutoContributeFromVault && guild.VaultRegularCredits && guild.VaultMiscItems) { + if (guild.VaultRegularCredits >= scaleRequiredCount(guild.Tier, meta.price)) { + let enoughMiscItems = true; + for (const ingredient of meta.ingredients) { + if ( + getVaultMiscItemCount(guild, ingredient.ItemType) < + scaleRequiredCount(guild.Tier, ingredient.ItemCount) + ) { + enoughMiscItems = false; + break; + } + } + if (enoughMiscItems) { + guild.VaultRegularCredits -= scaleRequiredCount(guild.Tier, meta.price); + deco.RegularCredits = scaleRequiredCount(guild.Tier, meta.price); + + deco.MiscItems = []; + for (const ingredient of meta.ingredients) { + guild.VaultMiscItems.find(x => x.ItemType == ingredient.ItemType)!.ItemCount -= + scaleRequiredCount(guild.Tier, ingredient.ItemCount); + deco.MiscItems.push({ + ItemType: ingredient.ItemType, + ItemCount: scaleRequiredCount(guild.Tier, ingredient.ItemCount) + }); + } + + deco.CompletionTime = new Date(Date.now() + meta.time * 1000); + processDojoBuildMaterialsGathered(guild, meta); + } + } } } } diff --git a/src/services/configService.ts b/src/services/configService.ts index 04c47d36..86461644 100644 --- a/src/services/configService.ts +++ b/src/services/configService.ts @@ -39,6 +39,7 @@ interface IConfig { noVendorPurchaseLimits?: boolean; instantResourceExtractorDrones?: boolean; noDojoRoomBuildStage?: boolean; + noDojoDecoBuildStage?: boolean; fastDojoRoomDestruction?: boolean; noDojoResearchCosts?: boolean; noDojoResearchTime?: boolean; diff --git a/static/webui/index.html b/static/webui/index.html index 6468d53a..b567687e 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -608,6 +608,10 @@ +
+ + +
diff --git a/static/webui/translations/de.js b/static/webui/translations/de.js index 7dba3ab2..6d20ca01 100644 --- a/static/webui/translations/de.js +++ b/static/webui/translations/de.js @@ -137,6 +137,7 @@ dict = { cheats_noVendorPurchaseLimits: `Keine Kaufbeschränkungen bei Händlern`, cheats_instantResourceExtractorDrones: `Sofortige Ressourcen-Extraktor-Drohnen`, cheats_noDojoRoomBuildStage: `Kein Dojo-Raum-Bauvorgang`, + cheats_noDojoDecoBuildStage: `[UNTRANSLATED] No Dojo Deco Build Stage`, cheats_fastDojoRoomDestruction: `Schnelle Dojo-Raum-Zerstörung`, cheats_noDojoResearchCosts: `Keine Dojo-Forschungskosten`, cheats_noDojoResearchTime: `Keine Dojo-Forschungszeit`, diff --git a/static/webui/translations/en.js b/static/webui/translations/en.js index 88466019..12638068 100644 --- a/static/webui/translations/en.js +++ b/static/webui/translations/en.js @@ -136,6 +136,7 @@ dict = { cheats_noVendorPurchaseLimits: `No Vendor Purchase Limits`, cheats_instantResourceExtractorDrones: `Instant Resource Extractor Drones`, cheats_noDojoRoomBuildStage: `No Dojo Room Build Stage`, + cheats_noDojoDecoBuildStage: `No Dojo Deco Build Stage`, cheats_fastDojoRoomDestruction: `Fast Dojo Room Destruction`, cheats_noDojoResearchCosts: `No Dojo Research Costs`, cheats_noDojoResearchTime: `No Dojo Research Time`, diff --git a/static/webui/translations/fr.js b/static/webui/translations/fr.js index 2e119445..6d619821 100644 --- a/static/webui/translations/fr.js +++ b/static/webui/translations/fr.js @@ -137,6 +137,7 @@ dict = { cheats_noVendorPurchaseLimits: `[UNTRANSLATED] No Vendor Purchase Limits`, cheats_instantResourceExtractorDrones: `Ressources de drone d'extraction instantannées`, cheats_noDojoRoomBuildStage: `No Dojo Room Build Stage`, + cheats_noDojoDecoBuildStage: `[UNTRANSLATED] No Dojo Deco Build Stage`, cheats_fastDojoRoomDestruction: `[UNTRANSLATED] Fast Dojo Room Destruction`, cheats_noDojoResearchCosts: `Aucun coût de recherche (Dojo)`, cheats_noDojoResearchTime: `Aucun temps de recherche (Dojo)`, diff --git a/static/webui/translations/ru.js b/static/webui/translations/ru.js index 1543b848..62ff74c7 100644 --- a/static/webui/translations/ru.js +++ b/static/webui/translations/ru.js @@ -137,6 +137,7 @@ dict = { cheats_noVendorPurchaseLimits: `Отсутствие лимитов на покупки у вендоров`, cheats_instantResourceExtractorDrones: `Мгновенные Экстракторы Ресурсов`, cheats_noDojoRoomBuildStage: `Мгновенное Строительтво Комнат Додзё`, + cheats_noDojoDecoBuildStage: `[UNTRANSLATED] No Dojo Deco Build Stage`, cheats_fastDojoRoomDestruction: `Мгновенные Уничтожение Комнат Додзё`, cheats_noDojoResearchCosts: `Бесплатные Исследование Додзё`, cheats_noDojoResearchTime: `Мгновенные Исследование Додзё`, diff --git a/static/webui/translations/zh.js b/static/webui/translations/zh.js index 423a47df..246d6dca 100644 --- a/static/webui/translations/zh.js +++ b/static/webui/translations/zh.js @@ -137,6 +137,7 @@ dict = { cheats_noVendorPurchaseLimits: `[UNTRANSLATED] No Vendor Purchase Limits`, cheats_instantResourceExtractorDrones: `即时资源采集无人机`, cheats_noDojoRoomBuildStage: `无视道场房间建造阶段`, + cheats_noDojoDecoBuildStage: `[UNTRANSLATED] No Dojo Deco Build Stage`, cheats_fastDojoRoomDestruction: `快速拆除道场房间`, cheats_noDojoResearchCosts: `无视道场研究消耗`, cheats_noDojoResearchTime: `无视道场研究时间`,