forked from OpenWF/SpaceNinjaServer
		
	feat: skipAllDialogue (#453)
Co-authored-by: Sainan <Sainan@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									c7c9d901b1
								
							
						
					
					
						commit
						de6745ce19
					
				@ -11,6 +11,7 @@
 | 
			
		||||
  "autoCreateAccount": true,
 | 
			
		||||
  "skipStoryModeChoice": true,
 | 
			
		||||
  "skipTutorial": true,
 | 
			
		||||
  "skipAllDialogue": true,
 | 
			
		||||
  "unlockAllScans": true,
 | 
			
		||||
  "unlockAllMissions": true,
 | 
			
		||||
  "unlockAllQuests": true,
 | 
			
		||||
 | 
			
		||||
@ -3,6 +3,7 @@ import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { toInventoryResponse } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
import { config } from "@/src/services/configService";
 | 
			
		||||
import allDialogue from "@/static/fixed_responses/allDialogue.json";
 | 
			
		||||
import allMissions from "@/static/fixed_responses/allMissions.json";
 | 
			
		||||
import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
 | 
			
		||||
import { IShipInventory, equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
@ -43,9 +44,21 @@ const inventoryController: RequestHandler = async (request, response) => {
 | 
			
		||||
        inventoryResponse.PremiumCredits = 999999999;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (config.skipAllDialogue) {
 | 
			
		||||
        inventoryResponse.TauntHistory = [
 | 
			
		||||
            {
 | 
			
		||||
                node: "TreasureTutorial",
 | 
			
		||||
                state: "TS_COMPLETED"
 | 
			
		||||
            }
 | 
			
		||||
        ];
 | 
			
		||||
        for (const str of allDialogue) {
 | 
			
		||||
            addString(inventoryResponse.NodeIntrosCompleted, str);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (config.unlockAllMissions) {
 | 
			
		||||
        inventoryResponse.Missions = allMissions;
 | 
			
		||||
        inventoryResponse.NodeIntrosCompleted.push("TeshinHardModeUnlocked");
 | 
			
		||||
        addString(inventoryResponse.NodeIntrosCompleted, "TeshinHardModeUnlocked");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (config.unlockAllQuests) {
 | 
			
		||||
@ -73,7 +86,7 @@ const inventoryController: RequestHandler = async (request, response) => {
 | 
			
		||||
        inventoryResponse.ArchwingEnabled = true;
 | 
			
		||||
 | 
			
		||||
        // Skip "Watch The Maker"
 | 
			
		||||
        inventoryResponse.NodeIntrosCompleted.push("/Lotus/Levels/Cinematics/NewWarIntro/NewWarStageTwo.level");
 | 
			
		||||
        addString(inventoryResponse.NodeIntrosCompleted, "/Lotus/Levels/Cinematics/NewWarIntro/NewWarStageTwo.level");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (config.unlockAllShipDecorations) {
 | 
			
		||||
@ -142,6 +155,12 @@ const inventoryController: RequestHandler = async (request, response) => {
 | 
			
		||||
    response.json(inventoryResponse);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const addString = (arr: string[], str: string): void => {
 | 
			
		||||
    if (!arr.find(x => x == str)) {
 | 
			
		||||
        arr.push(str);
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const getExpRequiredForMr = (rank: number): number => {
 | 
			
		||||
    if (rank <= 30) {
 | 
			
		||||
        return 2500 * rank * rank;
 | 
			
		||||
 | 
			
		||||
@ -28,6 +28,7 @@ interface IConfig {
 | 
			
		||||
    autoCreateAccount?: boolean;
 | 
			
		||||
    skipStoryModeChoice?: boolean;
 | 
			
		||||
    skipTutorial?: boolean;
 | 
			
		||||
    skipAllDialogue?: boolean;
 | 
			
		||||
    unlockAllScans?: boolean;
 | 
			
		||||
    unlockAllMissions?: boolean;
 | 
			
		||||
    unlockAllQuests?: boolean;
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										139
									
								
								static/fixed_responses/allDialogue.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										139
									
								
								static/fixed_responses/allDialogue.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,139 @@
 | 
			
		||||
[
 | 
			
		||||
  "SolarisUnitedHub1",
 | 
			
		||||
  "/Lotus/Language/SolarisVenus/FishmongerName",
 | 
			
		||||
  "/Lotus/Language/SolarisVenus/ProspectorName",
 | 
			
		||||
  "/Lotus/Language/SolarisVenus/StockbrokerName",
 | 
			
		||||
  "/Lotus/Language/SolarisVenus/WeaponsmithShopName",
 | 
			
		||||
  "/Lotus/Language/SolarisVenus/LegsShopName",
 | 
			
		||||
  "/Lotus/Language/Actions/KDriveVendor",
 | 
			
		||||
  "/Lotus/Language/SolarisVenus/SolarisUnitedContactName",
 | 
			
		||||
  "SaturnWolf1",
 | 
			
		||||
  "SaturnWolf2",
 | 
			
		||||
  "SaturnWolf3",
 | 
			
		||||
  "SaturnWolf4",
 | 
			
		||||
  "SaturnWolf5",
 | 
			
		||||
  "ConclaveSyndicate",
 | 
			
		||||
  "ArbitersSyndicate",
 | 
			
		||||
  "LibrarySyndicate",
 | 
			
		||||
  "RedVeilSyndicate",
 | 
			
		||||
  "PerrinSyndicate",
 | 
			
		||||
  "CephalonSudaSyndicate",
 | 
			
		||||
  "NewLokaSyndicate",
 | 
			
		||||
  "SteelMeridianSyndicate",
 | 
			
		||||
  "CetusSyndicate",
 | 
			
		||||
  "QuillsSyndicate",
 | 
			
		||||
  "VentKidsSyndicate",
 | 
			
		||||
  "SolarisSyndicate",
 | 
			
		||||
  "VoxSyndicate",
 | 
			
		||||
  "RadioLegionSyndicate",
 | 
			
		||||
  "EventSyndicate",
 | 
			
		||||
  "TheEmissary1",
 | 
			
		||||
  "TheEmissary2",
 | 
			
		||||
  "TheEmissary3",
 | 
			
		||||
  "TheEmissary4",
 | 
			
		||||
  "LeverianIntro",
 | 
			
		||||
  "TheEmissary5",
 | 
			
		||||
  "RailjackMultiToolIntro",
 | 
			
		||||
  "EnterRailjackOnceOnly",
 | 
			
		||||
  "ScenarioEventHub5",
 | 
			
		||||
  "Glassmaker1",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/CetusBurnedNoteCEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/CetusWeaponBEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/CetusDatapadOneBEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/CetusEyeBEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/CetusDatapadTwoAEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/WeaveEvidencePartOne",
 | 
			
		||||
  "Glassmaker2",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/CorpusJournalBEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/CorpusCatalogRobotsEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/CorpusDatapadEvidenceC",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/CorpusHelmetEngineerEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/CorpusBadgeMarsHiddenEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/WeaveEvidencePartTwo",
 | 
			
		||||
  "Glassmaker3",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/GrineerTechCEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/GrineerWeaponBEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/GrineerPlushAEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/GrineerMessageBEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/GrineerDatapadBEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/WeaveEvidencePartThree",
 | 
			
		||||
  "TL20Start",
 | 
			
		||||
  "TL20End",
 | 
			
		||||
  "EudicoHeists",
 | 
			
		||||
  "Glassmaker4",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/OrokinManifestoBEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/OrokinDatapadBEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/OrokinNihilPlanCEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/OrokinAppraisalBEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/OrokinDossierAEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/WeaveEvidencePartFour",
 | 
			
		||||
  "/Lotus/Language/SolarisVenus/LegsShopNameLoved",
 | 
			
		||||
  "/Lotus/Language/SolarisVenus/EudicoLoved",
 | 
			
		||||
  "/Lotus/Language/SolarisVenus/ProspectorNameLoved",
 | 
			
		||||
  "/Lotus/Language/SolarisVenus/StockbrokerNameLoved",
 | 
			
		||||
  "/Lotus/Language/SolarisVenus/WeaponsmithShopNameLoved",
 | 
			
		||||
  "/Lotus/Language/SolarisVenus/FishmongerNameLoved",
 | 
			
		||||
  "DeimosHub",
 | 
			
		||||
  "EntratiSyndicate",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindTokenVendorName",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindProspector",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindGunsmithName",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindPetVendor",
 | 
			
		||||
  "ModularCrafting45",
 | 
			
		||||
  "ModularCrafting55",
 | 
			
		||||
  "NecraloidSyndicate",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindMechsName",
 | 
			
		||||
  "/Lotus/Language/Npcs/EntratiMother",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindFishmonger",
 | 
			
		||||
  "/Lotus/Language/SolarisVenus/SolarisUnitedAgentLoved",
 | 
			
		||||
  "Glassmaker5",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/InfestedOroShardsAEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/InfestedOroWeaponCEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/InfestedOroProbeBEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/InfestedOroShackleBEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/InfestedOroTabletBEvidence",
 | 
			
		||||
  "/Lotus/Types/Items/Glassmaker/WeaveEvidencePartFive",
 | 
			
		||||
  "GlassmakerBossFight",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindGunsmithNameLoved",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindTokenVendorNameLoved",
 | 
			
		||||
  "/Lotus/Language/Npcs/EntratiMotherLoved",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindPetVendorLoved",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindFishmongerLoved",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindProspectorLoved",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindMechsNameLoved",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindPetVendorName",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindPetVendorNameLoved",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindFishmongerName",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindFishmongerNameLoved",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindProspectorName",
 | 
			
		||||
  "/Lotus/Language/InfestedMicroplanet/HivemindProspectorNameLoved",
 | 
			
		||||
  "DebtTokenVendorCrewMembers_FirstVisit",
 | 
			
		||||
  "ZarimanSyndicate",
 | 
			
		||||
  "/Lotus/Language/Npcs/Kahl",
 | 
			
		||||
  "RankZeroConversationOne",
 | 
			
		||||
  "RankZeroConversationTwo",
 | 
			
		||||
  "EntratiLabSyndicate",
 | 
			
		||||
  "/Lotus/Language/EntratiLab/EntratiGeneral/HumanLoid",
 | 
			
		||||
  "/Lotus/Language/EntratiLab/EntratiGeneral/Fibonacci",
 | 
			
		||||
  "/Lotus/Language/EntratiLab/EntratiGeneral/BirdThree",
 | 
			
		||||
  "/Lotus/Language/Zariman/Quinn",
 | 
			
		||||
  "/Lotus/Language/EntratiLab/EntratiGeneral/TagferFirstRank1",
 | 
			
		||||
  "VoidVaultIntro",
 | 
			
		||||
  "PurchasePlatformLockedNotificationSeen",
 | 
			
		||||
  "/Lotus/Language/Zariman/Yonta",
 | 
			
		||||
  "ZarimanSyndicateFirstOpen",
 | 
			
		||||
  "HivemindTokenVendorBarter_FirstVisit",
 | 
			
		||||
  "OtakLastWishManifest_FirstVisit",
 | 
			
		||||
  "/Lotus/Language/Zariman/Cavalero",
 | 
			
		||||
  "/Lotus/Language/Duviri/Acrithis",
 | 
			
		||||
  "/Lotus/Language/Npcs/PrimeVaultTrader",
 | 
			
		||||
  "/Lotus/Language/Zariman/Hombask",
 | 
			
		||||
  "EntratiLabDisruptionManifest_FirstVisit",
 | 
			
		||||
  "/Lotus/Language/EntratiLab/EntratiGeneral/BirdThreeLoved",
 | 
			
		||||
  "/Lotus/Language/EntratiLab/EntratiGeneral/TagferFirstRank5",
 | 
			
		||||
  "DanteLeverian",
 | 
			
		||||
  "/Lotus/Language/EntratiLab/EntratiGeneral/HumanLoidLoved",
 | 
			
		||||
  "ConquestSetupIntro",
 | 
			
		||||
  "EntratiLabConquestHardModeUnlocked",
 | 
			
		||||
  "/Lotus/Language/Npcs/KonzuPostNewWar"
 | 
			
		||||
]
 | 
			
		||||
@ -188,6 +188,10 @@
 | 
			
		||||
                                    <input class="form-check-input" type="checkbox" id="skipTutorial" />
 | 
			
		||||
                                    <label class="form-check-label" for="skipTutorial">Skip Tutorial</label>
 | 
			
		||||
                                </div>
 | 
			
		||||
                                <div class="form-check">
 | 
			
		||||
                                    <input class="form-check-input" type="checkbox" id="skipAllDialogue" />
 | 
			
		||||
                                    <label class="form-check-label" for="skipAllDialogue">Skip All Dialogue</label>
 | 
			
		||||
                                </div>
 | 
			
		||||
                                <div class="form-check">
 | 
			
		||||
                                    <input class="form-check-input" type="checkbox" id="unlockAllScans" />
 | 
			
		||||
                                    <label class="form-check-label" for="unlockAllScans">Unlock All Scans</label>
 | 
			
		||||
 | 
			
		||||
@ -731,6 +731,7 @@ const uiConfigs = [
 | 
			
		||||
    "autoCreateAccount",
 | 
			
		||||
    "skipStoryModeChoice",
 | 
			
		||||
    "skipTutorial",
 | 
			
		||||
    "skipAllDialogue",
 | 
			
		||||
    "unlockAllScans",
 | 
			
		||||
    "unlockAllMissions",
 | 
			
		||||
    "unlockAllQuests",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user