From c29b99b52aa4fb01cbc68e3a3a3c5b049094a01a Mon Sep 17 00:00:00 2001 From: Kyle Flynn Date: Wed, 25 Sep 2024 10:05:35 +0300 Subject: [PATCH] Update FCS.ts --- back-end/realtime/src/rooms/FCS.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/back-end/realtime/src/rooms/FCS.ts b/back-end/realtime/src/rooms/FCS.ts index 74d31b92..bfb8dc34 100644 --- a/back-end/realtime/src/rooms/FCS.ts +++ b/back-end/realtime/src/rooms/FCS.ts @@ -8,8 +8,6 @@ import { } from '@toa-lib/models'; import Room from './Room.js'; import Match from './Match.js'; -import { defaultMatchDetails } from '@toa-lib/models/build/seasons/FeedingTheFuture.js'; -import { PacketManager } from '@toa-lib/models/build/fcs/FeedingTheFutureFCS.js'; import { Worker } from 'worker_threads'; import { fileURLToPath } from 'url'; import { dirname, join } from 'path'; @@ -27,13 +25,13 @@ export default class FCS extends Room { // private wledControllers: Record = {}; private wledControllers: Record = {}; private previousMatchDetails: FeedingTheFuture.MatchDetails = - defaultMatchDetails; - private packetManager: PacketManager; + FeedingTheFuture.defaultMatchDetails; + private packetManager: FeedingTheFutureFCS.PacketManager; public constructor(server: Server, matchRoom: Match) { super(server, 'fcs'); - this.packetManager = new PacketManager( + this.packetManager = new FeedingTheFutureFCS.PacketManager( FeedingTheFutureFCS.defaultFieldOptions, this.broadcastFcsUpdate, matchRoom.localEmitter @@ -77,7 +75,7 @@ export default class FCS extends Room { match.details, this.broadcastFcsUpdate ); - this.previousMatchDetails = { ...match.details }; + this.previousMatchDetails = JSON.parse(JSON.stringify(match.details)); } ); }