feat: add universalPolarityEverywhere
This commit is contained in:
		
							parent
							
								
									ed2c6ad4fd
								
							
						
					
					
						commit
						7e67e54c0b
					
				@ -20,5 +20,6 @@
 | 
				
			|||||||
  "unlockAllShipDecorations": true,
 | 
					  "unlockAllShipDecorations": true,
 | 
				
			||||||
  "unlockAllFlavourItems": true,
 | 
					  "unlockAllFlavourItems": true,
 | 
				
			||||||
  "unlockAllSkins": true,
 | 
					  "unlockAllSkins": true,
 | 
				
			||||||
 | 
					  "universalPolarityEverywhere": true,
 | 
				
			||||||
  "spoofMasteryRank": -1
 | 
					  "spoofMasteryRank": -1
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -5,7 +5,8 @@ import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
				
			|||||||
import { config } from "@/src/services/configService";
 | 
					import { config } from "@/src/services/configService";
 | 
				
			||||||
import allMissions from "@/static/fixed_responses/allMissions.json";
 | 
					import allMissions from "@/static/fixed_responses/allMissions.json";
 | 
				
			||||||
import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
 | 
					import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
 | 
				
			||||||
import { IShipInventory } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import { IShipInventory, equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
				
			||||||
 | 
					import { IPolarity, ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
				
			||||||
import { ExportCustoms, ExportFlavour, ExportKeys, ExportResources } from "warframe-public-export-plus";
 | 
					import { ExportCustoms, ExportFlavour, ExportKeys, ExportResources } from "warframe-public-export-plus";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
 | 
					// eslint-disable-next-line @typescript-eslint/no-misused-promises
 | 
				
			||||||
@ -118,6 +119,23 @@ const inventoryController: RequestHandler = async (request, response) => {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (config.universalPolarityEverywhere) {
 | 
				
			||||||
 | 
					        const Polarity: IPolarity[] = [];
 | 
				
			||||||
 | 
					        for (let i = 0; i != 10; ++i) {
 | 
				
			||||||
 | 
					            Polarity.push({
 | 
				
			||||||
 | 
					                Slot: i,
 | 
				
			||||||
 | 
					                Value: ArtifactPolarity.Any
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        for (const key of equipmentKeys) {
 | 
				
			||||||
 | 
					            if (key in inventoryResponse) {
 | 
				
			||||||
 | 
					                for (const equipment of inventoryResponse[key]) {
 | 
				
			||||||
 | 
					                    equipment.Polarity = Polarity;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    response.json(inventoryResponse);
 | 
					    response.json(inventoryResponse);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -37,6 +37,7 @@ interface IConfig {
 | 
				
			|||||||
    unlockAllShipDecorations?: boolean;
 | 
					    unlockAllShipDecorations?: boolean;
 | 
				
			||||||
    unlockAllFlavourItems?: boolean;
 | 
					    unlockAllFlavourItems?: boolean;
 | 
				
			||||||
    unlockAllSkins?: boolean;
 | 
					    unlockAllSkins?: boolean;
 | 
				
			||||||
 | 
					    universalPolarityEverywhere?: boolean;
 | 
				
			||||||
    spoofMasteryRank?: number;
 | 
					    spoofMasteryRank?: number;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -59,15 +59,21 @@ export interface ITypeCount {
 | 
				
			|||||||
    ItemCount: number;
 | 
					    ItemCount: number;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export type TEquipmentKey =
 | 
					export const equipmentKeys = [
 | 
				
			||||||
    | "Suits"
 | 
					    "Suits",
 | 
				
			||||||
    | "LongGuns"
 | 
					    "LongGuns",
 | 
				
			||||||
    | "Pistols"
 | 
					    "Pistols",
 | 
				
			||||||
    | "Melee"
 | 
					    "Melee",
 | 
				
			||||||
    | "SpecialItems"
 | 
					    "SpecialItems",
 | 
				
			||||||
    | "Sentinels"
 | 
					    "Sentinels",
 | 
				
			||||||
    | "SentinelWeapons"
 | 
					    "SentinelWeapons",
 | 
				
			||||||
    | "SpaceGuns";
 | 
					    "SpaceSuits",
 | 
				
			||||||
 | 
					    "SpaceGuns",
 | 
				
			||||||
 | 
					    "SpaceMelee",
 | 
				
			||||||
 | 
					    "Hoverboards"
 | 
				
			||||||
 | 
					] as const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export type TEquipmentKey = (typeof equipmentKeys)[number];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface IDuviriInfo {
 | 
					export interface IDuviriInfo {
 | 
				
			||||||
    Seed: number;
 | 
					    Seed: number;
 | 
				
			||||||
 | 
				
			|||||||
@ -231,9 +231,9 @@
 | 
				
			|||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <div class="form-check">
 | 
					                        <div class="form-check">
 | 
				
			||||||
                            <input class="form-check-input" type="checkbox" id="infiniteResources" />
 | 
					                            <input class="form-check-input" type="checkbox" id="infiniteResources" />
 | 
				
			||||||
                            <label class="form-check-label" for="infiniteResources"
 | 
					                            <label class="form-check-label" for="infiniteResources">
 | 
				
			||||||
                                >Infinite Credits and Platinum</label
 | 
					                                Infinite Credits and Platinum
 | 
				
			||||||
                            >
 | 
					                            </label>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <div class="form-check">
 | 
					                        <div class="form-check">
 | 
				
			||||||
                            <input class="form-check-input" type="checkbox" id="unlockAllShipFeatures" />
 | 
					                            <input class="form-check-input" type="checkbox" id="unlockAllShipFeatures" />
 | 
				
			||||||
@ -241,22 +241,30 @@
 | 
				
			|||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <div class="form-check">
 | 
					                        <div class="form-check">
 | 
				
			||||||
                            <input class="form-check-input" type="checkbox" id="unlockAllShipDecorations" />
 | 
					                            <input class="form-check-input" type="checkbox" id="unlockAllShipDecorations" />
 | 
				
			||||||
                            <label class="form-check-label" for="unlockAllShipDecorations"
 | 
					                            <label class="form-check-label" for="unlockAllShipDecorations">
 | 
				
			||||||
                                >Unlock All Ship Decorations</label
 | 
					                                Unlock All Ship Decorations
 | 
				
			||||||
                            >
 | 
					                            </label>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <div class="form-check">
 | 
					                        <div class="form-check">
 | 
				
			||||||
                            <input class="form-check-input" type="checkbox" id="unlockAllFlavourItems" />
 | 
					                            <input class="form-check-input" type="checkbox" id="unlockAllFlavourItems" />
 | 
				
			||||||
                            <label class="form-check-label" for="unlockAllFlavourItems">Unlock All Accessories</label>
 | 
					                            <label class="form-check-label" for="unlockAllFlavourItems">
 | 
				
			||||||
 | 
					                                Unlock All Flavor Items (Glyphs & co.)
 | 
				
			||||||
 | 
					                            </label>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <div class="form-check">
 | 
					                        <div class="form-check">
 | 
				
			||||||
                            <input class="form-check-input" type="checkbox" id="unlockAllSkins" />
 | 
					                            <input class="form-check-input" type="checkbox" id="unlockAllSkins" />
 | 
				
			||||||
                            <label class="form-check-label" for="unlockAllSkins">Unlock All Skins</label>
 | 
					                            <label class="form-check-label" for="unlockAllSkins">Unlock All Skins</label>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <div class="form-group">
 | 
					                        <div class="form-check">
 | 
				
			||||||
                            <label class="form-label" for="spoofMasteryRank"
 | 
					                            <input class="form-check-input" type="checkbox" id="universalPolarityEverywhere" />
 | 
				
			||||||
                                >Spoofed Mastery Rank (-1 to disable)</label
 | 
					                            <label class="form-check-label" for="universalPolarityEverywhere">
 | 
				
			||||||
                            >
 | 
					                                Universal Polarity Everywhere
 | 
				
			||||||
 | 
					                            </label>
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                        <div class="form-group mt-2 mb-2">
 | 
				
			||||||
 | 
					                            <label class="form-label" for="spoofMasteryRank">
 | 
				
			||||||
 | 
					                                Spoofed Mastery Rank (-1 to disable)
 | 
				
			||||||
 | 
					                            </label>
 | 
				
			||||||
                            <input class="form-control" id="spoofMasteryRank" type="number" min="-1" />
 | 
					                            <input class="form-control" id="spoofMasteryRank" type="number" min="-1" />
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <button class="btn btn-primary mt-3" type="submit">Save Settings</button>
 | 
					                        <button class="btn btn-primary mt-3" type="submit">Save Settings</button>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user