This repository has been archived on 2026-03-19. You can view files and clone it, but cannot push or open issues or pull requests.
Files
galvanic-corrosion/res/script.js
zombieb 616f5dd619 Basic live service:
- Matchmaking
- Instance
- Presence (albeit empty atm)

Authentication fixes; differentiate between user and profile
Default auth timeout is now 3 hours
Add "operators" database key ("all users with operator permissions", or "developer" role set in token), add check in `Profile`
Fix default profile image filename reference when not set
account/me
Log hile reporting, do stuff with the report later ("Server" user for commands, operators can check reports)
Refresh login done by client automatically when token expires, requires extra work
2025-03-24 21:50:22 -04:00

21 lines
530 B
JavaScript

import * as fs from "node:fs";
const rooms = JSON.parse(fs.readFileSync('./rooms.json'));
const lines = [
"enum IntegratedRoomScene {"
];
for (const room of rooms) {
if (room.Scenes[0].Name == "Home") {
lines.push(` ${room.Name} = "${room.Scenes[0].RoomSceneLocationId}",`);
} else {
for (const scene of room.Scenes) {
lines.push(` ${room.Name}_${scene.Name} = "${scene.RoomSceneLocationId}",`);
}
}
}
lines.push("}");
fs.writeFileSync('./enum.ts', lines.join('\n'));