diff --git a/src/controllers/api/playerSkillsController.ts b/src/controllers/api/playerSkillsController.ts index de7ab4c8..5c8b301a 100644 --- a/src/controllers/api/playerSkillsController.ts +++ b/src/controllers/api/playerSkillsController.ts @@ -6,7 +6,7 @@ import { RequestHandler } from "express"; export const playerSkillsController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); - const inventory = await getInventory(accountId); + const inventory = await getInventory(accountId, "PlayerSkills"); const request = getJSONfromString(String(req.body)); const oldRank: number = inventory.PlayerSkills[request.Skill as keyof IPlayerSkills]; diff --git a/src/controllers/custom/unlockAllIntrinsicsController.ts b/src/controllers/custom/unlockAllIntrinsicsController.ts new file mode 100644 index 00000000..cd48bdcc --- /dev/null +++ b/src/controllers/custom/unlockAllIntrinsicsController.ts @@ -0,0 +1,19 @@ +import { getInventory } from "@/src/services/inventoryService"; +import { getAccountIdForRequest } from "@/src/services/loginService"; +import { RequestHandler } from "express"; + +export const unlockAllIntrinsicsController: RequestHandler = async (req, res) => { + const accountId = await getAccountIdForRequest(req); + const inventory = await getInventory(accountId, "PlayerSkills"); + inventory.PlayerSkills.LPS_PILOTING = 10; + inventory.PlayerSkills.LPS_GUNNERY = 10; + inventory.PlayerSkills.LPS_TACTICAL = 10; + inventory.PlayerSkills.LPS_ENGINEERING = 10; + inventory.PlayerSkills.LPS_COMMAND = 10; + inventory.PlayerSkills.LPS_DRIFT_COMBAT = 10; + inventory.PlayerSkills.LPS_DRIFT_RIDING = 10; + inventory.PlayerSkills.LPS_DRIFT_OPPORTUNITY = 10; + inventory.PlayerSkills.LPS_DRIFT_ENDURANCE = 10; + await inventory.save(); + res.end(); +}; diff --git a/src/routes/custom.ts b/src/routes/custom.ts index 7f53ad3e..fa0f2225 100644 --- a/src/routes/custom.ts +++ b/src/routes/custom.ts @@ -8,6 +8,7 @@ import { deleteAccountController } from "@/src/controllers/custom/deleteAccountC import { getNameController } from "@/src/controllers/custom/getNameController"; import { renameAccountController } from "@/src/controllers/custom/renameAccountController"; import { ircDroppedController } from "@/src/controllers/custom/ircDroppedController"; +import { unlockAllIntrinsicsController } from "@/src/controllers/custom/unlockAllIntrinsicsController"; import { createAccountController } from "@/src/controllers/custom/createAccountController"; import { createMessageController } from "@/src/controllers/custom/createMessageController"; @@ -30,6 +31,7 @@ customRouter.get("/deleteAccount", deleteAccountController); customRouter.get("/getName", getNameController); customRouter.get("/renameAccount", renameAccountController); customRouter.get("/ircDropped", ircDroppedController); +customRouter.get("/unlockAllIntrinsics", unlockAllIntrinsicsController); customRouter.post("/createAccount", createAccountController); customRouter.post("/createMessage", createMessageController); diff --git a/static/webui/index.html b/static/webui/index.html index bc5e9d49..b698eb04 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -562,8 +562,11 @@
-

- +
+ + + +
@@ -578,7 +581,6 @@ -
diff --git a/static/webui/script.js b/static/webui/script.js index b46b8fee..2df57c47 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -1053,6 +1053,12 @@ function doHelminthUnlockAll() { }); } +function doIntrinsicsUnlockAll() { + revalidateAuthz(() => { + $.get("/custom/unlockAllIntrinsics?" + window.authz); + }); +} + function doAddAllMods() { let modsAll = new Set(); for (const child of document.getElementById("datalist-mods").children) { diff --git a/static/webui/translations/de.js b/static/webui/translations/de.js index aff0d599..8976fb63 100644 --- a/static/webui/translations/de.js +++ b/static/webui/translations/de.js @@ -123,6 +123,7 @@ dict = { cheats_account: `Account`, cheats_unlockAllFocusSchools: `Alle Fokus-Schulen freischalten`, cheats_helminthUnlockAll: `Helminth vollständig aufleveln`, + cheats_intrinsicsUnlockAll: `[UNTRANSLATED] Max Rank All Intrinsics`, cheats_changeSupportedSyndicate: `Unterstütztes Syndikat`, cheats_changeButton: `Ändern`, cheats_none: `Keines`, diff --git a/static/webui/translations/en.js b/static/webui/translations/en.js index b60ba241..9896e46a 100644 --- a/static/webui/translations/en.js +++ b/static/webui/translations/en.js @@ -122,6 +122,7 @@ dict = { cheats_account: `Account`, cheats_unlockAllFocusSchools: `Unlock All Focus Schools`, cheats_helminthUnlockAll: `Fully Level Up Helminth`, + cheats_intrinsicsUnlockAll: `Max Rank All Intrinsics`, cheats_changeSupportedSyndicate: `Supported syndicate`, cheats_changeButton: `Change`, cheats_none: `None`, diff --git a/static/webui/translations/fr.js b/static/webui/translations/fr.js index 96b52eaa..52b4537a 100644 --- a/static/webui/translations/fr.js +++ b/static/webui/translations/fr.js @@ -123,6 +123,7 @@ dict = { cheats_account: `Compte`, cheats_unlockAllFocusSchools: `Débloquer toutes les écoles de focus`, cheats_helminthUnlockAll: `Helminth niveau max`, + cheats_intrinsicsUnlockAll: `[UNTRANSLATED] Max Rank All Intrinsics`, cheats_changeSupportedSyndicate: `Allégeance`, cheats_changeButton: `Changer`, cheats_none: `Aucun`, diff --git a/static/webui/translations/ru.js b/static/webui/translations/ru.js index 502b84af..0a50f913 100644 --- a/static/webui/translations/ru.js +++ b/static/webui/translations/ru.js @@ -123,6 +123,7 @@ dict = { cheats_account: `Аккаунт`, cheats_unlockAllFocusSchools: `Разблокировать все школы фокуса`, cheats_helminthUnlockAll: `Полностью улучшить Гельминта`, + cheats_intrinsicsUnlockAll: `[UNTRANSLATED] Max Rank All Intrinsics`, cheats_changeSupportedSyndicate: `Поддерживаемый синдикат`, cheats_changeButton: `Изменить`, cheats_none: `Отсутствует`, diff --git a/static/webui/translations/zh.js b/static/webui/translations/zh.js index 57207f0a..2f11b930 100644 --- a/static/webui/translations/zh.js +++ b/static/webui/translations/zh.js @@ -123,6 +123,7 @@ dict = { cheats_account: `账户`, cheats_unlockAllFocusSchools: `解锁所有专精学派`, cheats_helminthUnlockAll: `完全升级Helminth`, + cheats_intrinsicsUnlockAll: `[UNTRANSLATED] Max Rank All Intrinsics`, cheats_changeSupportedSyndicate: `支持的集团`, cheats_changeButton: `更改`, cheats_none: `无`,