From ddf5468bff1a9356d25f294e19ef4fb37d4c007f Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Thu, 9 Oct 2025 11:30:06 +0200 Subject: [PATCH] revert removal of `unlockAllSkins` cheat --- config-vanilla.json | 1 + src/controllers/api/inventoryController.ts | 17 +++++++++++++- src/services/configService.ts | 4 ++-- src/services/saveLoadoutService.ts | 26 +++++++++++++--------- static/webui/index.html | 4 ++++ static/webui/translations/de.js | 1 + static/webui/translations/en.js | 1 + static/webui/translations/es.js | 1 + static/webui/translations/fr.js | 1 + static/webui/translations/ru.js | 1 + static/webui/translations/uk.js | 1 + static/webui/translations/zh.js | 1 + 12 files changed, 46 insertions(+), 13 deletions(-) diff --git a/config-vanilla.json b/config-vanilla.json index 9c24f5a6..b8810686 100644 --- a/config-vanilla.json +++ b/config-vanilla.json @@ -11,6 +11,7 @@ "administratorNames": [], "autoCreateAccount": true, "skipTutorial": false, + "unlockAllSkins": false, "fullyStockedVendors": false, "skipClanKeyCrafting": false, "spoofMasteryRank": -1, diff --git a/src/controllers/api/inventoryController.ts b/src/controllers/api/inventoryController.ts index 64590fde..8536bacd 100644 --- a/src/controllers/api/inventoryController.ts +++ b/src/controllers/api/inventoryController.ts @@ -10,6 +10,7 @@ import { equipmentKeys } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { IPolarity } from "../../types/inventoryTypes/commonInventoryTypes.ts"; import { ArtifactPolarity } from "../../types/inventoryTypes/commonInventoryTypes.ts"; import type { ICountedItem } from "warframe-public-export-plus"; +import { ExportCustoms } from "warframe-public-export-plus"; import { applyCheatsToInfestedFoundry, handleSubsumeCompletion } from "../../services/infestedFoundryService.ts"; import { addEmailItem, @@ -22,7 +23,7 @@ import { getCalendarProgress } from "../../services/inventoryService.ts"; import { logger } from "../../utils/logger.ts"; -import { addString } from "../../helpers/stringHelpers.ts"; +import { addString, catBreadHash } from "../../helpers/stringHelpers.ts"; import { Types } from "mongoose"; import { getNemesisManifest } from "../../helpers/nemesisHelpers.ts"; import { getPersonalRooms } from "../../services/personalRoomsService.ts"; @@ -331,6 +332,20 @@ export const getInventoryResponse = async ( inventoryResponse.FlavourItems.push({ ItemType: uniqueName }); } }); + + if (config.unlockAllSkins) { + const ownedWeaponSkins = new Set(inventoryResponse.WeaponSkins.map(x => x.ItemType)); + for (const [uniqueName, meta] of Object.entries(ExportCustoms)) { + if (!meta.alwaysAvailable && !ownedWeaponSkins.has(uniqueName)) { + inventoryResponse.WeaponSkins.push({ + ItemId: { + $oid: "ca70ca70ca70ca70" + catBreadHash(uniqueName).toString(16).padStart(8, "0") + }, + ItemType: uniqueName + }); + } + } + } } if (typeof config.spoofMasteryRank === "number" && config.spoofMasteryRank >= 0) { diff --git a/src/services/configService.ts b/src/services/configService.ts index 22263656..0c34e967 100644 --- a/src/services/configService.ts +++ b/src/services/configService.ts @@ -21,6 +21,7 @@ export interface IConfig { administratorNames?: string[]; autoCreateAccount?: boolean; skipTutorial?: boolean; + unlockAllSkins?: boolean; fullyStockedVendors?: boolean; skipClanKeyCrafting?: boolean; spoofMasteryRank?: number; @@ -128,8 +129,7 @@ export const configRemovedOptionsKeys = [ "fastClanAscension", "unlockAllFlavourItems", "unlockAllShipDecorations", - "unlockAllDecoRecipes", - "unlockAllSkins" + "unlockAllDecoRecipes" ]; export const configPath = path.join(repoDir, args.configPath ?? "config.json"); diff --git a/src/services/saveLoadoutService.ts b/src/services/saveLoadoutService.ts index 1c4dcbd4..506a5444 100644 --- a/src/services/saveLoadoutService.ts +++ b/src/services/saveLoadoutService.ts @@ -139,16 +139,22 @@ export const handleInventoryItemConfigChange = async ( case "WeaponSkins": { const itemEntries = equipment as IItemEntry; for (const [itemId, itemConfigEntries] of Object.entries(itemEntries)) { - const inventoryItem = inventory.WeaponSkins.id(itemId); - if (!inventoryItem) { - logger.warn(`inventory item WeaponSkins not found with id ${itemId}`); - continue; - } - if ("Favorite" in itemConfigEntries) { - inventoryItem.Favorite = itemConfigEntries.Favorite; - } - if ("IsNew" in itemConfigEntries) { - inventoryItem.IsNew = itemConfigEntries.IsNew; + if (itemId.startsWith("ca70ca70ca70ca70")) { + logger.warn( + `unlockAllSkins does not work with favoriting items because you don't actually own it` + ); + } else { + const inventoryItem = inventory.WeaponSkins.id(itemId); + if (!inventoryItem) { + logger.warn(`inventory item WeaponSkins not found with id ${itemId}`); + continue; + } + if ("Favorite" in itemConfigEntries) { + inventoryItem.Favorite = itemConfigEntries.Favorite; + } + if ("IsNew" in itemConfigEntries) { + inventoryItem.IsNew = itemConfigEntries.IsNew; + } } } break; diff --git a/static/webui/index.html b/static/webui/index.html index 58b9093d..a3fe52b4 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -1112,6 +1112,10 @@ +
+ + +
diff --git a/static/webui/translations/de.js b/static/webui/translations/de.js index 5abe613e..93610190 100644 --- a/static/webui/translations/de.js +++ b/static/webui/translations/de.js @@ -215,6 +215,7 @@ dict = { cheats_dontSubtractVoidTraces: `Void-Spuren nicht verbrauchen`, cheats_dontSubtractConsumables: `Verbrauchsgegenstände (Ausrüstung) nicht verbrauchen`, cheats_unlockAllShipFeatures: `Alle Schiffs-Funktionen freischalten`, + cheats_unlockAllSkins: `Alle Skins freischalten`, cheats_unlockAllCapturaScenes: `Alle Photora-Szenen freischalten`, cheats_universalPolarityEverywhere: `Universelle Polarität überall`, cheats_unlockDoubleCapacityPotatoesEverywhere: `Orokin Reaktor & Beschleuniger überall`, diff --git a/static/webui/translations/en.js b/static/webui/translations/en.js index 6485deee..27e07fa3 100644 --- a/static/webui/translations/en.js +++ b/static/webui/translations/en.js @@ -214,6 +214,7 @@ dict = { cheats_dontSubtractVoidTraces: `Don't Subtract Void Traces`, cheats_dontSubtractConsumables: `Don't Subtract Consumables`, cheats_unlockAllShipFeatures: `Unlock All Ship Features`, + cheats_unlockAllSkins: `Unlock All Skins`, cheats_unlockAllCapturaScenes: `Unlock All Captura Scenes`, cheats_universalPolarityEverywhere: `Universal Polarity Everywhere`, cheats_unlockDoubleCapacityPotatoesEverywhere: `Potatoes Everywhere`, diff --git a/static/webui/translations/es.js b/static/webui/translations/es.js index ba3d5a51..dff5d0be 100644 --- a/static/webui/translations/es.js +++ b/static/webui/translations/es.js @@ -215,6 +215,7 @@ dict = { cheats_dontSubtractVoidTraces: `No descontar vestigios del Vacío`, cheats_dontSubtractConsumables: `No restar consumibles`, cheats_unlockAllShipFeatures: `Desbloquear todas las funciones de nave`, + cheats_unlockAllSkins: `Desbloquear todas las skins`, cheats_unlockAllCapturaScenes: `Desbloquear todas las escenas de Captura`, cheats_universalPolarityEverywhere: `Polaridad universal en todas partes`, cheats_unlockDoubleCapacityPotatoesEverywhere: `Patatas en todas partes`, diff --git a/static/webui/translations/fr.js b/static/webui/translations/fr.js index 9e1a330a..5fcecf28 100644 --- a/static/webui/translations/fr.js +++ b/static/webui/translations/fr.js @@ -215,6 +215,7 @@ dict = { cheats_dontSubtractVoidTraces: `Ne pas consommer de Void Traces`, cheats_dontSubtractConsumables: `Ne pas retirer de consommables`, cheats_unlockAllShipFeatures: `Débloquer tous les segments du vaisseau`, + cheats_unlockAllSkins: `Débloquer tous les skins`, cheats_unlockAllCapturaScenes: `Débloquer toutes les scènes captura`, cheats_universalPolarityEverywhere: `Polarités universelles partout`, cheats_unlockDoubleCapacityPotatoesEverywhere: `Réacteurs et Catalyseurs partout`, diff --git a/static/webui/translations/ru.js b/static/webui/translations/ru.js index 2d4ec66b..12e3b078 100644 --- a/static/webui/translations/ru.js +++ b/static/webui/translations/ru.js @@ -215,6 +215,7 @@ dict = { cheats_dontSubtractVoidTraces: `Не вычитать количество Отголосков Бездны`, cheats_dontSubtractConsumables: `Не вычитать количество расходников`, cheats_unlockAllShipFeatures: `Разблокировать все функции корабля`, + cheats_unlockAllSkins: `Разблокировать все скины`, cheats_unlockAllCapturaScenes: `Разблокировать все сцены Каптуры`, cheats_universalPolarityEverywhere: `Универсальная полярность везде`, cheats_unlockDoubleCapacityPotatoesEverywhere: `Реакторы/Катализаторы орокин везде`, diff --git a/static/webui/translations/uk.js b/static/webui/translations/uk.js index d1788533..2bb933f8 100644 --- a/static/webui/translations/uk.js +++ b/static/webui/translations/uk.js @@ -215,6 +215,7 @@ dict = { cheats_dontSubtractVoidTraces: `Не вираховувати кількість Відлуння`, cheats_dontSubtractConsumables: `Не вираховувати кількість витратних матеріалів`, cheats_unlockAllShipFeatures: `Розблокувати всі функції судна`, + cheats_unlockAllSkins: `Розблокувати всі скіни`, cheats_unlockAllCapturaScenes: `Розблокувати всі сцени Світлописця`, cheats_universalPolarityEverywhere: `Будь-яка полярність скрізь`, cheats_unlockDoubleCapacityPotatoesEverywhere: `Орокінські Реактори/Каталізатори скрізь`, diff --git a/static/webui/translations/zh.js b/static/webui/translations/zh.js index a3d3d7f4..2328b493 100644 --- a/static/webui/translations/zh.js +++ b/static/webui/translations/zh.js @@ -215,6 +215,7 @@ dict = { cheats_dontSubtractVoidTraces: `虚空光体无消耗`, cheats_dontSubtractConsumables: `消耗物品使用时无损耗`, cheats_unlockAllShipFeatures: `解锁所有飞船功能`, + cheats_unlockAllSkins: `解锁所有外观`, cheats_unlockAllCapturaScenes: `解锁所有Captura场景`, cheats_universalPolarityEverywhere: `全局万用极性`, cheats_unlockDoubleCapacityPotatoesEverywhere: `全物品自带Orokin反应堆`,