This commit is contained in:
2026-10-17 22:35:50 +07:00
parent 688d900cdc
commit beb8ca8f16
8 changed files with 107 additions and 7 deletions
+5 -1
View File
@@ -1,5 +1,6 @@
import { randomUUID } from 'node:crypto'
import { performance } from 'node:perf_hooks'
import { isDeepStrictEqual } from 'node:util'
import type {
Catalog,
Channel,
@@ -348,8 +349,11 @@ export class Controller {
const key = this.state.catalog.key
if (value !== null && !key) throw new Error('Сначала выберите пакет игры')
const snapshot = value === null ? null : parseResults(value, key!)
const hasChanged =
!isDeepStrictEqual(this.state.results?.questions, snapshot?.questions) ||
!isDeepStrictEqual(this.state.results?.teams, snapshot?.teams)
this.state.results = snapshot
if (this.state.scene.mode === 6) this.invalidateScene()
if (hasChanged && this.state.scene.mode === 6) this.invalidateScene()
this.broadcast()
}
reportScene(value: unknown) {