feat: add universalPolarityEverywhere
This commit is contained in:
parent
ed2c6ad4fd
commit
7e67e54c0b
@ -20,5 +20,6 @@
|
||||
"unlockAllShipDecorations": true,
|
||||
"unlockAllFlavourItems": true,
|
||||
"unlockAllSkins": true,
|
||||
"universalPolarityEverywhere": true,
|
||||
"spoofMasteryRank": -1
|
||||
}
|
||||
|
@ -5,7 +5,8 @@ import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
|
||||
import { config } from "@/src/services/configService";
|
||||
import allMissions from "@/static/fixed_responses/allMissions.json";
|
||||
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";
|
||||
|
||||
// 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);
|
||||
};
|
||||
|
||||
|
@ -37,6 +37,7 @@ interface IConfig {
|
||||
unlockAllShipDecorations?: boolean;
|
||||
unlockAllFlavourItems?: boolean;
|
||||
unlockAllSkins?: boolean;
|
||||
universalPolarityEverywhere?: boolean;
|
||||
spoofMasteryRank?: number;
|
||||
}
|
||||
|
||||
|
@ -59,15 +59,21 @@ export interface ITypeCount {
|
||||
ItemCount: number;
|
||||
}
|
||||
|
||||
export type TEquipmentKey =
|
||||
| "Suits"
|
||||
| "LongGuns"
|
||||
| "Pistols"
|
||||
| "Melee"
|
||||
| "SpecialItems"
|
||||
| "Sentinels"
|
||||
| "SentinelWeapons"
|
||||
| "SpaceGuns";
|
||||
export const equipmentKeys = [
|
||||
"Suits",
|
||||
"LongGuns",
|
||||
"Pistols",
|
||||
"Melee",
|
||||
"SpecialItems",
|
||||
"Sentinels",
|
||||
"SentinelWeapons",
|
||||
"SpaceSuits",
|
||||
"SpaceGuns",
|
||||
"SpaceMelee",
|
||||
"Hoverboards"
|
||||
] as const;
|
||||
|
||||
export type TEquipmentKey = (typeof equipmentKeys)[number];
|
||||
|
||||
export interface IDuviriInfo {
|
||||
Seed: number;
|
||||
|
@ -231,9 +231,9 @@
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="infiniteResources" />
|
||||
<label class="form-check-label" for="infiniteResources"
|
||||
>Infinite Credits and Platinum</label
|
||||
>
|
||||
<label class="form-check-label" for="infiniteResources">
|
||||
Infinite Credits and Platinum
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="unlockAllShipFeatures" />
|
||||
@ -241,22 +241,30 @@
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="unlockAllShipDecorations" />
|
||||
<label class="form-check-label" for="unlockAllShipDecorations"
|
||||
>Unlock All Ship Decorations</label
|
||||
>
|
||||
<label class="form-check-label" for="unlockAllShipDecorations">
|
||||
Unlock All Ship Decorations
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<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 class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="unlockAllSkins" />
|
||||
<label class="form-check-label" for="unlockAllSkins">Unlock All Skins</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="spoofMasteryRank"
|
||||
>Spoofed Mastery Rank (-1 to disable)</label
|
||||
>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="universalPolarityEverywhere" />
|
||||
<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" />
|
||||
</div>
|
||||
<button class="btn btn-primary mt-3" type="submit">Save Settings</button>
|
||||
|
Loading…
x
Reference in New Issue
Block a user