Add initial spirit position and timer setup
This commit is contained in:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user