cleaned moodlight event variables

This commit is contained in:
Dank074 2021-06-12 14:44:20 -05:00
parent 021a21010c
commit 035779da57
6 changed files with 21 additions and 21 deletions

View File

@ -692,7 +692,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
switch(event.type)
{
case RoomObjectDimmerStateUpdateEvent.DIMMER_STATE:
this._roomEngine.events.dispatchEvent(new RoomEngineDimmerStateEvent(roomId, event.state, event._Str_14686, event._Str_6815, event.color, event._Str_5123));
this._roomEngine.events.dispatchEvent(new RoomEngineDimmerStateEvent(roomId, event.state, event.presetId, event.effectId, event.color, event.brightness));
return;
}
}

View File

@ -5,16 +5,16 @@ export class RoomBackgroundColorEvent extends RoomEngineEvent
public static ROOM_COLOR: string = 'REE_ROOM_COLOR';
private _color: number;
private _Str_21672: number;
private _Str_6930: boolean;
private _brightness: number;
private _bgOnly: boolean;
constructor(roomId: number, color: number, _arg_3: number, _arg_4: boolean)
{
super(RoomBackgroundColorEvent.ROOM_COLOR, roomId);
this._color = color;
this._Str_21672 = _arg_3;
this._Str_6930 = _arg_4;
this._brightness = _arg_3;
this._bgOnly = _arg_4;
}
public get color(): number
@ -22,13 +22,13 @@ export class RoomBackgroundColorEvent extends RoomEngineEvent
return this._color;
}
public get _Str_5123(): number
public get brightness(): number
{
return this._Str_21672;
return this._brightness;
}
public get _Str_11464(): boolean
public get bgOnly(): boolean
{
return this._Str_6930;
return this._bgOnly;
}
}

View File

@ -26,12 +26,12 @@ export class RoomEngineDimmerStateEvent extends RoomEngineEvent
return this._state;
}
public get _Str_14686(): number
public get presetId(): number
{
return this._presetId;
}
public get _Str_6815(): number
public get effectId(): number
{
return this._effectId;
}
@ -41,7 +41,7 @@ export class RoomEngineDimmerStateEvent extends RoomEngineEvent
return this._color;
}
public get _Str_5123(): number
public get brightness(): number
{
return this._brightness;
}

View File

@ -27,12 +27,12 @@ export class RoomObjectDimmerStateUpdateEvent extends RoomObjectEvent
return this._state;
}
public get _Str_14686(): number
public get presetId(): number
{
return this._presetId;
}
public get _Str_6815(): number
public get effectId(): number
{
return this._effectId;
}
@ -42,7 +42,7 @@ export class RoomObjectDimmerStateUpdateEvent extends RoomObjectEvent
return this._color;
}
public get _Str_5123(): number
public get brightness(): number
{
return this._brightness;
}

View File

@ -28,7 +28,7 @@ export interface IRoomSession extends IDisposable
sendBanMessage(userId: number, type: string): void;
sendGiveRightsMessage(userId: number): void;
sendTakeRightsMessage(userId: number): void;
updateMoodlightData(_Str_25037: number, _Str_24446: number, color: number, _Str_5123: number, apply: boolean): void;
updateMoodlightData(_Str_25037: number, _Str_24446: number, color: number, brightness: number, apply: boolean): void;
toggleMoodlightState(): void;
pickupPet(id: number): void;
pickupBot(id: number): void;

View File

@ -224,11 +224,11 @@ export class RoomSession extends Disposable implements IRoomSession
this._connection.send(new RoomTakeRightsComposer(userId));
}
public updateMoodlightData(id: number, _Str_24446: number, color: number, _Str_5123: number, apply: boolean): void
public updateMoodlightData(id: number, _Str_24446: number, color: number, brightness: number, apply: boolean): void
{
const local6 = '000000' + color.toString(16).toUpperCase();
const local7 = '#' + local6.substring((local6.length - 6));
this.connection.send(new MoodlightSettingsSaveComposer(id, _Str_24446, local7, _Str_5123, apply));
this.connection.send(new MoodlightSettingsSaveComposer(id, _Str_24446, local7, brightness, apply));
}
public toggleMoodlightState(): void