Interiors with TG (updated) + ешьу Fix MID

This commit is contained in:
2025-08-26 17:47:05 +03:00
parent e5c6f9edc9
commit 32453d6282
3 changed files with 66 additions and 26 deletions

View File

@@ -85,6 +85,16 @@ let onlineUsers = {};
const organizationsRouter = require('./server/organizations')(io, onlineUsers);
app.use('/api/organizations', organizationsRouter);
// Инициализация игрового времени (ускорение 8x) и вещание клиентам
try {
if (GameTime && typeof GameTime === 'function') {
global.__gameTimeInstance = global.__gameTimeInstance || new GameTime(io, 8);
console.log('GameTime таймер запущен');
}
} catch (e) {
console.error('GameTime не запущен:', e);
}
io.use((socket, next) => {
const token = socket.handshake.auth.token;
if (!token) return next(new Error('No token'));