You've already forked Arcturus-Morningstar-Extended
mirror of
https://github.com/duckietm/Arcturus-Morningstar-Extended.git
synced 2026-06-19 15:06:19 +00:00
feat: soundboard (room-scoped custom audio pads)
Server side of the soundboard feature: - rooms.soundboard_enabled flag + soundboard_sounds table (self-bootstraps at boot via SoundboardManager; migration 021 seeds up-front) - SoundboardManager loads enabled sounds and persists the per-room flag - SoundboardPlayEvent broadcasts the pressed pad to everyone in the room - SoundboardSetEnabledEvent (owner/staff) toggles the room flag and pushes refreshed settings - settings (flag + sound list) sent on room enter, alongside YouTube
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
-- Soundboard
|
||||
-- The room flag column + sounds table are also created at boot by
|
||||
-- SoundboardManager (ALTER ... ADD COLUMN IF NOT EXISTS / CREATE TABLE IF NOT
|
||||
-- EXISTS), so applying this file is only needed to seed sounds up-front.
|
||||
|
||||
ALTER TABLE `rooms` ADD COLUMN IF NOT EXISTS `soundboard_enabled` TINYINT(1) NOT NULL DEFAULT 0;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `soundboard_sounds` (
|
||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` VARCHAR(64) NOT NULL DEFAULT '', -- pad label shown in the client
|
||||
`url` VARCHAR(255) NOT NULL DEFAULT '', -- audio url (uploaded via CMS, like custom badges)
|
||||
`enabled` TINYINT(1) NOT NULL DEFAULT 1,
|
||||
`sort_order` INT(11) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
Reference in New Issue
Block a user