refresh InfNodes even when rank does not increase
All checks were successful
Build / build (push) Successful in 44s
Build / build (pull_request) Successful in 1m59s

This commit is contained in:
Sainan 2025-06-07 01:10:19 +02:00
parent 2ca459b843
commit 51057ee3f9

View File

@ -150,16 +150,17 @@ export const nemesisController: RequestHandler = async (req, res) => {
res.json(response);
} else {
const passcode = getNemesisPasscode(inventory.Nemesis!);
let RankIncrease: number | undefined;
if (passcode[body.position] == body.guess) {
const manifest = getNemesisManifest(inventory.Nemesis!.manifest);
if (inventory.Nemesis!.Rank + 1 < manifest.systemIndexes.length) {
inventory.Nemesis!.Rank += 1;
inventory.Nemesis!.InfNodes = getInfNodes(manifest, inventory.Nemesis!.Rank);
await inventory.save();
res.json({ RankIncrease: 1 });
RankIncrease = 1;
}
inventory.Nemesis!.InfNodes = getInfNodes(manifest, inventory.Nemesis!.Rank);
await inventory.save();
}
res.end();
res.json({ RankIncrease });
}
} else if ((req.query.mode as string) == "rs") {
// report spawn; POST but no application data in body