You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 07:26:18 +00:00
Merge pull request #37 from Lorenzune/feature/pr-20260327
Expose room, user and furni metadata for wired tools
This commit is contained in:
+28
@@ -11,6 +11,9 @@ export class GetGuestRoomResultMessageParser implements IMessageParser
|
||||
private _isGroupMember: boolean;
|
||||
private _moderation: RoomModerationSettings;
|
||||
private _chat: RoomChatSettings;
|
||||
private _hotelTimeZoneId: string;
|
||||
private _hotelCurrentTimeMs: number;
|
||||
private _roomItemLimit: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
@@ -21,6 +24,9 @@ export class GetGuestRoomResultMessageParser implements IMessageParser
|
||||
this._isGroupMember = false;
|
||||
this._moderation = null;
|
||||
this._chat = null;
|
||||
this._hotelTimeZoneId = null;
|
||||
this._hotelCurrentTimeMs = 0;
|
||||
this._roomItemLimit = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -39,6 +45,13 @@ export class GetGuestRoomResultMessageParser implements IMessageParser
|
||||
this.data.canMute = wrapper.readBoolean();
|
||||
this._chat = new RoomChatSettings(wrapper);
|
||||
|
||||
if(wrapper.bytesAvailable)
|
||||
{
|
||||
this._hotelTimeZoneId = wrapper.readString();
|
||||
this._hotelCurrentTimeMs = Number(wrapper.readString()) || 0;
|
||||
if(wrapper.bytesAvailable) this._roomItemLimit = wrapper.readInt();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -76,4 +89,19 @@ export class GetGuestRoomResultMessageParser implements IMessageParser
|
||||
{
|
||||
return this._chat;
|
||||
}
|
||||
|
||||
public get hotelTimeZoneId(): string
|
||||
{
|
||||
return this._hotelTimeZoneId;
|
||||
}
|
||||
|
||||
public get hotelCurrentTimeMs(): number
|
||||
{
|
||||
return this._hotelCurrentTimeMs;
|
||||
}
|
||||
|
||||
public get roomItemLimit(): number
|
||||
{
|
||||
return this._roomItemLimit;
|
||||
}
|
||||
}
|
||||
|
||||
+56
@@ -25,6 +25,13 @@ export class FurnitureFloorDataParser
|
||||
private _usagePolicy: number;
|
||||
private _userId: number;
|
||||
private _username: string;
|
||||
private _allowStack: boolean;
|
||||
private _allowSit: boolean;
|
||||
private _allowLay: boolean;
|
||||
private _allowWalk: boolean;
|
||||
private _dimensionsX: number;
|
||||
private _dimensionsY: number;
|
||||
private _teleportTargetId: number;
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
@@ -51,6 +58,13 @@ export class FurnitureFloorDataParser
|
||||
this._usagePolicy = 0;
|
||||
this._userId = 0;
|
||||
this._username = null;
|
||||
this._allowStack = false;
|
||||
this._allowSit = false;
|
||||
this._allowLay = false;
|
||||
this._allowWalk = false;
|
||||
this._dimensionsX = 0;
|
||||
this._dimensionsY = 0;
|
||||
this._teleportTargetId = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -72,6 +86,13 @@ export class FurnitureFloorDataParser
|
||||
this._expires = wrapper.readInt();
|
||||
this._usagePolicy = wrapper.readInt();
|
||||
this._userId = wrapper.readInt();
|
||||
this._allowStack = (wrapper.readInt() === 1);
|
||||
this._allowSit = (wrapper.readInt() === 1);
|
||||
this._allowLay = (wrapper.readInt() === 1);
|
||||
this._allowWalk = (wrapper.readInt() === 1);
|
||||
this._dimensionsX = wrapper.readInt();
|
||||
this._dimensionsY = wrapper.readInt();
|
||||
this._teleportTargetId = wrapper.readInt();
|
||||
this._username = null;
|
||||
|
||||
if(this._spriteId < 0) this._spriteName = wrapper.readString();
|
||||
@@ -149,6 +170,41 @@ export class FurnitureFloorDataParser
|
||||
return this._username;
|
||||
}
|
||||
|
||||
public get allowStack(): boolean
|
||||
{
|
||||
return this._allowStack;
|
||||
}
|
||||
|
||||
public get allowSit(): boolean
|
||||
{
|
||||
return this._allowSit;
|
||||
}
|
||||
|
||||
public get allowLay(): boolean
|
||||
{
|
||||
return this._allowLay;
|
||||
}
|
||||
|
||||
public get allowWalk(): boolean
|
||||
{
|
||||
return this._allowWalk;
|
||||
}
|
||||
|
||||
public get dimensionsX(): number
|
||||
{
|
||||
return this._dimensionsX;
|
||||
}
|
||||
|
||||
public get dimensionsY(): number
|
||||
{
|
||||
return this._dimensionsY;
|
||||
}
|
||||
|
||||
public get teleportTargetId(): number
|
||||
{
|
||||
return this._teleportTargetId;
|
||||
}
|
||||
|
||||
public set username(username: string)
|
||||
{
|
||||
this._username = username;
|
||||
|
||||
+56
@@ -11,6 +11,13 @@ export class FurnitureWallDataParser
|
||||
private _usagePolicy: number;
|
||||
private _userId: number;
|
||||
private _username: string;
|
||||
private _allowStack: boolean;
|
||||
private _allowSit: boolean;
|
||||
private _allowLay: boolean;
|
||||
private _allowWalk: boolean;
|
||||
private _dimensionsX: number;
|
||||
private _dimensionsY: number;
|
||||
private _teleportTargetId: number;
|
||||
|
||||
private _width: number;
|
||||
private _height: number;
|
||||
@@ -40,6 +47,13 @@ export class FurnitureWallDataParser
|
||||
this._usagePolicy = -1;
|
||||
this._userId = 0;
|
||||
this._username = null;
|
||||
this._allowStack = false;
|
||||
this._allowSit = false;
|
||||
this._allowLay = false;
|
||||
this._allowWalk = false;
|
||||
this._dimensionsX = 0;
|
||||
this._dimensionsY = 0;
|
||||
this._teleportTargetId = 0;
|
||||
|
||||
this._width = 0;
|
||||
this._height = 0;
|
||||
@@ -64,6 +78,13 @@ export class FurnitureWallDataParser
|
||||
this._secondsToExpiration = wrapper.readInt();
|
||||
this._usagePolicy = wrapper.readInt();
|
||||
this._userId = wrapper.readInt();
|
||||
this._allowStack = (wrapper.readInt() === 1);
|
||||
this._allowSit = (wrapper.readInt() === 1);
|
||||
this._allowLay = (wrapper.readInt() === 1);
|
||||
this._allowWalk = (wrapper.readInt() === 1);
|
||||
this._dimensionsX = wrapper.readInt();
|
||||
this._dimensionsY = wrapper.readInt();
|
||||
this._teleportTargetId = wrapper.readInt();
|
||||
this._username = null;
|
||||
|
||||
const state = parseFloat(this._stuffData);
|
||||
@@ -191,6 +212,41 @@ export class FurnitureWallDataParser
|
||||
return this._username;
|
||||
}
|
||||
|
||||
public get allowStack(): boolean
|
||||
{
|
||||
return this._allowStack;
|
||||
}
|
||||
|
||||
public get allowSit(): boolean
|
||||
{
|
||||
return this._allowSit;
|
||||
}
|
||||
|
||||
public get allowLay(): boolean
|
||||
{
|
||||
return this._allowLay;
|
||||
}
|
||||
|
||||
public get allowWalk(): boolean
|
||||
{
|
||||
return this._allowWalk;
|
||||
}
|
||||
|
||||
public get dimensionsX(): number
|
||||
{
|
||||
return this._dimensionsX;
|
||||
}
|
||||
|
||||
public get dimensionsY(): number
|
||||
{
|
||||
return this._dimensionsY;
|
||||
}
|
||||
|
||||
public get teleportTargetId(): number
|
||||
{
|
||||
return this._teleportTargetId;
|
||||
}
|
||||
|
||||
public set username(username: string)
|
||||
{
|
||||
this._username = username;
|
||||
|
||||
@@ -135,6 +135,9 @@ export class RoomUnitParser implements IMessageParser
|
||||
}
|
||||
}
|
||||
|
||||
user.roomEntryMethod = wrapper.readString();
|
||||
user.roomEntryTeleportId = wrapper.readInt();
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ export class UserMessageData
|
||||
private _petPosture: string = '';
|
||||
private _botSkills: number[] = [];
|
||||
private _isModerator: boolean = false;
|
||||
private _roomEntryMethod: string = 'unknown';
|
||||
private _roomEntryTeleportId: number = 0;
|
||||
private _isReadOnly: boolean = false;
|
||||
|
||||
constructor(k: number)
|
||||
@@ -442,4 +444,30 @@ export class UserMessageData
|
||||
this._isModerator = k;
|
||||
}
|
||||
}
|
||||
|
||||
public get roomEntryMethod(): string
|
||||
{
|
||||
return this._roomEntryMethod;
|
||||
}
|
||||
|
||||
public set roomEntryMethod(k: string)
|
||||
{
|
||||
if(!this._isReadOnly)
|
||||
{
|
||||
this._roomEntryMethod = k;
|
||||
}
|
||||
}
|
||||
|
||||
public get roomEntryTeleportId(): number
|
||||
{
|
||||
return this._roomEntryTeleportId;
|
||||
}
|
||||
|
||||
public set roomEntryTeleportId(k: number)
|
||||
{
|
||||
if(!this._isReadOnly)
|
||||
{
|
||||
this._roomEntryTeleportId = k;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user