feat: soundboard packets

Add the soundboard message protocol mirroring the Arcturus side:
- incoming SoundboardSettings (enabled flag + sound list) and
  SoundboardPlay (soundId, url, username) events + parsers
- outgoing SoundboardPlay (soundId) and SoundboardSetEnabled composers
- header ids 9405/9406 (incoming), 9306/9307 (outgoing)
- NitroMessages registration + barrel exports
This commit is contained in:
medievalshell
2026-05-28 09:02:57 +02:00
parent 87eec0563d
commit 238592cd72
15 changed files with 156 additions and 0 deletions
@@ -556,4 +556,6 @@ export class OutgoingHeader
public static WHEEL_BUY_SPIN = 9303;
public static WHEEL_ADMIN_GET_PRIZES = 9304;
public static WHEEL_ADMIN_SAVE_PRIZES = 9305;
public static SOUNDBOARD_PLAY = 9306;
public static SOUNDBOARD_SET_ENABLED = 9307;
}
@@ -23,6 +23,7 @@ export * from './handshake';
export * from './help';
export * from './housekeeping';
export * from './rarevalues';
export * from './soundboard';
export * from './wheel';
export * from './inventory';
export * from './inventory/avatareffect';
@@ -0,0 +1,14 @@
import { IMessageComposer } from '@nitrots/api';
export class SoundboardPlayComposer implements IMessageComposer<[ number ]>
{
private _data: [ number ];
constructor(soundId: number)
{
this._data = [ soundId ];
}
public getMessageArray(): [ number ] { return this._data; }
public dispose(): void { return; }
}
@@ -0,0 +1,14 @@
import { IMessageComposer } from '@nitrots/api';
export class SoundboardSetEnabledComposer implements IMessageComposer<[ number ]>
{
private _data: [ number ];
constructor(enabled: boolean)
{
this._data = [ enabled ? 1 : 0 ];
}
public getMessageArray(): [ number ] { return this._data; }
public dispose(): void { return; }
}
@@ -0,0 +1,2 @@
export * from './SoundboardPlayComposer';
export * from './SoundboardSetEnabledComposer';