forked from OpenWF/SpaceNinjaServer
		
	feat: nemesis henchmen kills multiplier cheat (#2806)
Co-authored-by: AlexisinGit <136088944+AlexisinGit@users.noreply.github.com> Reviewed-on: OpenWF/SpaceNinjaServer#2806 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: AlexisinGit <alexisingit@noreply.localhost> Co-committed-by: AlexisinGit <alexisingit@noreply.localhost>
This commit is contained in:
		
							parent
							
								
									e76f08db89
								
							
						
					
					
						commit
						fc38f818dd
					
				@ -149,7 +149,10 @@ export const nemesisController: RequestHandler = async (req, res) => {
 | 
				
			|||||||
                            break;
 | 
					                            break;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                inventory.Nemesis!.HenchmenKilled += antivirusGain;
 | 
					                const antivirusGainMultiplier = (
 | 
				
			||||||
 | 
					                    await getInventory(account._id.toString(), "nemesisAntivirusGainMultiplier")
 | 
				
			||||||
 | 
					                ).nemesisAntivirusGainMultiplier;
 | 
				
			||||||
 | 
					                inventory.Nemesis!.HenchmenKilled += antivirusGain * (antivirusGainMultiplier ?? 1);
 | 
				
			||||||
                if (inventory.Nemesis!.HenchmenKilled >= 100) {
 | 
					                if (inventory.Nemesis!.HenchmenKilled >= 100) {
 | 
				
			||||||
                    inventory.Nemesis!.HenchmenKilled = 100;
 | 
					                    inventory.Nemesis!.HenchmenKilled = 100;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -3,12 +3,19 @@ import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
				
			|||||||
import { sendWsBroadcastTo } from "../../services/wsService.ts";
 | 
					import { sendWsBroadcastTo } from "../../services/wsService.ts";
 | 
				
			||||||
import type { IAccountCheats } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
					import type { IAccountCheats } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
				
			||||||
import type { RequestHandler } from "express";
 | 
					import type { RequestHandler } from "express";
 | 
				
			||||||
 | 
					import { logger } from "../../utils/logger.ts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const setAccountCheatController: RequestHandler = async (req, res) => {
 | 
					export const setAccountCheatController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const accountId = await getAccountIdForRequest(req);
 | 
					    const accountId = await getAccountIdForRequest(req);
 | 
				
			||||||
    const payload = req.body as ISetAccountCheatRequest;
 | 
					    const payload = req.body as ISetAccountCheatRequest;
 | 
				
			||||||
    const inventory = await getInventory(accountId, payload.key);
 | 
					    const inventory = await getInventory(accountId, payload.key);
 | 
				
			||||||
    inventory[payload.key] = payload.value;
 | 
					
 | 
				
			||||||
 | 
					    if (payload.value == undefined) {
 | 
				
			||||||
 | 
					        logger.warn(`Aborting setting ${payload.key} as undefined!`);
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    inventory[payload.key] = payload.value as never;
 | 
				
			||||||
    await inventory.save();
 | 
					    await inventory.save();
 | 
				
			||||||
    res.end();
 | 
					    res.end();
 | 
				
			||||||
    if (["infiniteCredits", "infinitePlatinum", "infiniteEndo", "infiniteRegalAya"].indexOf(payload.key) != -1) {
 | 
					    if (["infiniteCredits", "infinitePlatinum", "infiniteEndo", "infiniteRegalAya"].indexOf(payload.key) != -1) {
 | 
				
			||||||
@ -18,5 +25,5 @@ export const setAccountCheatController: RequestHandler = async (req, res) => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
interface ISetAccountCheatRequest {
 | 
					interface ISetAccountCheatRequest {
 | 
				
			||||||
    key: keyof IAccountCheats;
 | 
					    key: keyof IAccountCheats;
 | 
				
			||||||
    value: boolean;
 | 
					    value: IAccountCheats[keyof IAccountCheats];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -1462,6 +1462,12 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
 | 
				
			|||||||
        flawlessRelicsAlwaysGiveSilverReward: Boolean,
 | 
					        flawlessRelicsAlwaysGiveSilverReward: Boolean,
 | 
				
			||||||
        radiantRelicsAlwaysGiveGoldReward: Boolean,
 | 
					        radiantRelicsAlwaysGiveGoldReward: Boolean,
 | 
				
			||||||
        disableDailyTribute: Boolean,
 | 
					        disableDailyTribute: Boolean,
 | 
				
			||||||
 | 
					        nemesisHenchmenKillsMultiplierGrineer: Number,
 | 
				
			||||||
 | 
					        nemesisHenchmenKillsMultiplierCorpus: Number,
 | 
				
			||||||
 | 
					        nemesisAntivirusGainMultiplier: Number,
 | 
				
			||||||
 | 
					        nemesisHintProgressMultiplierGrineer: Number,
 | 
				
			||||||
 | 
					        nemesisHintProgressMultiplierCorpus: Number,
 | 
				
			||||||
 | 
					        nemesisExtraWeapon: Number,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        SubscribedToEmails: { type: Number, default: 0 },
 | 
					        SubscribedToEmails: { type: Number, default: 0 },
 | 
				
			||||||
        SubscribedToEmailsPersonalized: { type: Number, default: 0 },
 | 
					        SubscribedToEmailsPersonalized: { type: Number, default: 0 },
 | 
				
			||||||
 | 
				
			|||||||
@ -210,10 +210,29 @@ export const addMissionInventoryUpdates = async (
 | 
				
			|||||||
            inventory.NemesisAbandonedRewards = inventoryUpdates.RewardInfo.NemesisAbandonedRewards;
 | 
					            inventory.NemesisAbandonedRewards = inventoryUpdates.RewardInfo.NemesisAbandonedRewards;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (inventoryUpdates.RewardInfo.NemesisHenchmenKills && inventory.Nemesis) {
 | 
					        if (inventoryUpdates.RewardInfo.NemesisHenchmenKills && inventory.Nemesis) {
 | 
				
			||||||
            inventory.Nemesis.HenchmenKilled += inventoryUpdates.RewardInfo.NemesisHenchmenKills;
 | 
					            let HenchmenKilledMultiplier = 1;
 | 
				
			||||||
 | 
					            switch (inventory.Nemesis.Faction) {
 | 
				
			||||||
 | 
					                case "FC_GRINEER":
 | 
				
			||||||
 | 
					                    HenchmenKilledMultiplier = inventory.nemesisHenchmenKillsMultiplierGrineer ?? 1;
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					                case "FC_CORPUS":
 | 
				
			||||||
 | 
					                    HenchmenKilledMultiplier = inventory.nemesisHenchmenKillsMultiplierCorpus ?? 1;
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            inventory.Nemesis.HenchmenKilled +=
 | 
				
			||||||
 | 
					                inventoryUpdates.RewardInfo.NemesisHenchmenKills * HenchmenKilledMultiplier;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (inventoryUpdates.RewardInfo.NemesisHintProgress && inventory.Nemesis) {
 | 
					        if (inventoryUpdates.RewardInfo.NemesisHintProgress && inventory.Nemesis) {
 | 
				
			||||||
            inventory.Nemesis.HintProgress += inventoryUpdates.RewardInfo.NemesisHintProgress;
 | 
					            let HintProgressMultiplier = 1;
 | 
				
			||||||
 | 
					            switch (inventory.Nemesis.Faction) {
 | 
				
			||||||
 | 
					                case "FC_GRINEER":
 | 
				
			||||||
 | 
					                    HintProgressMultiplier = inventory.nemesisHintProgressMultiplierGrineer ?? 1;
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					                case "FC_CORPUS":
 | 
				
			||||||
 | 
					                    HintProgressMultiplier = inventory.nemesisHintProgressMultiplierCorpus ?? 1;
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            inventory.Nemesis.HintProgress += inventoryUpdates.RewardInfo.NemesisHintProgress * HintProgressMultiplier;
 | 
				
			||||||
            if (inventory.Nemesis.Faction != "FC_INFESTATION" && inventory.Nemesis.Hints.length != 3) {
 | 
					            if (inventory.Nemesis.Faction != "FC_INFESTATION" && inventory.Nemesis.Hints.length != 3) {
 | 
				
			||||||
                const progressNeeded = [35, 60, 100][inventory.Nemesis.Hints.length];
 | 
					                const progressNeeded = [35, 60, 100][inventory.Nemesis.Hints.length];
 | 
				
			||||||
                if (inventory.Nemesis.HintProgress >= progressNeeded) {
 | 
					                if (inventory.Nemesis.HintProgress >= progressNeeded) {
 | 
				
			||||||
@ -819,6 +838,8 @@ export const addMissionInventoryUpdates = async (
 | 
				
			|||||||
                    const att: string[] = [];
 | 
					                    const att: string[] = [];
 | 
				
			||||||
                    let countedAtt: ITypeCount[] | undefined;
 | 
					                    let countedAtt: ITypeCount[] | undefined;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    const extraWeaponCheat = inventory.nemesisExtraWeapon ?? 0; // 0 means no extra weapon and token
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    if (value.killed) {
 | 
					                    if (value.killed) {
 | 
				
			||||||
                        if (
 | 
					                        if (
 | 
				
			||||||
                            value.weaponLoc &&
 | 
					                            value.weaponLoc &&
 | 
				
			||||||
@ -827,6 +848,20 @@ export const addMissionInventoryUpdates = async (
 | 
				
			|||||||
                            const weaponType = manifest.weapons[inventory.Nemesis.WeaponIdx];
 | 
					                            const weaponType = manifest.weapons[inventory.Nemesis.WeaponIdx];
 | 
				
			||||||
                            giveNemesisWeaponRecipe(inventory, weaponType, value.nemesisName, value.weaponLoc, profile);
 | 
					                            giveNemesisWeaponRecipe(inventory, weaponType, value.nemesisName, value.weaponLoc, profile);
 | 
				
			||||||
                            att.push(weaponType);
 | 
					                            att.push(weaponType);
 | 
				
			||||||
 | 
					                            if (extraWeaponCheat >= 1) {
 | 
				
			||||||
 | 
					                                for (let i = 0; i < extraWeaponCheat; i++) {
 | 
				
			||||||
 | 
					                                    const randomIndex = Math.floor(Math.random() * manifest.weapons.length);
 | 
				
			||||||
 | 
					                                    const randomWeapon = manifest.weapons[randomIndex];
 | 
				
			||||||
 | 
					                                    giveNemesisWeaponRecipe(
 | 
				
			||||||
 | 
					                                        inventory,
 | 
				
			||||||
 | 
					                                        randomWeapon,
 | 
				
			||||||
 | 
					                                        value.nemesisName,
 | 
				
			||||||
 | 
					                                        undefined,
 | 
				
			||||||
 | 
					                                        profile
 | 
				
			||||||
 | 
					                                    );
 | 
				
			||||||
 | 
					                                    att.push(randomWeapon);
 | 
				
			||||||
 | 
					                                }
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        //if (value.petLoc) {
 | 
					                        //if (value.petLoc) {
 | 
				
			||||||
                        if (profile.petHead) {
 | 
					                        if (profile.petHead) {
 | 
				
			||||||
@ -870,7 +905,7 @@ export const addMissionInventoryUpdates = async (
 | 
				
			|||||||
                            countedAtt = [
 | 
					                            countedAtt = [
 | 
				
			||||||
                                {
 | 
					                                {
 | 
				
			||||||
                                    ItemType: "/Lotus/Types/Items/MiscItems/CodaWeaponBucks",
 | 
					                                    ItemType: "/Lotus/Types/Items/MiscItems/CodaWeaponBucks",
 | 
				
			||||||
                                    ItemCount: getKillTokenRewardCount(inventory.Nemesis.fp)
 | 
					                                    ItemCount: getKillTokenRewardCount(inventory.Nemesis.fp) * (extraWeaponCheat + 1)
 | 
				
			||||||
                                }
 | 
					                                }
 | 
				
			||||||
                            ];
 | 
					                            ];
 | 
				
			||||||
                            addMiscItems(inventory, countedAtt);
 | 
					                            addMiscItems(inventory, countedAtt);
 | 
				
			||||||
@ -1400,7 +1435,9 @@ export const addMissionRewards = async (
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            if (inventory.Nemesis.Faction == "FC_INFESTATION") {
 | 
					            if (inventory.Nemesis.Faction == "FC_INFESTATION") {
 | 
				
			||||||
                inventory.Nemesis.MissionCount += 1;
 | 
					                inventory.Nemesis.MissionCount += 1;
 | 
				
			||||||
                inventory.Nemesis.HenchmenKilled = Math.min(inventory.Nemesis.HenchmenKilled + 5, 95); // 5 progress per mission until 95
 | 
					                let antivirusGain = 5;
 | 
				
			||||||
 | 
					                antivirusGain *= inventory.nemesisAntivirusGainMultiplier ?? 1;
 | 
				
			||||||
 | 
					                inventory.Nemesis.HenchmenKilled = Math.min(inventory.Nemesis.HenchmenKilled + antivirusGain, 95); // 5 progress per mission until 95
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                inventoryChanges.Nemesis.MissionCount ??= 0;
 | 
					                inventoryChanges.Nemesis.MissionCount ??= 0;
 | 
				
			||||||
                inventoryChanges.Nemesis.MissionCount += 1;
 | 
					                inventoryChanges.Nemesis.MissionCount += 1;
 | 
				
			||||||
 | 
				
			|||||||
@ -55,6 +55,12 @@ export interface IAccountCheats {
 | 
				
			|||||||
    flawlessRelicsAlwaysGiveSilverReward?: boolean;
 | 
					    flawlessRelicsAlwaysGiveSilverReward?: boolean;
 | 
				
			||||||
    radiantRelicsAlwaysGiveGoldReward?: boolean;
 | 
					    radiantRelicsAlwaysGiveGoldReward?: boolean;
 | 
				
			||||||
    disableDailyTribute?: boolean;
 | 
					    disableDailyTribute?: boolean;
 | 
				
			||||||
 | 
					    nemesisHenchmenKillsMultiplierGrineer?: number;
 | 
				
			||||||
 | 
					    nemesisHenchmenKillsMultiplierCorpus?: number;
 | 
				
			||||||
 | 
					    nemesisAntivirusGainMultiplier?: number;
 | 
				
			||||||
 | 
					    nemesisHintProgressMultiplierGrineer?: number;
 | 
				
			||||||
 | 
					    nemesisHintProgressMultiplierCorpus?: number;
 | 
				
			||||||
 | 
					    nemesisExtraWeapon?: number;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface IInventoryDatabase
 | 
					export interface IInventoryDatabase
 | 
				
			||||||
 | 
				
			|||||||
@ -1015,6 +1015,48 @@
 | 
				
			|||||||
                                    <input class="form-check-input" type="checkbox" id="finishInvasionsInOneMission" />
 | 
					                                    <input class="form-check-input" type="checkbox" id="finishInvasionsInOneMission" />
 | 
				
			||||||
                                    <label class="form-check-label" for="finishInvasionsInOneMission" data-loc="cheats_finishInvasionsInOneMission"></label>
 | 
					                                    <label class="form-check-label" for="finishInvasionsInOneMission" data-loc="cheats_finishInvasionsInOneMission"></label>
 | 
				
			||||||
                                </div>
 | 
					                                </div>
 | 
				
			||||||
 | 
					                                <form class="form-group mt-2">
 | 
				
			||||||
 | 
					                                    <label class="form-label" for="nemesisHenchmenKillsMultiplierGrineer" data-loc="cheats_nemesisHenchmenKillsMultiplierGrineer"></label>
 | 
				
			||||||
 | 
					                                    <div class="input-group">
 | 
				
			||||||
 | 
					                                        <input class="form-control" id="nemesisHenchmenKillsMultiplierGrineer" type="number" min="0" max="65535" data-default="1" />
 | 
				
			||||||
 | 
					                                        <button class="btn btn-secondary" type="button" data-loc="cheats_save"></button>
 | 
				
			||||||
 | 
					                                    </div>
 | 
				
			||||||
 | 
					                                </form>
 | 
				
			||||||
 | 
					                                <form class="form-group mt-2">
 | 
				
			||||||
 | 
					                                    <label class="form-label" for="nemesisHenchmenKillsMultiplierCorpus" data-loc="cheats_nemesisHenchmenKillsMultiplierCorpus"></label>
 | 
				
			||||||
 | 
					                                    <div class="input-group">
 | 
				
			||||||
 | 
					                                        <input class="form-control" id="nemesisHenchmenKillsMultiplierCorpus" type="number" min="0" max="65535" data-default="1" />
 | 
				
			||||||
 | 
					                                        <button class="btn btn-secondary" type="button" data-loc="cheats_save"></button>
 | 
				
			||||||
 | 
					                                    </div>
 | 
				
			||||||
 | 
					                                </form>
 | 
				
			||||||
 | 
					                                <form class="form-group mt-2">
 | 
				
			||||||
 | 
					                                    <label class="form-label" for="nemesisAntivirusGainMultiplier" data-loc="cheats_nemesisAntivirusGainMultiplier"></label>
 | 
				
			||||||
 | 
					                                    <div class="input-group">
 | 
				
			||||||
 | 
					                                        <input class="form-control" id="nemesisAntivirusGainMultiplier" type="number" min="0" max="65535" data-default="1" />
 | 
				
			||||||
 | 
					                                        <button class="btn btn-secondary" type="button" data-loc="cheats_save"></button>
 | 
				
			||||||
 | 
					                                    </div>
 | 
				
			||||||
 | 
					                                </form>
 | 
				
			||||||
 | 
					                                <form class="form-group mt-2">
 | 
				
			||||||
 | 
					                                    <label class="form-label" for="nemesisHintProgressMultiplierGrineer" data-loc="cheats_nemesisHintProgressMultiplierGrineer"></label>
 | 
				
			||||||
 | 
					                                    <div class="input-group">
 | 
				
			||||||
 | 
					                                        <input class="form-control" id="nemesisHintProgressMultiplierGrineer" type="number" min="0" max="65535" data-default="1" />
 | 
				
			||||||
 | 
					                                        <button class="btn btn-secondary" type="button" data-loc="cheats_save"></button>
 | 
				
			||||||
 | 
					                                    </div>
 | 
				
			||||||
 | 
					                                </form>
 | 
				
			||||||
 | 
					                                <form class="form-group mt-2">
 | 
				
			||||||
 | 
					                                    <label class="form-label" for="nemesisHintProgressMultiplierCorpus" data-loc="cheats_nemesisHintProgressMultiplierCorpus"></label>
 | 
				
			||||||
 | 
					                                    <div class="input-group">
 | 
				
			||||||
 | 
					                                        <input class="form-control" id="nemesisHintProgressMultiplierCorpus" type="number" min="0" max="65535" data-default="1" />
 | 
				
			||||||
 | 
					                                        <button class="btn btn-secondary" type="button" data-loc="cheats_save"></button>
 | 
				
			||||||
 | 
					                                    </div>
 | 
				
			||||||
 | 
					                                </form>
 | 
				
			||||||
 | 
					                                <form class="form-group mt-2">
 | 
				
			||||||
 | 
					                                    <label class="form-label" for="nemesisExtraWeapon" data-loc="cheats_nemesisExtraWeapon"></label>
 | 
				
			||||||
 | 
					                                    <div class="input-group">
 | 
				
			||||||
 | 
					                                        <input class="form-control" id="nemesisExtraWeapon" type="number" min="0" max="65535" data-default="0" />
 | 
				
			||||||
 | 
					                                        <button class="btn btn-secondary" type="button" data-loc="cheats_save"></button>
 | 
				
			||||||
 | 
					                                    </div>
 | 
				
			||||||
 | 
					                                </form>
 | 
				
			||||||
                                <div class="mt-2 mb-2 d-flex flex-wrap gap-2">
 | 
					                                <div class="mt-2 mb-2 d-flex flex-wrap gap-2">
 | 
				
			||||||
                                    <button class="btn btn-primary" onclick="debounce(doUnlockAllShipFeatures);" data-loc="cheats_unlockAllShipFeatures"></button>
 | 
					                                    <button class="btn btn-primary" onclick="debounce(doUnlockAllShipFeatures);" data-loc="cheats_unlockAllShipFeatures"></button>
 | 
				
			||||||
                                    <button class="btn btn-primary" onclick="debounce(unlockAllMissions);" data-loc="cheats_unlockAllMissions"></button>
 | 
					                                    <button class="btn btn-primary" onclick="debounce(unlockAllMissions);" data-loc="cheats_unlockAllMissions"></button>
 | 
				
			||||||
@ -1033,7 +1075,7 @@
 | 
				
			|||||||
                                    <label class="form-label" for="changeSyndicate" data-loc="cheats_changeSupportedSyndicate"></label>
 | 
					                                    <label class="form-label" for="changeSyndicate" data-loc="cheats_changeSupportedSyndicate"></label>
 | 
				
			||||||
                                    <div class="input-group">
 | 
					                                    <div class="input-group">
 | 
				
			||||||
                                        <select class="form-control" id="changeSyndicate"></select>
 | 
					                                        <select class="form-control" id="changeSyndicate"></select>
 | 
				
			||||||
                                        <button class="btn btn-primary" type="submit" data-loc="cheats_changeButton"></button>
 | 
					                                        <button class="btn btn-secondary" type="submit" data-loc="cheats_changeButton"></button>
 | 
				
			||||||
                                    </div>
 | 
					                                    </div>
 | 
				
			||||||
                                </form>
 | 
					                                </form>
 | 
				
			||||||
                            </div>
 | 
					                            </div>
 | 
				
			||||||
 | 
				
			|||||||
@ -1991,7 +1991,11 @@ function updateInventory() {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            for (const elm of accountCheats) {
 | 
					            for (const elm of accountCheats) {
 | 
				
			||||||
                elm.checked = !!data[elm.id];
 | 
					                if (elm.type === "checkbox") {
 | 
				
			||||||
 | 
					                    elm.checked = !!data[elm.id];
 | 
				
			||||||
 | 
					                } else if (elm.type === "number") {
 | 
				
			||||||
 | 
					                    elm.value = data[elm.id] !== undefined ? data[elm.id] : elm.getAttribute("data-default") || "";
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
@ -3208,6 +3212,41 @@ document.querySelectorAll("#account-cheats input[type=checkbox]").forEach(elm =>
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					document.querySelectorAll("#account-cheats .input-group").forEach(grp => {
 | 
				
			||||||
 | 
					    const input = grp.querySelector("input");
 | 
				
			||||||
 | 
					    const select = grp.querySelector("select");
 | 
				
			||||||
 | 
					    const btn = grp.querySelector("button");
 | 
				
			||||||
 | 
					    if (input) {
 | 
				
			||||||
 | 
					        input.oninput = input.onchange = function () {
 | 
				
			||||||
 | 
					            btn.classList.remove("btn-secondary");
 | 
				
			||||||
 | 
					            btn.classList.add("btn-primary");
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    if (select) {
 | 
				
			||||||
 | 
					        select.oninput = select.onchange = function () {
 | 
				
			||||||
 | 
					            btn.classList.remove("btn-secondary");
 | 
				
			||||||
 | 
					            btn.classList.add("btn-primary");
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    btn.onclick = function () {
 | 
				
			||||||
 | 
					        btn.classList.remove("btn-primary");
 | 
				
			||||||
 | 
					        btn.classList.add("btn-secondary");
 | 
				
			||||||
 | 
					        const input = btn.closest(".input-group").querySelector('input[type="number"]');
 | 
				
			||||||
 | 
					        if (!input) return;
 | 
				
			||||||
 | 
					        revalidateAuthz().then(() => {
 | 
				
			||||||
 | 
					            const value = input.value;
 | 
				
			||||||
 | 
					            $.post({
 | 
				
			||||||
 | 
					                url: "/custom/setAccountCheat?" + window.authz,
 | 
				
			||||||
 | 
					                contentType: "application/json",
 | 
				
			||||||
 | 
					                data: JSON.stringify({
 | 
				
			||||||
 | 
					                    key: input.id,
 | 
				
			||||||
 | 
					                    value: parseInt(value)
 | 
				
			||||||
 | 
					                })
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
document.querySelectorAll("#guild-cheats input[type=checkbox]").forEach(elm => {
 | 
					document.querySelectorAll("#guild-cheats input[type=checkbox]").forEach(elm => {
 | 
				
			||||||
    elm.onchange = function () {
 | 
					    elm.onchange = function () {
 | 
				
			||||||
        revalidateAuthz().then(() => {
 | 
					        revalidateAuthz().then(() => {
 | 
				
			||||||
 | 
				
			|||||||
@ -257,6 +257,12 @@ dict = {
 | 
				
			|||||||
    cheats_changeButton: `Ändern`,
 | 
					    cheats_changeButton: `Ändern`,
 | 
				
			||||||
    cheats_markAllAsRead: `Posteingang als gelesen markieren`,
 | 
					    cheats_markAllAsRead: `Posteingang als gelesen markieren`,
 | 
				
			||||||
    cheats_finishInvasionsInOneMission: `[UNTRANSLATED] Finish Invasions in One Mission`,
 | 
					    cheats_finishInvasionsInOneMission: `[UNTRANSLATED] Finish Invasions in One Mission`,
 | 
				
			||||||
 | 
					    cheats_nemesisHenchmenKillsMultiplierGrineer: `[UNTRANSLATED] Rage Progess Multiplier (Grineer)`,
 | 
				
			||||||
 | 
					    cheats_nemesisHenchmenKillsMultiplierCorpus: `[UNTRANSLATED] Rage Progess Multiplier (Corpus)`,
 | 
				
			||||||
 | 
					    cheats_nemesisAntivirusGainMultiplier: `[UNTRANSLATED] Antivirus Progress Multiplier`,
 | 
				
			||||||
 | 
					    cheats_nemesisHintProgressMultiplierGrineer: `[UNTRANSLATED] Hint Progress Multiplier (Grineer)`,
 | 
				
			||||||
 | 
					    cheats_nemesisHintProgressMultiplierCorpus: `[UNTRANSLATED] Hint Progress Multiplier (Corpus)`,
 | 
				
			||||||
 | 
					    cheats_nemesisExtraWeapon: `[UNTRANSLATED] Extra Nemesis Weapon / Token On Vanquish (0 to disable)`,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    worldState: `Weltstatus`,
 | 
					    worldState: `Weltstatus`,
 | 
				
			||||||
    worldState_creditBoost: `Event Booster: Credit`,
 | 
					    worldState_creditBoost: `Event Booster: Credit`,
 | 
				
			||||||
 | 
				
			|||||||
@ -256,6 +256,12 @@ dict = {
 | 
				
			|||||||
    cheats_changeButton: `Change`,
 | 
					    cheats_changeButton: `Change`,
 | 
				
			||||||
    cheats_markAllAsRead: `Mark Inbox As Read`,
 | 
					    cheats_markAllAsRead: `Mark Inbox As Read`,
 | 
				
			||||||
    cheats_finishInvasionsInOneMission: `Finish Invasions in One Mission`,
 | 
					    cheats_finishInvasionsInOneMission: `Finish Invasions in One Mission`,
 | 
				
			||||||
 | 
					    cheats_nemesisHenchmenKillsMultiplierGrineer: `Rage Progess Multiplier (Grineer)`,
 | 
				
			||||||
 | 
					    cheats_nemesisHenchmenKillsMultiplierCorpus: `Rage Progess Multiplier (Corpus)`,
 | 
				
			||||||
 | 
					    cheats_nemesisAntivirusGainMultiplier: `Antivirus Progress Multiplier`,
 | 
				
			||||||
 | 
					    cheats_nemesisHintProgressMultiplierGrineer: `Hint Progress Multiplier (Grineer)`,
 | 
				
			||||||
 | 
					    cheats_nemesisHintProgressMultiplierCorpus: `Hint Progress Multiplier (Corpus)`,
 | 
				
			||||||
 | 
					    cheats_nemesisExtraWeapon: `Extra Nemesis Weapon / Token On Vanquish (0 to disable)`,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    worldState: `World State`,
 | 
					    worldState: `World State`,
 | 
				
			||||||
    worldState_creditBoost: `Credit Boost`,
 | 
					    worldState_creditBoost: `Credit Boost`,
 | 
				
			||||||
 | 
				
			|||||||
@ -257,6 +257,12 @@ dict = {
 | 
				
			|||||||
    cheats_changeButton: `Cambiar`,
 | 
					    cheats_changeButton: `Cambiar`,
 | 
				
			||||||
    cheats_markAllAsRead: `Marcar bandeja de entrada como leída`,
 | 
					    cheats_markAllAsRead: `Marcar bandeja de entrada como leída`,
 | 
				
			||||||
    cheats_finishInvasionsInOneMission: `Finaliza Invasión en una mision`,
 | 
					    cheats_finishInvasionsInOneMission: `Finaliza Invasión en una mision`,
 | 
				
			||||||
 | 
					    cheats_nemesisHenchmenKillsMultiplierGrineer: `[UNTRANSLATED] Rage Progess Multiplier (Grineer)`,
 | 
				
			||||||
 | 
					    cheats_nemesisHenchmenKillsMultiplierCorpus: `[UNTRANSLATED] Rage Progess Multiplier (Corpus)`,
 | 
				
			||||||
 | 
					    cheats_nemesisAntivirusGainMultiplier: `[UNTRANSLATED] Antivirus Progress Multiplier`,
 | 
				
			||||||
 | 
					    cheats_nemesisHintProgressMultiplierGrineer: `[UNTRANSLATED] Hint Progress Multiplier (Grineer)`,
 | 
				
			||||||
 | 
					    cheats_nemesisHintProgressMultiplierCorpus: `[UNTRANSLATED] Hint Progress Multiplier (Corpus)`,
 | 
				
			||||||
 | 
					    cheats_nemesisExtraWeapon: `[UNTRANSLATED] Extra Nemesis Weapon / Token On Vanquish (0 to disable)`,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    worldState: `Estado del mundo`,
 | 
					    worldState: `Estado del mundo`,
 | 
				
			||||||
    worldState_creditBoost: `Potenciador de Créditos`,
 | 
					    worldState_creditBoost: `Potenciador de Créditos`,
 | 
				
			||||||
 | 
				
			|||||||
@ -257,6 +257,12 @@ dict = {
 | 
				
			|||||||
    cheats_changeButton: `Changer`,
 | 
					    cheats_changeButton: `Changer`,
 | 
				
			||||||
    cheats_markAllAsRead: `Marquer la boîte de réception comme lue`,
 | 
					    cheats_markAllAsRead: `Marquer la boîte de réception comme lue`,
 | 
				
			||||||
    cheats_finishInvasionsInOneMission: `Compléter les invasions en une mission.`,
 | 
					    cheats_finishInvasionsInOneMission: `Compléter les invasions en une mission.`,
 | 
				
			||||||
 | 
					    cheats_nemesisHenchmenKillsMultiplierGrineer: `[UNTRANSLATED] Rage Progess Multiplier (Grineer)`,
 | 
				
			||||||
 | 
					    cheats_nemesisHenchmenKillsMultiplierCorpus: `[UNTRANSLATED] Rage Progess Multiplier (Corpus)`,
 | 
				
			||||||
 | 
					    cheats_nemesisAntivirusGainMultiplier: `[UNTRANSLATED] Antivirus Progress Multiplier`,
 | 
				
			||||||
 | 
					    cheats_nemesisHintProgressMultiplierGrineer: `[UNTRANSLATED] Hint Progress Multiplier (Grineer)`,
 | 
				
			||||||
 | 
					    cheats_nemesisHintProgressMultiplierCorpus: `[UNTRANSLATED] Hint Progress Multiplier (Corpus)`,
 | 
				
			||||||
 | 
					    cheats_nemesisExtraWeapon: `[UNTRANSLATED] Extra Nemesis Weapon / Token On Vanquish (0 to disable)`,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    worldState: `Carte Solaire`,
 | 
					    worldState: `Carte Solaire`,
 | 
				
			||||||
    worldState_creditBoost: `Booster de Crédit`,
 | 
					    worldState_creditBoost: `Booster de Crédit`,
 | 
				
			||||||
 | 
				
			|||||||
@ -257,6 +257,12 @@ dict = {
 | 
				
			|||||||
    cheats_changeButton: `Изменить`,
 | 
					    cheats_changeButton: `Изменить`,
 | 
				
			||||||
    cheats_markAllAsRead: `Пометить все входящие как прочитанные`,
 | 
					    cheats_markAllAsRead: `Пометить все входящие как прочитанные`,
 | 
				
			||||||
    cheats_finishInvasionsInOneMission: `Завершать вторжение за одну миссию`,
 | 
					    cheats_finishInvasionsInOneMission: `Завершать вторжение за одну миссию`,
 | 
				
			||||||
 | 
					    cheats_nemesisHenchmenKillsMultiplierGrineer: `[UNTRANSLATED] Rage Progess Multiplier (Grineer)`,
 | 
				
			||||||
 | 
					    cheats_nemesisHenchmenKillsMultiplierCorpus: `[UNTRANSLATED] Rage Progess Multiplier (Corpus)`,
 | 
				
			||||||
 | 
					    cheats_nemesisAntivirusGainMultiplier: `[UNTRANSLATED] Antivirus Progress Multiplier`,
 | 
				
			||||||
 | 
					    cheats_nemesisHintProgressMultiplierGrineer: `[UNTRANSLATED] Hint Progress Multiplier (Grineer)`,
 | 
				
			||||||
 | 
					    cheats_nemesisHintProgressMultiplierCorpus: `[UNTRANSLATED] Hint Progress Multiplier (Corpus)`,
 | 
				
			||||||
 | 
					    cheats_nemesisExtraWeapon: `[UNTRANSLATED] Extra Nemesis Weapon / Token On Vanquish (0 to disable)`,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    worldState: `Состояние мира`,
 | 
					    worldState: `Состояние мира`,
 | 
				
			||||||
    worldState_creditBoost: `Глобальный бустер Кредитов`,
 | 
					    worldState_creditBoost: `Глобальный бустер Кредитов`,
 | 
				
			||||||
 | 
				
			|||||||
@ -257,6 +257,12 @@ dict = {
 | 
				
			|||||||
    cheats_changeButton: `Змінити`,
 | 
					    cheats_changeButton: `Змінити`,
 | 
				
			||||||
    cheats_markAllAsRead: `Помітити всі вхідні як прочитані`,
 | 
					    cheats_markAllAsRead: `Помітити всі вхідні як прочитані`,
 | 
				
			||||||
    cheats_finishInvasionsInOneMission: `Завершувати вторгнення за одну місію`,
 | 
					    cheats_finishInvasionsInOneMission: `Завершувати вторгнення за одну місію`,
 | 
				
			||||||
 | 
					    cheats_nemesisHenchmenKillsMultiplierGrineer: `[UNTRANSLATED] Rage Progess Multiplier (Grineer)`,
 | 
				
			||||||
 | 
					    cheats_nemesisHenchmenKillsMultiplierCorpus: `[UNTRANSLATED] Rage Progess Multiplier (Corpus)`,
 | 
				
			||||||
 | 
					    cheats_nemesisAntivirusGainMultiplier: `[UNTRANSLATED] Antivirus Progress Multiplier`,
 | 
				
			||||||
 | 
					    cheats_nemesisHintProgressMultiplierGrineer: `[UNTRANSLATED] Hint Progress Multiplier (Grineer)`,
 | 
				
			||||||
 | 
					    cheats_nemesisHintProgressMultiplierCorpus: `[UNTRANSLATED] Hint Progress Multiplier (Corpus)`,
 | 
				
			||||||
 | 
					    cheats_nemesisExtraWeapon: `[UNTRANSLATED] Extra Nemesis Weapon / Token On Vanquish (0 to disable)`,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    worldState: `Стан світу`,
 | 
					    worldState: `Стан світу`,
 | 
				
			||||||
    worldState_creditBoost: `Глобальне посилення Кредитів`,
 | 
					    worldState_creditBoost: `Глобальне посилення Кредитів`,
 | 
				
			||||||
 | 
				
			|||||||
@ -257,6 +257,12 @@ dict = {
 | 
				
			|||||||
    cheats_changeButton: `更改`,
 | 
					    cheats_changeButton: `更改`,
 | 
				
			||||||
    cheats_markAllAsRead: `收件箱全部标记为已读`,
 | 
					    cheats_markAllAsRead: `收件箱全部标记为已读`,
 | 
				
			||||||
    cheats_finishInvasionsInOneMission: `一场任务完成整场入侵`,
 | 
					    cheats_finishInvasionsInOneMission: `一场任务完成整场入侵`,
 | 
				
			||||||
 | 
					    cheats_nemesisHenchmenKillsMultiplierGrineer: `玄骸怒气倍率 (Grineer)`,
 | 
				
			||||||
 | 
					    cheats_nemesisHenchmenKillsMultiplierCorpus: `玄骸怒气倍率 (Corpus)`,
 | 
				
			||||||
 | 
					    cheats_nemesisAntivirusGainMultiplier: `杀毒进度倍率 (科腐者)`,
 | 
				
			||||||
 | 
					    cheats_nemesisHintProgressMultiplierGrineer: `解密进度倍率 (Grineer)`,
 | 
				
			||||||
 | 
					    cheats_nemesisHintProgressMultiplierCorpus: `解密进度倍率 (Corpus)`,
 | 
				
			||||||
 | 
					    cheats_nemesisExtraWeapon: `额外玄骸武器/代币 (0为禁用)`,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    worldState: `世界状态配置`,
 | 
					    worldState: `世界状态配置`,
 | 
				
			||||||
    worldState_creditBoost: `现金加成`,
 | 
					    worldState_creditBoost: `现金加成`,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user