Add initial spirit position and timer setup

This commit is contained in:
2025-05-28 06:26:56 +02:00
parent 340563912b
commit 4080e1ff5d

View File

@@ -9,6 +9,10 @@ const app = express();
const server = http.createServer(app);
const wss = new ws.Server({ server });
let spiritPos = 0;
const SPIRIT_INTERVAL_MS = 20000; // 20 Sekunden
let lastSpiritSpawn = Date.now();
app.use(express.static(path.join(__dirname, 'public')));
const SPIRITS_PATH = path.join(__dirname, '.', 'spirits', 'spirit_list.json');
@@ -29,10 +33,6 @@ try {
process.exit(1);
}
let spiritPos = 0;
const SPIRIT_INTERVAL_MS = 20000; // 20 Sekunden
let lastSpiritSpawn = Date.now();
// --- Helper ---
function nextSpirit() {
spiritPos++;