feat: No Dojo Deco Build Stage cheat (#1508)
Reviewed-on: #1508 Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
This commit is contained in:
parent
541b8d32a8
commit
5692a6201e
@ -34,6 +34,7 @@
|
|||||||
"noVendorPurchaseLimits": true,
|
"noVendorPurchaseLimits": true,
|
||||||
"instantResourceExtractorDrones": false,
|
"instantResourceExtractorDrones": false,
|
||||||
"noDojoRoomBuildStage": false,
|
"noDojoRoomBuildStage": false,
|
||||||
|
"noDecoBuildStage": false,
|
||||||
"fastDojoRoomDestruction": false,
|
"fastDojoRoomDestruction": false,
|
||||||
"noDojoResearchCosts": false,
|
"noDojoResearchCosts": false,
|
||||||
"noDojoResearchTime": false,
|
"noDojoResearchTime": false,
|
||||||
|
@ -13,6 +13,7 @@ import { GuildPermission } from "@/src/types/guildTypes";
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
import { ExportDojoRecipes, ExportResources } from "warframe-public-export-plus";
|
import { ExportDojoRecipes, ExportResources } from "warframe-public-export-plus";
|
||||||
|
import { config } from "@/src/services/configService";
|
||||||
|
|
||||||
export const placeDecoInComponentController: RequestHandler = async (req, res) => {
|
export const placeDecoInComponentController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
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;
|
guild.VaultShipDecorations!.find(x => x.ItemType == itemType)!.ItemCount -= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!meta || (meta.price == 0 && meta.ingredients.length == 0)) {
|
if (deco.Type != "/Lotus/Objects/Tenno/Props/TnoPaintBotDojoDeco") {
|
||||||
deco.CompletionTime = new Date();
|
if (!meta || (meta.price == 0 && meta.ingredients.length == 0) || config.noDojoDecoBuildStage) {
|
||||||
} else if (
|
deco.CompletionTime = new Date();
|
||||||
guild.AutoContributeFromVault &&
|
if (meta) {
|
||||||
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);
|
|
||||||
processDojoBuildMaterialsGathered(guild, 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,7 @@ interface IConfig {
|
|||||||
noVendorPurchaseLimits?: boolean;
|
noVendorPurchaseLimits?: boolean;
|
||||||
instantResourceExtractorDrones?: boolean;
|
instantResourceExtractorDrones?: boolean;
|
||||||
noDojoRoomBuildStage?: boolean;
|
noDojoRoomBuildStage?: boolean;
|
||||||
|
noDojoDecoBuildStage?: boolean;
|
||||||
fastDojoRoomDestruction?: boolean;
|
fastDojoRoomDestruction?: boolean;
|
||||||
noDojoResearchCosts?: boolean;
|
noDojoResearchCosts?: boolean;
|
||||||
noDojoResearchTime?: boolean;
|
noDojoResearchTime?: boolean;
|
||||||
|
@ -608,6 +608,10 @@
|
|||||||
<input class="form-check-input" type="checkbox" id="noDojoRoomBuildStage" />
|
<input class="form-check-input" type="checkbox" id="noDojoRoomBuildStage" />
|
||||||
<label class="form-check-label" for="noDojoRoomBuildStage" data-loc="cheats_noDojoRoomBuildStage"></label>
|
<label class="form-check-label" for="noDojoRoomBuildStage" data-loc="cheats_noDojoRoomBuildStage"></label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" id="noDojoDecoBuildStage" />
|
||||||
|
<label class="form-check-label" for="noDojoDecoBuildStage" data-loc="cheats_noDojoDecoBuildStage"></label>
|
||||||
|
</div>
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="checkbox" id="fastDojoRoomDestruction" />
|
<input class="form-check-input" type="checkbox" id="fastDojoRoomDestruction" />
|
||||||
<label class="form-check-label" for="fastDojoRoomDestruction" data-loc="cheats_fastDojoRoomDestruction"></label>
|
<label class="form-check-label" for="fastDojoRoomDestruction" data-loc="cheats_fastDojoRoomDestruction"></label>
|
||||||
|
@ -137,6 +137,7 @@ dict = {
|
|||||||
cheats_noVendorPurchaseLimits: `Keine Kaufbeschränkungen bei Händlern`,
|
cheats_noVendorPurchaseLimits: `Keine Kaufbeschränkungen bei Händlern`,
|
||||||
cheats_instantResourceExtractorDrones: `Sofortige Ressourcen-Extraktor-Drohnen`,
|
cheats_instantResourceExtractorDrones: `Sofortige Ressourcen-Extraktor-Drohnen`,
|
||||||
cheats_noDojoRoomBuildStage: `Kein Dojo-Raum-Bauvorgang`,
|
cheats_noDojoRoomBuildStage: `Kein Dojo-Raum-Bauvorgang`,
|
||||||
|
cheats_noDojoDecoBuildStage: `[UNTRANSLATED] No Dojo Deco Build Stage`,
|
||||||
cheats_fastDojoRoomDestruction: `Schnelle Dojo-Raum-Zerstörung`,
|
cheats_fastDojoRoomDestruction: `Schnelle Dojo-Raum-Zerstörung`,
|
||||||
cheats_noDojoResearchCosts: `Keine Dojo-Forschungskosten`,
|
cheats_noDojoResearchCosts: `Keine Dojo-Forschungskosten`,
|
||||||
cheats_noDojoResearchTime: `Keine Dojo-Forschungszeit`,
|
cheats_noDojoResearchTime: `Keine Dojo-Forschungszeit`,
|
||||||
|
@ -136,6 +136,7 @@ dict = {
|
|||||||
cheats_noVendorPurchaseLimits: `No Vendor Purchase Limits`,
|
cheats_noVendorPurchaseLimits: `No Vendor Purchase Limits`,
|
||||||
cheats_instantResourceExtractorDrones: `Instant Resource Extractor Drones`,
|
cheats_instantResourceExtractorDrones: `Instant Resource Extractor Drones`,
|
||||||
cheats_noDojoRoomBuildStage: `No Dojo Room Build Stage`,
|
cheats_noDojoRoomBuildStage: `No Dojo Room Build Stage`,
|
||||||
|
cheats_noDojoDecoBuildStage: `No Dojo Deco Build Stage`,
|
||||||
cheats_fastDojoRoomDestruction: `Fast Dojo Room Destruction`,
|
cheats_fastDojoRoomDestruction: `Fast Dojo Room Destruction`,
|
||||||
cheats_noDojoResearchCosts: `No Dojo Research Costs`,
|
cheats_noDojoResearchCosts: `No Dojo Research Costs`,
|
||||||
cheats_noDojoResearchTime: `No Dojo Research Time`,
|
cheats_noDojoResearchTime: `No Dojo Research Time`,
|
||||||
|
@ -137,6 +137,7 @@ dict = {
|
|||||||
cheats_noVendorPurchaseLimits: `[UNTRANSLATED] No Vendor Purchase Limits`,
|
cheats_noVendorPurchaseLimits: `[UNTRANSLATED] No Vendor Purchase Limits`,
|
||||||
cheats_instantResourceExtractorDrones: `Ressources de drone d'extraction instantannées`,
|
cheats_instantResourceExtractorDrones: `Ressources de drone d'extraction instantannées`,
|
||||||
cheats_noDojoRoomBuildStage: `No Dojo Room Build Stage`,
|
cheats_noDojoRoomBuildStage: `No Dojo Room Build Stage`,
|
||||||
|
cheats_noDojoDecoBuildStage: `[UNTRANSLATED] No Dojo Deco Build Stage`,
|
||||||
cheats_fastDojoRoomDestruction: `[UNTRANSLATED] Fast Dojo Room Destruction`,
|
cheats_fastDojoRoomDestruction: `[UNTRANSLATED] Fast Dojo Room Destruction`,
|
||||||
cheats_noDojoResearchCosts: `Aucun coût de recherche (Dojo)`,
|
cheats_noDojoResearchCosts: `Aucun coût de recherche (Dojo)`,
|
||||||
cheats_noDojoResearchTime: `Aucun temps de recherche (Dojo)`,
|
cheats_noDojoResearchTime: `Aucun temps de recherche (Dojo)`,
|
||||||
|
@ -137,6 +137,7 @@ dict = {
|
|||||||
cheats_noVendorPurchaseLimits: `Отсутствие лимитов на покупки у вендоров`,
|
cheats_noVendorPurchaseLimits: `Отсутствие лимитов на покупки у вендоров`,
|
||||||
cheats_instantResourceExtractorDrones: `Мгновенные Экстракторы Ресурсов`,
|
cheats_instantResourceExtractorDrones: `Мгновенные Экстракторы Ресурсов`,
|
||||||
cheats_noDojoRoomBuildStage: `Мгновенное Строительтво Комнат Додзё`,
|
cheats_noDojoRoomBuildStage: `Мгновенное Строительтво Комнат Додзё`,
|
||||||
|
cheats_noDojoDecoBuildStage: `[UNTRANSLATED] No Dojo Deco Build Stage`,
|
||||||
cheats_fastDojoRoomDestruction: `Мгновенные Уничтожение Комнат Додзё`,
|
cheats_fastDojoRoomDestruction: `Мгновенные Уничтожение Комнат Додзё`,
|
||||||
cheats_noDojoResearchCosts: `Бесплатные Исследование Додзё`,
|
cheats_noDojoResearchCosts: `Бесплатные Исследование Додзё`,
|
||||||
cheats_noDojoResearchTime: `Мгновенные Исследование Додзё`,
|
cheats_noDojoResearchTime: `Мгновенные Исследование Додзё`,
|
||||||
|
@ -137,6 +137,7 @@ dict = {
|
|||||||
cheats_noVendorPurchaseLimits: `[UNTRANSLATED] No Vendor Purchase Limits`,
|
cheats_noVendorPurchaseLimits: `[UNTRANSLATED] No Vendor Purchase Limits`,
|
||||||
cheats_instantResourceExtractorDrones: `即时资源采集无人机`,
|
cheats_instantResourceExtractorDrones: `即时资源采集无人机`,
|
||||||
cheats_noDojoRoomBuildStage: `无视道场房间建造阶段`,
|
cheats_noDojoRoomBuildStage: `无视道场房间建造阶段`,
|
||||||
|
cheats_noDojoDecoBuildStage: `[UNTRANSLATED] No Dojo Deco Build Stage`,
|
||||||
cheats_fastDojoRoomDestruction: `快速拆除道场房间`,
|
cheats_fastDojoRoomDestruction: `快速拆除道场房间`,
|
||||||
cheats_noDojoResearchCosts: `无视道场研究消耗`,
|
cheats_noDojoResearchCosts: `无视道场研究消耗`,
|
||||||
cheats_noDojoResearchTime: `无视道场研究时间`,
|
cheats_noDojoResearchTime: `无视道场研究时间`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user