From 83e903af797062018a1f3f8d634092cd7585cffe Mon Sep 17 00:00:00 2001 From: Victor Klomp Date: Tue, 7 Jan 2025 21:55:07 +0100 Subject: [PATCH] feat(poster): Add other Hubble poster handlers --- src/modules/handlers/screen/index.ts | 2 ++ .../hubble/hubble-closed-poster-screen-handler.ts | 10 ++++++++++ .../hubble/hubble-lastcall-poster-screen-handler.ts | 10 ++++++++++ src/modules/root/handler-factory.ts | 4 ++++ 4 files changed, 26 insertions(+) create mode 100644 src/modules/handlers/screen/poster/hubble/hubble-closed-poster-screen-handler.ts create mode 100644 src/modules/handlers/screen/poster/hubble/hubble-lastcall-poster-screen-handler.ts diff --git a/src/modules/handlers/screen/index.ts b/src/modules/handlers/screen/index.ts index 0e08312..82855c2 100644 --- a/src/modules/handlers/screen/index.ts +++ b/src/modules/handlers/screen/index.ts @@ -2,6 +2,8 @@ export { default as CurrentlyPlayingTrackHandler } from './curently-playing-trac export { default as CenturionScreenHandler } from './centurion-screen-handler'; export { default as GewisPosterScreenHandler } from './poster/gewis/gewis-poster-screen-handler'; export { default as HubblePosterScreenHandler } from './poster/hubble/hubble-poster-screen-handler'; +export { default as HubbleClosedPosterScreenHandler } from './poster/hubble/hubble-closed-poster-screen-handler'; +export { default as HubbleLastcallPosterScreenHandler } from './poster/hubble/hubble-lastcall-poster-screen-handler'; export { default as RoomResponsibleLegacyHandler } from './room-responsible-legacy-handler'; export { default as StageEffectsHandler } from './stage-effects-handler'; export { default as TimeTrailRaceScreenHandler } from './time-trail-race-screen-handler'; diff --git a/src/modules/handlers/screen/poster/hubble/hubble-closed-poster-screen-handler.ts b/src/modules/handlers/screen/poster/hubble/hubble-closed-poster-screen-handler.ts new file mode 100644 index 0000000..10ae62c --- /dev/null +++ b/src/modules/handlers/screen/poster/hubble/hubble-closed-poster-screen-handler.ts @@ -0,0 +1,10 @@ +import BasePosterScreenHandler from '../base-poster-screen-handler'; +import { Namespace } from 'socket.io'; +import { FeatureEnabled } from '../../../../server-settings'; + +@FeatureEnabled('HubblePosterScreenHandler') +export default class HubbleClosedPosterScreenHandler extends BasePosterScreenHandler { + constructor(socket: Namespace) { + super(socket); + } +} diff --git a/src/modules/handlers/screen/poster/hubble/hubble-lastcall-poster-screen-handler.ts b/src/modules/handlers/screen/poster/hubble/hubble-lastcall-poster-screen-handler.ts new file mode 100644 index 0000000..e0975e9 --- /dev/null +++ b/src/modules/handlers/screen/poster/hubble/hubble-lastcall-poster-screen-handler.ts @@ -0,0 +1,10 @@ +import BasePosterScreenHandler from '../base-poster-screen-handler'; +import { Namespace } from 'socket.io'; +import { FeatureEnabled } from '../../../../server-settings'; + +@FeatureEnabled('HubblePosterScreenHandler') +export default class HubbleLastcallPosterScreenHandler extends BasePosterScreenHandler { + constructor(socket: Namespace) { + super(socket); + } +} diff --git a/src/modules/root/handler-factory.ts b/src/modules/root/handler-factory.ts index 18dd0cb..abc7a4c 100644 --- a/src/modules/root/handler-factory.ts +++ b/src/modules/root/handler-factory.ts @@ -17,6 +17,8 @@ import { CenturionScreenHandler, CurrentlyPlayingTrackHandler, GewisPosterScreenHandler, + HubbleClosedPosterScreenHandler, + HubbleLastcallPosterScreenHandler, HubblePosterScreenHandler, RoomResponsibleLegacyHandler, StageEffectsHandler, @@ -83,6 +85,8 @@ export default class HandlerFactory { this.createHandler(CenturionScreenHandler, () => new CenturionScreenHandler(socket)), this.createHandler(GewisPosterScreenHandler, () => new GewisPosterScreenHandler(socket)), this.createHandler(HubblePosterScreenHandler, () => new HubblePosterScreenHandler(socket)), + this.createHandler(HubbleClosedPosterScreenHandler, () => new HubbleClosedPosterScreenHandler(socket)), + this.createHandler(HubbleLastcallPosterScreenHandler, () => new HubbleLastcallPosterScreenHandler(socket)), this.createHandler(StageEffectsHandler, () => new StageEffectsHandler(socket)), this.createHandler(TimeTrailRaceScreenHandler, () => new TimeTrailRaceScreenHandler(socket)), this.createHandler(