2025-08-25 13:37:14 -07:00
|
|
|
import { getInventory } from "../../services/inventoryService.ts";
|
|
|
|
|
import { getAccountIdForRequest } from "../../services/loginService.ts";
|
2025-08-24 21:41:20 -07:00
|
|
|
import type { RequestHandler } from "express";
|
2025-09-08 05:52:25 +02:00
|
|
|
import { sendWsBroadcastToGame } from "../../services/wsService.ts";
|
2025-03-20 05:36:29 -07:00
|
|
|
|
|
|
|
|
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();
|
2025-09-08 05:52:25 +02:00
|
|
|
sendWsBroadcastToGame(accountId, { sync_inventory: true });
|
2025-03-20 05:36:29 -07:00
|
|
|
};
|