feat: add wired monitor and variable protocol support

This commit is contained in:
Lorenzune
2026-04-02 04:44:04 +02:00
parent 52ed78e528
commit 190f02ebbe
19 changed files with 1149 additions and 396 deletions
@@ -0,0 +1,67 @@
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
export class WiredRoomSettingsDataParser implements IMessageParser
{
private _roomId: number;
private _inspectMask: number;
private _modifyMask: number;
private _canInspect: boolean;
private _canModify: boolean;
private _canManageSettings: boolean;
public flush(): boolean
{
this._roomId = 0;
this._inspectMask = 0;
this._modifyMask = 0;
this._canInspect = false;
this._canModify = false;
this._canManageSettings = false;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._roomId = wrapper.readInt();
this._inspectMask = wrapper.readInt();
this._modifyMask = wrapper.readInt();
this._canInspect = wrapper.readBoolean();
this._canModify = wrapper.readBoolean();
this._canManageSettings = wrapper.readBoolean();
return true;
}
public get roomId(): number
{
return this._roomId;
}
public get inspectMask(): number
{
return this._inspectMask;
}
public get modifyMask(): number
{
return this._modifyMask;
}
public get canInspect(): boolean
{
return this._canInspect;
}
public get canModify(): boolean
{
return this._canModify;
}
public get canManageSettings(): boolean
{
return this._canManageSettings;
}
}