forked from OpenWF/SpaceNinjaServer
		
	feat: add potatoes, exilus, & arcanes everywhere cheats (#774)
This commit is contained in:
		
							parent
							
								
									215b83974c
								
							
						
					
					
						commit
						d73d14bc48
					
				@ -25,5 +25,8 @@
 | 
			
		||||
  "unlockAllSkins": true,
 | 
			
		||||
  "unlockAllCapturaScenes": true,
 | 
			
		||||
  "universalPolarityEverywhere": true,
 | 
			
		||||
  "unlockDoubleCapacityPotatoesEverywhere": true,
 | 
			
		||||
  "unlockExilusEverywhere": true,
 | 
			
		||||
  "unlockArcanesEverywhere": true,
 | 
			
		||||
  "spoofMasteryRank": -1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -5,7 +5,7 @@ import { config } from "@/src/services/configService";
 | 
			
		||||
import allDialogue from "@/static/fixed_responses/allDialogue.json";
 | 
			
		||||
import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
 | 
			
		||||
import { IInventoryResponse, IShipInventory, equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IPolarity, ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import { IPolarity, ArtifactPolarity, EquipmentFeatures } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import {
 | 
			
		||||
    ExportCustoms,
 | 
			
		||||
    ExportFlavour,
 | 
			
		||||
@ -211,6 +211,39 @@ export const inventoryController: RequestHandler = async (request, response) =>
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (config.unlockDoubleCapacityPotatoesEverywhere) {
 | 
			
		||||
        for (const key of equipmentKeys) {
 | 
			
		||||
            if (key in inventoryResponse) {
 | 
			
		||||
                for (const equipment of inventoryResponse[key]) {
 | 
			
		||||
                    equipment.Features ??= 0;
 | 
			
		||||
                    equipment.Features |= EquipmentFeatures.DOUBLE_CAPACITY;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (config.unlockExilusEverywhere) {
 | 
			
		||||
        for (const key of equipmentKeys) {
 | 
			
		||||
            if (key in inventoryResponse) {
 | 
			
		||||
                for (const equipment of inventoryResponse[key]) {
 | 
			
		||||
                    equipment.Features ??= 0;
 | 
			
		||||
                    equipment.Features |= EquipmentFeatures.UTILITY_SLOT;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (config.unlockArcanesEverywhere) {
 | 
			
		||||
        for (const key of equipmentKeys) {
 | 
			
		||||
            if (key in inventoryResponse) {
 | 
			
		||||
                for (const equipment of inventoryResponse[key]) {
 | 
			
		||||
                    equipment.Features ??= 0;
 | 
			
		||||
                    equipment.Features |= EquipmentFeatures.ARCANE_SLOT;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Fix for #380
 | 
			
		||||
    inventoryResponse.NextRefill = { $date: { $numberLong: "9999999999999" } };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -51,6 +51,9 @@ interface IConfig {
 | 
			
		||||
    unlockAllSkins?: boolean;
 | 
			
		||||
    unlockAllCapturaScenes?: boolean;
 | 
			
		||||
    universalPolarityEverywhere?: boolean;
 | 
			
		||||
    unlockDoubleCapacityPotatoesEverywhere?: boolean;
 | 
			
		||||
    unlockExilusEverywhere?: boolean;
 | 
			
		||||
    unlockArcanesEverywhere?: boolean;
 | 
			
		||||
    spoofMasteryRank?: number;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -278,6 +278,24 @@
 | 
			
		||||
                                            Universal Polarity Everywhere
 | 
			
		||||
                                        </label>
 | 
			
		||||
                                    </div>
 | 
			
		||||
                                    <div class="form-check">
 | 
			
		||||
                                        <input class="form-check-input" type="checkbox" id="unlockDoubleCapacityPotatoesEverywhere" />
 | 
			
		||||
                                        <label class="form-check-label" for="unlockDoubleCapacityPotatoesEverywhere">
 | 
			
		||||
                                            Potatoes Everywhere
 | 
			
		||||
                                        </label>
 | 
			
		||||
                                    </div>
 | 
			
		||||
                                    <div class="form-check">
 | 
			
		||||
                                        <input class="form-check-input" type="checkbox" id="unlockExilusEverywhere" />
 | 
			
		||||
                                        <label class="form-check-label" for="unlockExilusEverywhere">
 | 
			
		||||
                                            Exilus Adapters Everywhere
 | 
			
		||||
                                        </label>
 | 
			
		||||
                                    </div>
 | 
			
		||||
                                    <div class="form-check">
 | 
			
		||||
                                        <input class="form-check-input" type="checkbox" id="unlockArcanesEverywhere" />
 | 
			
		||||
                                        <label class="form-check-label" for="unlockArcanesEverywhere">
 | 
			
		||||
                                            Arcane Adapters Everywhere
 | 
			
		||||
                                        </label>
 | 
			
		||||
                                    </div>
 | 
			
		||||
                                    <div class="form-group mt-2">
 | 
			
		||||
                                        <label class="form-label" for="spoofMasteryRank">
 | 
			
		||||
                                            Spoofed Mastery Rank (-1 to disable)
 | 
			
		||||
 | 
			
		||||
@ -846,26 +846,7 @@ $("#mod-to-acquire").on("input", () => {
 | 
			
		||||
    $("#mod-to-acquire").removeClass("is-invalid");
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
const uiConfigs = [
 | 
			
		||||
    "autoCreateAccount",
 | 
			
		||||
    "skipTutorial",
 | 
			
		||||
    "skipAllDialogue",
 | 
			
		||||
    "unlockAllScans",
 | 
			
		||||
    "unlockAllMissions",
 | 
			
		||||
    "unlockAllQuests",
 | 
			
		||||
    "completeAllQuests",
 | 
			
		||||
    "infiniteCredits",
 | 
			
		||||
    "infinitePlatinum",
 | 
			
		||||
    "infiniteEndo",
 | 
			
		||||
    "infiniteRegalAya",
 | 
			
		||||
    "unlockAllShipFeatures",
 | 
			
		||||
    "unlockAllShipDecorations",
 | 
			
		||||
    "unlockAllFlavourItems",
 | 
			
		||||
    "unlockAllSkins",
 | 
			
		||||
    "unlockAllCapturaScenes",
 | 
			
		||||
    "universalPolarityEverywhere",
 | 
			
		||||
    "spoofMasteryRank"
 | 
			
		||||
];
 | 
			
		||||
const uiConfigs = [...$("#server-settings input[id]")].map(x => x.id);
 | 
			
		||||
 | 
			
		||||
function doChangeSettings() {
 | 
			
		||||
    fetch("/custom/config?" + window.authz)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user