Compare commits

...

1 Commits

Author SHA1 Message Date
0dfd1e91ea feat(webui): max rank all intrinsics 2025-03-18 10:28:31 +01:00
10 changed files with 38 additions and 4 deletions

View File

@ -6,7 +6,7 @@ import { RequestHandler } from "express";
export const playerSkillsController: RequestHandler = async (req, res) => { export const playerSkillsController: RequestHandler = async (req, res) => {
const accountId = await getAccountIdForRequest(req); const accountId = await getAccountIdForRequest(req);
const inventory = await getInventory(accountId); const inventory = await getInventory(accountId, "PlayerSkills");
const request = getJSONfromString<IPlayerSkillsRequest>(String(req.body)); const request = getJSONfromString<IPlayerSkillsRequest>(String(req.body));
const oldRank: number = inventory.PlayerSkills[request.Skill as keyof IPlayerSkills]; const oldRank: number = inventory.PlayerSkills[request.Skill as keyof IPlayerSkills];

View File

@ -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();
};

View File

@ -8,6 +8,7 @@ import { deleteAccountController } from "@/src/controllers/custom/deleteAccountC
import { getNameController } from "@/src/controllers/custom/getNameController"; import { getNameController } from "@/src/controllers/custom/getNameController";
import { renameAccountController } from "@/src/controllers/custom/renameAccountController"; import { renameAccountController } from "@/src/controllers/custom/renameAccountController";
import { ircDroppedController } from "@/src/controllers/custom/ircDroppedController"; import { ircDroppedController } from "@/src/controllers/custom/ircDroppedController";
import { unlockAllIntrinsicsController } from "@/src/controllers/custom/unlockAllIntrinsicsController";
import { createAccountController } from "@/src/controllers/custom/createAccountController"; import { createAccountController } from "@/src/controllers/custom/createAccountController";
import { createMessageController } from "@/src/controllers/custom/createMessageController"; import { createMessageController } from "@/src/controllers/custom/createMessageController";
@ -30,6 +31,7 @@ customRouter.get("/deleteAccount", deleteAccountController);
customRouter.get("/getName", getNameController); customRouter.get("/getName", getNameController);
customRouter.get("/renameAccount", renameAccountController); customRouter.get("/renameAccount", renameAccountController);
customRouter.get("/ircDropped", ircDroppedController); customRouter.get("/ircDropped", ircDroppedController);
customRouter.get("/unlockAllIntrinsics", unlockAllIntrinsicsController);
customRouter.post("/createAccount", createAccountController); customRouter.post("/createAccount", createAccountController);
customRouter.post("/createMessage", createMessageController); customRouter.post("/createMessage", createMessageController);

View File

@ -562,8 +562,11 @@
<div class="card mb-3"> <div class="card mb-3">
<h5 class="card-header" data-loc="cheats_account"></h5> <h5 class="card-header" data-loc="cheats_account"></h5>
<div class="card-body"> <div class="card-body">
<p><button class="btn btn-primary" onclick="doUnlockAllFocusSchools();" data-loc="cheats_unlockAllFocusSchools"></button></p> <div class="mb-2 d-flex flex-wrap gap-2">
<button class="btn btn-primary" onclick="doUnlockAllFocusSchools();" data-loc="cheats_unlockAllFocusSchools"></button>
<button class="btn btn-primary" onclick="doHelminthUnlockAll();" data-loc="cheats_helminthUnlockAll"></button> <button class="btn btn-primary" onclick="doHelminthUnlockAll();" data-loc="cheats_helminthUnlockAll"></button>
<button class="btn btn-primary" onclick="doIntrinsicsUnlockAll();" data-loc="cheats_intrinsicsUnlockAll"></button>
</div>
<form class="mt-2" onsubmit="doChangeSupportedSyndicate(); return false;"> <form class="mt-2" onsubmit="doChangeSupportedSyndicate(); return false;">
<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">
@ -578,7 +581,6 @@
<button class="btn btn-primary" onclick="doQuestUpdate('completeAllUnlocked');" data-loc="cheats_quests_completeAllUnlocked"></button> <button class="btn btn-primary" onclick="doQuestUpdate('completeAllUnlocked');" data-loc="cheats_quests_completeAllUnlocked"></button>
<button class="btn btn-primary" onclick="doQuestUpdate('ResetAll');" data-loc="cheats_quests_resetAll"></button> <button class="btn btn-primary" onclick="doQuestUpdate('ResetAll');" data-loc="cheats_quests_resetAll"></button>
<button class="btn btn-primary" onclick="doQuestUpdate('giveAll');" data-loc="cheats_quests_giveAll"></button> <button class="btn btn-primary" onclick="doQuestUpdate('giveAll');" data-loc="cheats_quests_giveAll"></button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1053,6 +1053,12 @@ function doHelminthUnlockAll() {
}); });
} }
function doIntrinsicsUnlockAll() {
revalidateAuthz(() => {
$.get("/custom/unlockAllIntrinsics?" + window.authz);
});
}
function doAddAllMods() { function doAddAllMods() {
let modsAll = new Set(); let modsAll = new Set();
for (const child of document.getElementById("datalist-mods").children) { for (const child of document.getElementById("datalist-mods").children) {

View File

@ -123,6 +123,7 @@ dict = {
cheats_account: `Account`, cheats_account: `Account`,
cheats_unlockAllFocusSchools: `Alle Fokus-Schulen freischalten`, cheats_unlockAllFocusSchools: `Alle Fokus-Schulen freischalten`,
cheats_helminthUnlockAll: `Helminth vollständig aufleveln`, cheats_helminthUnlockAll: `Helminth vollständig aufleveln`,
cheats_intrinsicsUnlockAll: `[UNTRANSLATED] Max Rank All Intrinsics`,
cheats_changeSupportedSyndicate: `Unterstütztes Syndikat`, cheats_changeSupportedSyndicate: `Unterstütztes Syndikat`,
cheats_changeButton: `Ändern`, cheats_changeButton: `Ändern`,
cheats_none: `Keines`, cheats_none: `Keines`,

View File

@ -122,6 +122,7 @@ dict = {
cheats_account: `Account`, cheats_account: `Account`,
cheats_unlockAllFocusSchools: `Unlock All Focus Schools`, cheats_unlockAllFocusSchools: `Unlock All Focus Schools`,
cheats_helminthUnlockAll: `Fully Level Up Helminth`, cheats_helminthUnlockAll: `Fully Level Up Helminth`,
cheats_intrinsicsUnlockAll: `Max Rank All Intrinsics`,
cheats_changeSupportedSyndicate: `Supported syndicate`, cheats_changeSupportedSyndicate: `Supported syndicate`,
cheats_changeButton: `Change`, cheats_changeButton: `Change`,
cheats_none: `None`, cheats_none: `None`,

View File

@ -123,6 +123,7 @@ dict = {
cheats_account: `Compte`, cheats_account: `Compte`,
cheats_unlockAllFocusSchools: `Débloquer toutes les écoles de focus`, cheats_unlockAllFocusSchools: `Débloquer toutes les écoles de focus`,
cheats_helminthUnlockAll: `Helminth niveau max`, cheats_helminthUnlockAll: `Helminth niveau max`,
cheats_intrinsicsUnlockAll: `[UNTRANSLATED] Max Rank All Intrinsics`,
cheats_changeSupportedSyndicate: `Allégeance`, cheats_changeSupportedSyndicate: `Allégeance`,
cheats_changeButton: `Changer`, cheats_changeButton: `Changer`,
cheats_none: `Aucun`, cheats_none: `Aucun`,

View File

@ -123,6 +123,7 @@ dict = {
cheats_account: `Аккаунт`, cheats_account: `Аккаунт`,
cheats_unlockAllFocusSchools: `Разблокировать все школы фокуса`, cheats_unlockAllFocusSchools: `Разблокировать все школы фокуса`,
cheats_helminthUnlockAll: `Полностью улучшить Гельминта`, cheats_helminthUnlockAll: `Полностью улучшить Гельминта`,
cheats_intrinsicsUnlockAll: `[UNTRANSLATED] Max Rank All Intrinsics`,
cheats_changeSupportedSyndicate: `Поддерживаемый синдикат`, cheats_changeSupportedSyndicate: `Поддерживаемый синдикат`,
cheats_changeButton: `Изменить`, cheats_changeButton: `Изменить`,
cheats_none: `Отсутствует`, cheats_none: `Отсутствует`,

View File

@ -123,6 +123,7 @@ dict = {
cheats_account: `账户`, cheats_account: `账户`,
cheats_unlockAllFocusSchools: `解锁所有专精学派`, cheats_unlockAllFocusSchools: `解锁所有专精学派`,
cheats_helminthUnlockAll: `完全升级Helminth`, cheats_helminthUnlockAll: `完全升级Helminth`,
cheats_intrinsicsUnlockAll: `[UNTRANSLATED] Max Rank All Intrinsics`,
cheats_changeSupportedSyndicate: `支持的集团`, cheats_changeSupportedSyndicate: `支持的集团`,
cheats_changeButton: `更改`, cheats_changeButton: `更改`,
cheats_none: ``, cheats_none: ``,