From 9b7127972d5fd691ab522873432f7a9d2a3ef9f9 Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Tue, 25 Jun 2024 15:11:19 +0200 Subject: [PATCH 1/5] improve: add DailyAffiliationCavia (#402) --- src/models/inventoryModels/inventoryModel.ts | 1 + src/types/inventoryTypes/inventoryTypes.ts | 1 + static/fixed_responses/new_inventory.json | 1 + static/fixed_responses/postTutorialInventory.json | 1 + 4 files changed, 4 insertions(+) diff --git a/src/models/inventoryModels/inventoryModel.ts b/src/models/inventoryModels/inventoryModel.ts index 3e2c48a6..e3573eb8 100644 --- a/src/models/inventoryModels/inventoryModel.ts +++ b/src/models/inventoryModels/inventoryModel.ts @@ -634,6 +634,7 @@ const inventorySchema = new Schema( DailyAffiliationNecraloid: Number, DailyAffiliationZariman: Number, DailyAffiliationKahl: Number, + DailyAffiliationCavia: Number, //Daily Focus limit DailyFocus: Number, diff --git a/src/types/inventoryTypes/inventoryTypes.ts b/src/types/inventoryTypes/inventoryTypes.ts index f963d819..707e0673 100644 --- a/src/types/inventoryTypes/inventoryTypes.ts +++ b/src/types/inventoryTypes/inventoryTypes.ts @@ -252,6 +252,7 @@ export interface IInventoryResponse { DailyAffiliationZariman: number; NemesisAbandonedRewards: string[]; DailyAffiliationKahl: number; + DailyAffiliationCavia: number; LastInventorySync: IOid; NextRefill: IMongoDate; // Next time argon crystals will have a decay tick FoundToday?: IMiscItem[]; // for Argon Crystals diff --git a/static/fixed_responses/new_inventory.json b/static/fixed_responses/new_inventory.json index 8c112a7a..fb2e616e 100644 --- a/static/fixed_responses/new_inventory.json +++ b/static/fixed_responses/new_inventory.json @@ -101,6 +101,7 @@ "DailyAffiliationNecraloid": 16000, "DailyAffiliationZariman": 16000, "DailyAffiliationKahl": 16000, + "DailyAffiliationCavia": 16000, "DailyFocus": 250000, "GiftsRemaining": 8, "LibraryAvailableDailyTaskInfo": { diff --git a/static/fixed_responses/postTutorialInventory.json b/static/fixed_responses/postTutorialInventory.json index 53af6393..31160132 100644 --- a/static/fixed_responses/postTutorialInventory.json +++ b/static/fixed_responses/postTutorialInventory.json @@ -29,6 +29,7 @@ "DailyAffiliationVentkids": 16000, "DailyAffiliationVox": 16000, "DailyAffiliationZariman": 16000, + "DailyAffiliationCavia": 16000, "DailyFocus": 250000, "DuviriInfo": { "Seed": 5898912197983600352, "NumCompletions": 0 }, "GiftsRemaining": 8, From 2178b7523ef83bd25459d0b4d89af0e91856071a Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Wed, 26 Jun 2024 16:23:52 +0200 Subject: [PATCH 2/5] improve: loadout config save FocusSchool (#408) --- src/models/inventoryModels/loadoutModel.ts | 13 ++++++++----- src/types/inventoryTypes/inventoryTypes.ts | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/models/inventoryModels/loadoutModel.ts b/src/models/inventoryModels/loadoutModel.ts index a0cd68e1..30a22c90 100644 --- a/src/models/inventoryModels/loadoutModel.ts +++ b/src/models/inventoryModels/loadoutModel.ts @@ -27,13 +27,16 @@ const EquipmentSelectionSchema = new Schema( const loadoutConfigSchema = new Schema( { + FocusSchool: String, PresetIcon: String, Favorite: Boolean, - n: String, - s: EquipmentSelectionSchema, - p: EquipmentSelectionSchema, - l: EquipmentSelectionSchema, - m: EquipmentSelectionSchema + n: String, // Loadout name + s: EquipmentSelectionSchema, // Suit + l: EquipmentSelectionSchema, // Primary weapon + p: EquipmentSelectionSchema, // Secondary weapon + m: EquipmentSelectionSchema, // Melee weapon + h: EquipmentSelectionSchema, // Gravimag weapon + a: EquipmentSelectionSchema // Necromech exalted weapon }, { id: false diff --git a/src/types/inventoryTypes/inventoryTypes.ts b/src/types/inventoryTypes/inventoryTypes.ts index 707e0673..f0ad1ec9 100644 --- a/src/types/inventoryTypes/inventoryTypes.ts +++ b/src/types/inventoryTypes/inventoryTypes.ts @@ -621,11 +621,11 @@ export interface ILoadoutConfigClient { Favorite?: boolean; n?: string; // Loadout name s?: IEquipmentSelection; // Suit - p?: IEquipmentSelection; + p?: IEquipmentSelection; // Secondary weapon l?: IEquipmentSelection; // Primary weapon m?: IEquipmentSelection; // Melee weapon h?: IEquipmentSelection; // Gravimag weapon - a?: IEquipmentSelection; + a?: IEquipmentSelection; // Necromech exalted weapon ItemId: IOid; Remove?: boolean; // when client wants to remove a config, it only includes ItemId & Remove. } From 34c0011abf326f44d0b3fce2d904be96e8a27c6c Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Wed, 26 Jun 2024 16:29:14 +0200 Subject: [PATCH 3/5] chore: remove unused files (#409) --- src/controllers/stats/viewController.ts | 3 +- static/fixed_responses/login.json | 1 - static/fixed_responses/purchase.json | 13 - static/fixed_responses/upload.json | 1 - static/fixed_responses/view.json | 1 - .../scripts/missions-drop-table-get-script.js | 273 ------------------ 6 files changed, 1 insertion(+), 291 deletions(-) delete mode 100644 static/fixed_responses/login.json delete mode 100644 static/fixed_responses/purchase.json delete mode 100644 static/fixed_responses/upload.json delete mode 100644 static/fixed_responses/view.json delete mode 100644 static/json/scripts/missions-drop-table-get-script.js diff --git a/src/controllers/stats/viewController.ts b/src/controllers/stats/viewController.ts index 3d6b9e20..cae180ce 100644 --- a/src/controllers/stats/viewController.ts +++ b/src/controllers/stats/viewController.ts @@ -3,7 +3,6 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; import { IStatsView } from "@/src/types/statTypes"; import { config } from "@/src/services/configService"; -import view from "@/static/fixed_responses/view.json"; import allScans from "@/static/fixed_responses/allScans.json"; // eslint-disable-next-line @typescript-eslint/no-misused-promises @@ -15,7 +14,7 @@ const viewController: RequestHandler = async (req, res) => { return; } - const responseJson: IStatsView = view; + const responseJson: IStatsView = {}; responseJson.Weapons = []; for (const item of inventory.XPInfo) { responseJson.Weapons.push({ diff --git a/static/fixed_responses/login.json b/static/fixed_responses/login.json deleted file mode 100644 index 0967ef42..00000000 --- a/static/fixed_responses/login.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/static/fixed_responses/purchase.json b/static/fixed_responses/purchase.json deleted file mode 100644 index e9c27715..00000000 --- a/static/fixed_responses/purchase.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "InventoryChanges": { - "WeaponBin": { "count": 1, "platinum": 0, "Slots": -1 }, - "Suits": [ - { - "ItemType": "/Lotus/Powersuits/Ninja/Ninja", - "Configs": [], - "ItemId": { "$oid": "123123123123" } - } - ], - "RegularCredits": -25000 - } -} diff --git a/static/fixed_responses/upload.json b/static/fixed_responses/upload.json deleted file mode 100644 index 0967ef42..00000000 --- a/static/fixed_responses/upload.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/static/fixed_responses/view.json b/static/fixed_responses/view.json deleted file mode 100644 index 0967ef42..00000000 --- a/static/fixed_responses/view.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/static/json/scripts/missions-drop-table-get-script.js b/static/json/scripts/missions-drop-table-get-script.js deleted file mode 100644 index e80d6020..00000000 --- a/static/json/scripts/missions-drop-table-get-script.js +++ /dev/null @@ -1,273 +0,0 @@ -// for https://www.warframe.com/ru/droptables -/* eslint-disable */ -(() => { - const missionNames = { - "Mercury/Larunda Relay": "MercuryHUB", - "Venus/Vesper Relay": "VenusHUB", - "Earth/Strata Relay": "EarthHUB", - "Mars/Maroo's Bazaar": "TradeHUB1", - "Saturn/Kronia Relay": "SaturnHUB", - "Eris/Kuiper Relay": "ErisHUB", - "Europa/Leonov Relay": "EuropaHUB", - "Pluto/Orcus Relay": "PlutoHUB", - "Venus/Romula": "ClanNode0", - "Venus/Malva": "ClanNode1", - "Earth/Coba": "ClanNode2", - "Earth/Tikal": "ClanNode3", - "Jupiter/Sinai": "ClanNode4", - "Jupiter/Cameria": "ClanNode5", - "Europa/Larzac": "ClanNode6", - "Europa/Cholistan": "ClanNode7", - "Mars/Kadesh": "ClanNode8", - "Mars/Wahiba": "ClanNode9", - "Phobos/Memphis": "ClanNode10", - "Phobos/Zeugma": "ClanNode11", - "Saturn/Caracol": "ClanNode12", - "Saturn/Piscinas": "ClanNode13", - "Sedna/Amarna": "ClanNode14", - "Sedna/Sangeru": "ClanNode15", - "Uranus/Ur": "ClanNode16", - "Uranus/Assur": "ClanNode17", - "Eris/Akkad": "ClanNode18", - "Eris/Zabala": "ClanNode19", - "Neptune/Yursa": "ClanNode20", - "Neptune/Kelashin": "ClanNode21", - "Ceres/Seimeni": "ClanNode22", - "Ceres/Gabii": "ClanNode23", - "Pluto/Sechura": "ClanNode24", - "Pluto/Hieracon": "ClanNode25", - "Phobos/Roche": "SettlementNode1", - "Phobos/Skyresh": "SettlementNode2", - "Phobos/Stickney": "SettlementNode3", - "Phobos/Kepler": "SettlementNode10", - "Phobos/Gulliver": "SettlementNode11", - "Phobos/Monolith": "SettlementNode12", - "Phobos/Shklovsky": "SettlementNode14", - "Phobos/Sharpless": "SettlementNode15", - "Phobos/Iliad": "SettlementNode20", - "Neptune/Galatea": "SolNode1", - "Venus/Aphrodite": "SolNode2", - "Pluto/Acheron": "SolNode4", - "Neptune/Despina": "SolNode6", - "Uranus/Rosalind": "SolNode9", - "Jupiter/Thebe": "SolNode10", - "Mars/Tharsis": "SolNode11", - "Mercury/Elion": "SolNode12", - "Mars/Ultor": "SolNode14", - "Earth/Pacific": "SolNode15", - "Mars/Augustus": "SolNode16", - "Neptune/Proteus": "SolNode17", - "Saturn/Rhea": "SolNode18", - "Saturn/Enceladus": "SolNode19", - "Saturn/Telesto": "SolNode20", - "Pluto/Narcissus": "SolNode21", - "Venus/Tessera": "SolNode22", - "Venus/Cytherean": "SolNode23", - "Earth/Oro": "SolNode24", - "Jupiter/Callisto": "SolNode25", - "Earth/Lith": "SolNode26", - "Earth/E Prime": "SolNode27", - "Mercury/Terminus": "SolNode28", - "Mars/Olympus": "SolNode30", - "Saturn/Anthe": "SolNode31", - "Saturn/Tethys": "SolNode32", - "Uranus/Ariel": "SolNode33", - "Uranus/Sycorax": "SolNode34", - "Mars/Martialis": "SolNode36", - "Pluto/Minthe": "SolNode38", - "Earth/Everest": "SolNode39", - "Mars/Arval": "SolNode41", - "Saturn/Helene": "SolNode42", - "Pluto/Cerberus": "SolNode43", - "Mars/Ara": "SolNode45", - "Mars/Spear": "SolNode46", - "Pluto/Regna": "SolNode48", - "Neptune/Larissa": "SolNode49", - "Saturn/Numa": "SolNode50", - "Pluto/Hades": "SolNode51", - "Jupiter/Themisto": "SolNode53", - "Pluto/Cypress": "SolNode56", - "Neptune/Sao": "SolNode57", - "Mars/Hellas": "SolNode58", - "Earth/Eurasia": "SolNode59", - "Uranus/Caliban": "SolNode60", - "Venus/Ishtar": "SolNode61", - "Neptune/Neso": "SolNode62", - "Earth/Mantle": "SolNode63", - "Uranus/Umbriel": "SolNode64", - "Mars/Gradivus": "SolNode65", - "Venus/Unda": "SolNode66", - "Saturn/Dione": "SolNode67", - "Mars/Vallis": "SolNode68", - "Uranus/Ophelia": "SolNode69", - "Saturn/Cassini": "SolNode70", - "Pluto/Outer Terminus": "SolNode72", - "Jupiter/Ananke": "SolNode73", - "Jupiter/Carme": "SolNode74", - "Earth/Cervantes": "SolNode75", - "Pluto/Hydra": "SolNode76", - "Neptune/Triton": "SolNode78", - "Earth/Cambria": "SolNode79", - "Pluto/Palus": "SolNode81", - "Saturn/Calypso": "SolNode82", - "Uranus/Cressida": "SolNode83", - "Neptune/Nereid": "SolNode84", - "Earth/Gaia": "SolNode85", - "Jupiter/Ganymede": "SolNode87", - "Jupiter/Adrastea": "SolNode88", - "Earth/Mariana": "SolNode89", - "Saturn/Keeler": "SolNode93", - "Mercury/Apollodorus": "SolNode94", - "Saturn/Titan": "SolNode96", - "Jupiter/Amalthea": "SolNode97", - "Uranus/Desdemona": "SolNode98", - "Mars/War": "SolNode99", - "Jupiter/Elara": "SolNode100", - "Venus/Kiliken": "SolNode101", - "Pluto/Oceanum": "SolNode102", - "Mercury/M Prime": "SolNode103", - "Venus/Fossa": "SolNode104", - "Uranus/Titania": "SolNode105", - "Mars/Alator": "SolNode106", - "Venus/Venera": "SolNode107", - "Mercury/Tolstoj": "SolNode108", - "Venus/Linea": "SolNode109", - "Mars/Ares": "SolNode113", - "Uranus/Puck": "SolNode114", - "Neptune/Laomedeia": "SolNode118", - "Mercury/Caloris": "SolNode119", - "Jupiter/Carpo": "SolNode121", - "Uranus/Stephano": "SolNode122", - "Venus/V Prime": "SolNode123", - "Jupiter/Io": "SolNode125", - "Jupiter/Metis": "SolNode126", - "Neptune/Psamathe": "SolNode127", - "Venus/E Gate": "SolNode128", - "Venus/Orb Vallis": "SolNode129", - "Mercury/Lares": "SolNode130", - "Ceres/Pallas": "SolNode131", - "Ceres/Bode": "SolNode132", - "Ceres/Thon": "SolNode135", - "Ceres/Nuovo": "SolNode137", - "Ceres/Ludi": "SolNode138", - "Ceres/Lex": "SolNode139", - "Ceres/Kiste": "SolNode140", - "Ceres/Ker": "SolNode141", - "Ceres/Exta": "SolNode144", - "Ceres/Draco": "SolNode146", - "Ceres/Cinxia": "SolNode147", - "Ceres/Casta": "SolNode149", - "Eris/Brugia": "SolNode153", - "Eris/Isos": "SolNode162", - "Eris/Kala-azar": "SolNode164", - "Eris/Nimus": "SolNode166", - "Eris/Oestrus": "SolNode167", - "Eris/Saxis": "SolNode171", - "Eris/Xini": "SolNode172", - "Eris/Solium": "SolNode173", - "Eris/Naeglar": "SolNode175", - "Sedna/Kappa": "SolNode177", - "Sedna/Adaro": "SolNode181", - "Sedna/Vodyanoi": "SolNode183", - "Sedna/Rusalka": "SolNode184", - "Sedna/Berehynia": "SolNode185", - "Sedna/Selkie": "SolNode187", - "Sedna/Kelpie": "SolNode188", - "Sedna/Naga": "SolNode189", - "Sedna/Nakki": "SolNode190", - "Sedna/Marid": "SolNode191", - "Sedna/Merrow": "SolNode193", - "Sedna/Hydron": "SolNode195", - "Sedna/Charybdis": "SolNode196", - "Sedna/Yam": "SolNode199", - "Europa/Abaddon": "SolNode203", - "Europa/Armaros": "SolNode204", - "Europa/Baal": "SolNode205", - "Europa/Morax": "SolNode209", - "Europa/Naamah": "SolNode210", - "Europa/Ose": "SolNode211", - "Europa/Paimon": "SolNode212", - "Europa/Sorath": "SolNode214", - "Europa/Valac": "SolNode215", - "Europa/Valefor": "SolNode216", - "Europa/Orias": "SolNode217", - "Europa/Kokabiel": "SolNode220", - "Mercury/Boethius": "SolNode223", - "Mercury/Odin": "SolNode224", - "Mercury/Suisei": "SolNode225", - "Mercury/Pantheon": "SolNode226", - "Earth/Plains of Eidolon": "SolNode228", - "Deimos/Cambion Drift": "SolNode229", - "Lua/Plato": "SolNode300", - "Lua/Grimaldi": "SolNode301", - "Lua/Tycho": "SolNode302", - "Lua/Copernicus": "SolNode304", - "Lua/Stöfler": "SolNode305", - "Lua/Pavlov": "SolNode306", - "Lua/Zeipel": "SolNode307", - "Lua/Apollo": "SolNode308", - "Void/Teshub": "SolNode400", - "Void/Hepit": "SolNode401", - "Void/Taranis": "SolNode402", - "Void/Tiwaz": "SolNode403", - "Void/Stribog": "SolNode404", - "Void/Ani": "SolNode405", - "Void/Ukko": "SolNode406", - "Void/Oxomoco": "SolNode407", - "Void/Belenus": "SolNode408", - "Void/Mot": "SolNode409", - "Void/Aten": "SolNode410", - "Void/Marduk": "SolNode411", - "Void/Mithra": "SolNode412", - "undefined/Jordas Golem Assassinate": "SolNode701", - "undefined/Mutalist Alad V Assassinate": "SolNode705", - "Deimos/Horend": "SolNode706", - "Deimos/Hyf": "SolNode707", - "Deimos/Phlegyas": "SolNode708", - "Deimos/Dirus": "SolNode709", - "Deimos/Formido": "SolNode710", - "Deimos/Terrorem": "SolNode711", - "Deimos/Magnacidium": "SolNode712", - "Deimos/Exequias": "SolNode713", - "Jupiter/The Ropalolyst": "SolNode740", - "Kuva Fortress/Koro": "SolNode741", - "Kuva Fortress/Nabuk": "SolNode742", - "Kuva Fortress/Rotuma": "SolNode743", - "Kuva Fortress/Taveuni": "SolNode744", - "Kuva Fortress/Tamu": "SolNode745", - "Kuva Fortress/Dakata": "SolNode746", - "Kuva Fortress/Pago": "SolNode747", - "Kuva Fortress/Garus": "SolNode748", - "Venus/Montes": "SolNode902", - "Earth/Erpo": "SolNode903", - "Mars/Syrtis": "SolNode904", - "Jupiter/Galilea": "SolNode905", - "Saturn/Pandora": "SolNode906", - "Uranus/Caelus": "SolNode907" - }; - const result = {}; - let lastItem = []; - let lastItemIndex; - let rotation; - Array.from(document.querySelectorAll("table")[0].children[0].children).forEach(element => { - if (element.classList.contains("blank-row")) { - if (lastItemIndex) result[lastItemIndex] = lastItem; - lastItem = []; - lastItemIndex = undefined; - rotation = undefined; - } else if (element.children[0].getAttribute("colspan") == 2) { - if (!lastItemIndex) { - const mission = element.children[0].textContent; - const formatedMission = mission.substring(0, mission.indexOf(" (")); - lastItemIndex = missionNames[formatedMission]; - } else { - rotation = element.children[0].textContent.replace("Rotation ", ""); - } - } else { - const name = element.children[0].textContent; - const chance = parseFloat(element.children[1].textContent.match(/(\d+\.\d+)/)[0]); - lastItem.push({ chance, name, ...(rotation !== undefined && { rotation }) }); - } - }); - return JSON.stringify(result); -})(); From 94f6d1b9410d29c5f1df153ffb1aeda0a39b64ab Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Thu, 27 Jun 2024 10:21:02 +0200 Subject: [PATCH 4/5] feat: gilded weapons (#410) Co-authored-by: AMelonInsideLemon --- src/controllers/api/gildWeaponController.ts | 66 +++++++++++++++++++ src/routes/api.ts | 2 + .../inventoryTypes/commonInventoryTypes.ts | 1 + 3 files changed, 69 insertions(+) create mode 100644 src/controllers/api/gildWeaponController.ts diff --git a/src/controllers/api/gildWeaponController.ts b/src/controllers/api/gildWeaponController.ts new file mode 100644 index 00000000..0b77513f --- /dev/null +++ b/src/controllers/api/gildWeaponController.ts @@ -0,0 +1,66 @@ +import { RequestHandler } from "express"; +import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getJSONfromString } from "@/src/helpers/stringHelpers"; +import { getInventory } from "@/src/services/inventoryService"; +import { WeaponTypeInternal } from "@/src/services/itemDataService"; +import { ArtifactPolarity, EquipmentFeatures } from "@/src/types/inventoryTypes/commonInventoryTypes"; + +const modularWeaponCategory: (WeaponTypeInternal | "Hoverboards")[] = [ + "LongGuns", + "Pistols", + "Melee", + "OperatorAmps", + "Hoverboards" // Not sure about hoverboards just coppied from modual crafting +]; + +interface IGildWeaponRequest { + ItemName: string; + Recipe: string; // /Lotus/Weapons/SolarisUnited/LotusGildKitgunBlueprint + PolarizeSlot?: number; + PolarizeValue?: ArtifactPolarity; + ItemId: string; + Category: WeaponTypeInternal | "Hoverboards"; +} + +// In export there no recipes for gild action, so reputation and ressources only consumed visually + +// eslint-disable-next-line @typescript-eslint/no-misused-promises +export const gildWeaponController: RequestHandler = async (req, res) => { + const accountId = await getAccountIdForRequest(req); + const data: IGildWeaponRequest = getJSONfromString(String(req.body)); + data.ItemId = String(req.query.ItemId); + if (!modularWeaponCategory.includes(req.query.Category as WeaponTypeInternal | "Hoverboards")) { + throw new Error(`Unknown modular weapon Category: ${req.query.Category}`); + } + data.Category = req.query.Category as WeaponTypeInternal | "Hoverboards"; + + const inventory = await getInventory(accountId); + if (!inventory[data.Category]) { + throw new Error(`Category ${req.query.Category} not found in inventory`); + } + const weaponIndex = inventory[data.Category].findIndex(x => String(x._id) === data.ItemId); + if (weaponIndex === -1) { + throw new Error(`Weapon with ${data.ItemId} not found in category ${req.query.Category}`); + } + + const weapon = inventory[data.Category][weaponIndex]; + weapon.Features = EquipmentFeatures.GILDED; // maybe 9 idk if DOUBLE_CAPACITY is also given + weapon.ItemName = data.ItemName; + weapon.XP = 0; + if (data.Category != "OperatorAmps" && data.PolarizeSlot && data.PolarizeValue) { + weapon.Polarity = [ + { + Slot: data.PolarizeSlot, + Value: data.PolarizeValue + } + ]; + } + inventory[data.Category][weaponIndex] = weapon; + await inventory.save(); + + res.json({ + InventoryChanges: { + [data.Category]: [weapon] + } + }); +}; diff --git a/src/routes/api.ts b/src/routes/api.ts index 8bdddd78..9794c48f 100644 --- a/src/routes/api.ts +++ b/src/routes/api.ts @@ -61,6 +61,7 @@ import { updateChallengeProgressController } from "@/src/controllers/api/updateC import { updateSessionGetController, updateSessionPostController } from "@/src/controllers/api/updateSessionController"; import { updateThemeController } from "../controllers/api/updateThemeController"; import { upgradesController } from "@/src/controllers/api/upgradesController"; +import { gildWeaponController } from "../controllers/api/gildWeaponController"; const apiRouter = express.Router(); @@ -106,6 +107,7 @@ apiRouter.post("/findSessions.php", findSessionsController); apiRouter.post("/focus.php", focusController); apiRouter.post("/genericUpdate.php", genericUpdateController); apiRouter.post("/getAlliance.php", getAllianceController); +apiRouter.post("/gildWeapon.php", gildWeaponController); apiRouter.post("/guildTech.php", guildTechController); apiRouter.post("/hostSession.php", hostSessionController); apiRouter.post("/infestedFoundry.php", infestedFoundryController); diff --git a/src/types/inventoryTypes/commonInventoryTypes.ts b/src/types/inventoryTypes/commonInventoryTypes.ts index b1debf7a..f7026c0c 100644 --- a/src/types/inventoryTypes/commonInventoryTypes.ts +++ b/src/types/inventoryTypes/commonInventoryTypes.ts @@ -86,6 +86,7 @@ export enum EquipmentFeatures { DOUBLE_CAPACITY = 1, UTILITY_SLOT = 2, GRAVIMAG_INSTALLED = 4, + GILDED = 8, ARCANE_SLOT = 32, INCARNON_GENESIS = 512 } From 7cfef6294b2826af6b4719512bc99778865a1cee Mon Sep 17 00:00:00 2001 From: Sainan Date: Thu, 27 Jun 2024 23:08:59 +0200 Subject: [PATCH 5/5] feat(webui): add client cheats and new account cheat "Unlock All Focus Schools" (#406) Co-authored-by: Sainan --- .prettierignore | 1 + src/routes/webui.ts | 9 +- static/webui/index.html | 503 +++++++++++++++++++--------------------- static/webui/script.js | 80 +++++++ 4 files changed, 330 insertions(+), 263 deletions(-) diff --git a/.prettierignore b/.prettierignore index 7b977582..ab38eac9 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,2 @@ static/webui/libs/ +*.html diff --git a/src/routes/webui.ts b/src/routes/webui.ts index 93005f34..27ac95e5 100644 --- a/src/routes/webui.ts +++ b/src/routes/webui.ts @@ -19,15 +19,18 @@ webuiRouter.use("/webui", (req, res, next) => { }); // Serve virtual routes -webuiRouter.get("/webui/settings", (_req, res) => { - res.sendFile(path.join(rootDir, "static/webui/index.html")); -}); webuiRouter.get("/webui/inventory", (_req, res) => { res.sendFile(path.join(rootDir, "static/webui/index.html")); }); webuiRouter.get("/webui/mods", (_req, res) => { res.sendFile(path.join(rootDir, "static/webui/index.html")); }); +webuiRouter.get("/webui/settings", (_req, res) => { + res.sendFile(path.join(rootDir, "static/webui/index.html")); +}); +webuiRouter.get("/webui/cheats", (_req, res) => { + res.sendFile(path.join(rootDir, "static/webui/index.html")); +}); // Serve static files webuiRouter.use("/webui", express.static(path.join(rootDir, "static/webui"))); diff --git a/static/webui/index.html b/static/webui/index.html index 037c5280..423c51a1 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -1,286 +1,269 @@ - - OpenWF WebUI - - - - - - -
-