forked from OpenWF/SpaceNinjaServer
		
	feat: No Dojo Deco Build Stage cheat (#1508)
Reviewed-on: OpenWF/SpaceNinjaServer#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,
 | 
			
		||||
  "instantResourceExtractorDrones": false,
 | 
			
		||||
  "noDojoRoomBuildStage": false,
 | 
			
		||||
  "noDecoBuildStage": false,
 | 
			
		||||
  "fastDojoRoomDestruction": false,
 | 
			
		||||
  "noDojoResearchCosts": false,
 | 
			
		||||
  "noDojoResearchTime": false,
 | 
			
		||||
 | 
			
		||||
@ -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,14 +63,13 @@ 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)) {
 | 
			
		||||
        if (deco.Type != "/Lotus/Objects/Tenno/Props/TnoPaintBotDojoDeco") {
 | 
			
		||||
            if (!meta || (meta.price == 0 && meta.ingredients.length == 0) || config.noDojoDecoBuildStage) {
 | 
			
		||||
                deco.CompletionTime = new Date();
 | 
			
		||||
        } else if (
 | 
			
		||||
            guild.AutoContributeFromVault &&
 | 
			
		||||
            guild.VaultRegularCredits &&
 | 
			
		||||
            guild.VaultMiscItems &&
 | 
			
		||||
            deco.Type != "/Lotus/Objects/Tenno/Props/TnoPaintBotDojoDeco"
 | 
			
		||||
        ) {
 | 
			
		||||
                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) {
 | 
			
		||||
@ -101,6 +101,7 @@ export const placeDecoInComponentController: RequestHandler = async (req, res) =
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    await guild.save();
 | 
			
		||||
    res.json(await getDojoClient(guild, 0, component._id));
 | 
			
		||||
 | 
			
		||||
@ -39,6 +39,7 @@ interface IConfig {
 | 
			
		||||
    noVendorPurchaseLimits?: boolean;
 | 
			
		||||
    instantResourceExtractorDrones?: boolean;
 | 
			
		||||
    noDojoRoomBuildStage?: boolean;
 | 
			
		||||
    noDojoDecoBuildStage?: boolean;
 | 
			
		||||
    fastDojoRoomDestruction?: boolean;
 | 
			
		||||
    noDojoResearchCosts?: boolean;
 | 
			
		||||
    noDojoResearchTime?: boolean;
 | 
			
		||||
 | 
			
		||||
@ -608,6 +608,10 @@
 | 
			
		||||
                                        <input class="form-check-input" type="checkbox" id="noDojoRoomBuildStage" />
 | 
			
		||||
                                        <label class="form-check-label" for="noDojoRoomBuildStage" data-loc="cheats_noDojoRoomBuildStage"></label>
 | 
			
		||||
                                    </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">
 | 
			
		||||
                                        <input class="form-check-input" type="checkbox" id="fastDojoRoomDestruction" />
 | 
			
		||||
                                        <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_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`,
 | 
			
		||||
 | 
			
		||||
@ -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`,
 | 
			
		||||
 | 
			
		||||
@ -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)`,
 | 
			
		||||
 | 
			
		||||
@ -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: `Мгновенные Исследование Додзё`,
 | 
			
		||||
 | 
			
		||||
@ -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: `无视道场研究时间`,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user