From ccad38799f5bc6116c7098931b161081df142020 Mon Sep 17 00:00:00 2001 From: Fedorov Vladimir Date: Sun, 22 Mar 2026 00:10:55 +0700 Subject: [PATCH] add models.ts --- src/components/GameWindow.vue | 4 +- src/components/models.ts | 56 ++++++++++++++++++++++++++++ src/components/models/action.ts | 29 -------------- src/components/models/application.ts | 8 ---- src/components/models/door.ts | 12 ------ src/components/models/team.ts | 9 ----- 6 files changed, 57 insertions(+), 61 deletions(-) create mode 100644 src/components/models.ts delete mode 100644 src/components/models/action.ts delete mode 100644 src/components/models/application.ts delete mode 100644 src/components/models/door.ts delete mode 100644 src/components/models/team.ts diff --git a/src/components/GameWindow.vue b/src/components/GameWindow.vue index a7e658e..54c8ac2 100644 --- a/src/components/GameWindow.vue +++ b/src/components/GameWindow.vue @@ -6,9 +6,7 @@ import VueQrcode from '@chenfengyuan/vue-qrcode'; import BeltBlock from './BeltBlock.vue'; import MetalPlate from './MetalPlate.vue'; import GameHeader from './GameHeader.vue'; -import type { Action } from './models/action'; -import type { Door } from './models/door'; -import type { Team } from './models/team'; +import type { Action, Door, Team } from './models'; const router = useRouter(); const route = useRoute(); diff --git a/src/components/models.ts b/src/components/models.ts new file mode 100644 index 0000000..e4fa3fd --- /dev/null +++ b/src/components/models.ts @@ -0,0 +1,56 @@ +// Команда +export type Team = { + // Название + name: string + // Совершенные действия + actions: Action[] +} + +// Действие +// Посещение точки игры +export type Action = { + // Идентификатор действия + id: string + // Код точки + place: string + // Название точки + name: string + // Текст точки + text: string + // Ссылка на картинку + image: string + // Список приложений + applications: Application[] + // Видимость/доступность точки + hidden: boolean + // Двери точки + doors: Door[] + + // Поля для интерфейса + // Сворачивание + isOpen: boolean + // Кнопки + buttons: Door[] +} + +// Приложение +// Улики найденые игроками (Карта, фотография...) +export type Application = { + // Наименование + name: string + // Номер + number: number +} + +// Дверь +// Выбор пути в диалоге с игроком +// Или действие игрока которое можно не использовать +// Или открытие действия без участия игрока +export type Door = { + // Код точки куда открывается дверь (Целевая точка должна существовать) + code: string + // Текст кнопки (Должен совпадать с названием целевой точки) + name: string + // Видимость кнопки + show: boolean +} diff --git a/src/components/models/action.ts b/src/components/models/action.ts deleted file mode 100644 index a70301d..0000000 --- a/src/components/models/action.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { Application } from './application' -import type { Door } from './door' - -// Действие -// Посещение точки игры -export type Action = { - // Идентификатор действия - id: string - // Код точки - place: string - // Название точки - name: string - // Текст точки - text: string - // Ссылка на картинку - image: string - // Список приложений - applications: Application[] - // Видимость/доступность точки - hidden: boolean - // Двери точки - doors: Door[] - - // Поля для интерфейса - // Сворачивание - isOpen: boolean - // Кнопки - buttons: Door[] -} diff --git a/src/components/models/application.ts b/src/components/models/application.ts deleted file mode 100644 index 257315b..0000000 --- a/src/components/models/application.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Приложение -// Улики найденые игроками (Карта, фотография...) -export type Application = { - // Наименование - name: string - // Номер - number: number -} diff --git a/src/components/models/door.ts b/src/components/models/door.ts deleted file mode 100644 index 7888785..0000000 --- a/src/components/models/door.ts +++ /dev/null @@ -1,12 +0,0 @@ -// Дверь -// Выбор пути в диалоге с игроком -// Или действие игрока которое можно не использовать -// Или открытие действия без участия игрока -export type Door = { - // Код точки куда открывается дверь (Целевая точка должна существовать) - code: string - // Текст кнопки (Должен совпадать с названием целевой точки) - name: string - // Видимость кнопки - show: boolean -} diff --git a/src/components/models/team.ts b/src/components/models/team.ts deleted file mode 100644 index 88c0d46..0000000 --- a/src/components/models/team.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Action } from './action' - -// Команда -export type Team = { - // Название - name: string - // Совершенные действия - actions: Action[] -}