From ba105d78a6cd029a9ce6a7d887f4efd14acb207d Mon Sep 17 00:00:00 2001 From: Bill Date: Fri, 12 Nov 2021 00:20:33 -0500 Subject: [PATCH] Rename packets --- src/nitro/communication/NitroMessages.ts | 20 ++++++------- ...nfoEvent.ts => GetGuestRoomResultEvent.ts} | 2 +- .../room/data/RoomEntryInfoMessageEvent.ts | 16 ++++++++++ .../incoming/room/data/RoomInfoOwnerEvent.ts | 16 ---------- .../messages/incoming/room/data/index.ts | 4 +-- .../room/furniture/DiceValueMessageEvent.ts | 8 ++--- .../room/furniture/FurnitureItemDataEvent.ts | 16 ---------- .../room/furniture/FurnitureStateEvent.ts | 16 ---------- .../furniture/ItemDataUpdateMessageEvent.ts | 16 ++++++++++ .../furniture/OneWayDoorStatusMessageEvent.ts | 16 ++++++++++ .../messages/incoming/room/furniture/index.ts | 4 +-- .../room/mapping/RoomModelNameEvent.ts | 16 ---------- .../room/mapping/RoomReadyMessageEvent.ts | 16 ++++++++++ .../messages/incoming/room/mapping/index.ts | 2 +- ...arser.ts => RoomEntryInfoMessageParser.ts} | 2 +- .../messages/parser/room/data/index.ts | 2 +- ...te2Parser.ts => DiceValueMessageParser.ts} | 2 +- ...rser.ts => ItemDataUpdateMessageParser.ts} | 2 +- ...er.ts => OneWayDoorStatusMessageParser.ts} | 2 +- .../messages/parser/room/furniture/index.ts | 6 ++-- ...ameParser.ts => RoomReadyMessageParser.ts} | 2 +- .../messages/parser/room/mapping/index.ts | 2 +- src/nitro/room/RoomMessageHandler.ts | 30 +++++++++---------- src/nitro/session/SessionDataManager.ts | 6 ++-- src/nitro/session/handler/RoomDataHandler.ts | 10 +++---- .../session/handler/RoomSessionHandler.ts | 8 ++--- 26 files changed, 121 insertions(+), 121 deletions(-) rename src/nitro/communication/messages/incoming/room/data/{RoomInfoEvent.ts => GetGuestRoomResultEvent.ts} (84%) create mode 100644 src/nitro/communication/messages/incoming/room/data/RoomEntryInfoMessageEvent.ts delete mode 100644 src/nitro/communication/messages/incoming/room/data/RoomInfoOwnerEvent.ts delete mode 100644 src/nitro/communication/messages/incoming/room/furniture/FurnitureItemDataEvent.ts delete mode 100644 src/nitro/communication/messages/incoming/room/furniture/FurnitureStateEvent.ts create mode 100644 src/nitro/communication/messages/incoming/room/furniture/ItemDataUpdateMessageEvent.ts create mode 100644 src/nitro/communication/messages/incoming/room/furniture/OneWayDoorStatusMessageEvent.ts delete mode 100644 src/nitro/communication/messages/incoming/room/mapping/RoomModelNameEvent.ts create mode 100644 src/nitro/communication/messages/incoming/room/mapping/RoomReadyMessageEvent.ts rename src/nitro/communication/messages/parser/room/data/{RoomInfoOwnerParser.ts => RoomEntryInfoMessageParser.ts} (90%) rename src/nitro/communication/messages/parser/room/furniture/{FurnitureState2Parser.ts => DiceValueMessageParser.ts} (90%) rename src/nitro/communication/messages/parser/room/furniture/{FurnitureItemDataParser.ts => ItemDataUpdateMessageParser.ts} (90%) rename src/nitro/communication/messages/parser/room/furniture/{FurnitureStateParser.ts => OneWayDoorStatusMessageParser.ts} (90%) rename src/nitro/communication/messages/parser/room/mapping/{RoomModelNameParser.ts => RoomReadyMessageParser.ts} (91%) diff --git a/src/nitro/communication/NitroMessages.ts b/src/nitro/communication/NitroMessages.ts index e9dd2af4..dea9f7e3 100644 --- a/src/nitro/communication/NitroMessages.ts +++ b/src/nitro/communication/NitroMessages.ts @@ -131,10 +131,10 @@ import { RoomEnterErrorEvent } from './messages/incoming/room/access/RoomEnterEr import { RoomEnterEvent } from './messages/incoming/room/access/RoomEnterEvent'; import { RoomForwardEvent } from './messages/incoming/room/access/RoomForwardEvent'; import { BotCommandConfigurationEvent } from './messages/incoming/room/bots/BotCommandConfigurationEvent'; +import { GetGuestRoomResultEvent } from './messages/incoming/room/data/GetGuestRoomResultEvent'; import { RoomBannedUsersEvent } from './messages/incoming/room/data/RoomBannedUsersEvent'; import { RoomChatSettingsEvent } from './messages/incoming/room/data/RoomChatSettingsEvent'; -import { RoomInfoEvent } from './messages/incoming/room/data/RoomInfoEvent'; -import { RoomInfoOwnerEvent } from './messages/incoming/room/data/RoomInfoOwnerEvent'; +import { RoomEntryInfoMessageEvent } from './messages/incoming/room/data/RoomEntryInfoMessageEvent'; import { RoomScoreEvent } from './messages/incoming/room/data/RoomScoreEvent'; import { RoomSettingsErrorEvent } from './messages/incoming/room/data/RoomSettingsErrorEvent'; import { RoomSettingsEvent } from './messages/incoming/room/data/RoomSettingsEvent'; @@ -151,14 +151,14 @@ import { FurnitureFloorRemoveEvent } from './messages/incoming/room/furniture/fl import { FurnitureFloorUpdateEvent } from './messages/incoming/room/furniture/floor/FurnitureFloorUpdateEvent'; import { FurnitureAliasesEvent } from './messages/incoming/room/furniture/FurnitureAliasesEvent'; import { FurnitureDataEvent } from './messages/incoming/room/furniture/FurnitureDataEvent'; -import { FurnitureItemDataEvent } from './messages/incoming/room/furniture/FurnitureItemDataEvent'; import { FurniturePostItStickyPoleOpenEvent } from './messages/incoming/room/furniture/FurniturePostItStickyPoleOpenEvent'; import { FurnitureStackHeightEvent } from './messages/incoming/room/furniture/FurnitureStackHeightEvent'; -import { FurnitureStateEvent } from './messages/incoming/room/furniture/FurnitureStateEvent'; import { GroupFurniContextMenuInfoMessageEvent } from './messages/incoming/room/furniture/GroupFurniContextMenuInfoMessageEvent'; +import { ItemDataUpdateMessageEvent } from './messages/incoming/room/furniture/ItemDataUpdateMessageEvent'; import { LoveLockFurniFinishedEvent } from './messages/incoming/room/furniture/LoveLockFurniFinishedEvent'; import { LoveLockFurniFriendConfirmedEvent } from './messages/incoming/room/furniture/LoveLockFurniFriendConfirmedEvent'; import { LoveLockFurniStartEvent } from './messages/incoming/room/furniture/LoveLockFurniStartEvent'; +import { OneWayDoorStatusMessageEvent } from './messages/incoming/room/furniture/OneWayDoorStatusMessageEvent'; import { RoomDimmerPresetsEvent } from './messages/incoming/room/furniture/RoomDimmerPresetsMessageEvent'; import { FurnitureWallAddEvent } from './messages/incoming/room/furniture/wall/FurnitureWallAddEvent'; import { FurnitureWallEvent } from './messages/incoming/room/furniture/wall/FurnitureWallEvent'; @@ -171,9 +171,9 @@ import { FloorHeightMapEvent } from './messages/incoming/room/mapping/FloorHeigh import { RoomEntryTileMessageEvent } from './messages/incoming/room/mapping/RoomEntryTileMessageEvent'; import { RoomHeightMapEvent } from './messages/incoming/room/mapping/RoomHeightMapEvent'; import { RoomHeightMapUpdateEvent } from './messages/incoming/room/mapping/RoomHeightMapUpdateEvent'; -import { RoomModelNameEvent } from './messages/incoming/room/mapping/RoomModelNameEvent'; import { RoomOccupiedTilesMessageEvent } from './messages/incoming/room/mapping/RoomOccupiedTilesMessageEvent'; import { RoomPaintEvent } from './messages/incoming/room/mapping/RoomPaintEvent'; +import { RoomReadyMessageEvent } from './messages/incoming/room/mapping/RoomReadyMessageEvent'; import { RoomVisualizationSettingsEvent } from './messages/incoming/room/mapping/RoomVisualizationSettingsEvent'; import { PetFigureUpdateEvent } from './messages/incoming/room/pet/PetFigureUpdateEvent'; import { PetInfoEvent } from './messages/incoming/room/pet/PetInfoEvent'; @@ -726,8 +726,8 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.ROOM_RIGHTS, RoomRightsEvent); this._events.set(IncomingHeader.BOT_COMMAND_CONFIGURATION, BotCommandConfigurationEvent); this._events.set(IncomingHeader.ROOM_SETTINGS_CHAT, RoomChatSettingsEvent); - this._events.set(IncomingHeader.ROOM_INFO, RoomInfoEvent); - this._events.set(IncomingHeader.ROOM_INFO_OWNER, RoomInfoOwnerEvent); + this._events.set(IncomingHeader.ROOM_INFO, GetGuestRoomResultEvent); + this._events.set(IncomingHeader.ROOM_INFO_OWNER, RoomEntryInfoMessageEvent); this._events.set(IncomingHeader.ROOM_SCORE, RoomScoreEvent); this._events.set(IncomingHeader.ROOM_SETTINGS_SAVE_ERROR, RoomSettingsErrorEvent); this._events.set(IncomingHeader.ROOM_SETTINGS, RoomSettingsEvent); @@ -747,9 +747,9 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.ITEM_WALL_UPDATE, FurnitureWallUpdateEvent); this._events.set(IncomingHeader.FURNITURE_ALIASES, FurnitureAliasesEvent); this._events.set(IncomingHeader.FURNITURE_DATA, FurnitureDataEvent); - this._events.set(IncomingHeader.FURNITURE_ITEMDATA, FurnitureItemDataEvent); + this._events.set(IncomingHeader.FURNITURE_ITEMDATA, ItemDataUpdateMessageEvent); this._events.set(IncomingHeader.ITEM_STACK_HELPER, FurnitureStackHeightEvent); - this._events.set(IncomingHeader.FURNITURE_STATE, FurnitureStateEvent); + this._events.set(IncomingHeader.FURNITURE_STATE, OneWayDoorStatusMessageEvent); this._events.set(IncomingHeader.ITEM_DIMMER_SETTINGS, RoomDimmerPresetsEvent); this._events.set(IncomingHeader.FURNITURE_STATE_2, DiceValueMessageEvent); this._events.set(IncomingHeader.LOVELOCK_FURNI_FINISHED, LoveLockFurniFinishedEvent); @@ -764,7 +764,7 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.ROOM_HEIGHT_MAP, RoomHeightMapEvent); this._events.set(IncomingHeader.ROOM_HEIGHT_MAP_UPDATE, RoomHeightMapUpdateEvent); this._events.set(IncomingHeader.ROOM_MODEL, FloorHeightMapEvent); - this._events.set(IncomingHeader.ROOM_MODEL_NAME, RoomModelNameEvent); + this._events.set(IncomingHeader.ROOM_MODEL_NAME, RoomReadyMessageEvent); this._events.set(IncomingHeader.ROOM_PAINT, RoomPaintEvent); this._events.set(IncomingHeader.ROOM_THICKNESS, RoomVisualizationSettingsEvent); this._events.set(IncomingHeader.ROOM_MODEL_BLOCKED_TILES, RoomOccupiedTilesMessageEvent); diff --git a/src/nitro/communication/messages/incoming/room/data/RoomInfoEvent.ts b/src/nitro/communication/messages/incoming/room/data/GetGuestRoomResultEvent.ts similarity index 84% rename from src/nitro/communication/messages/incoming/room/data/RoomInfoEvent.ts rename to src/nitro/communication/messages/incoming/room/data/GetGuestRoomResultEvent.ts index ca7c05a3..98eb78fb 100644 --- a/src/nitro/communication/messages/incoming/room/data/RoomInfoEvent.ts +++ b/src/nitro/communication/messages/incoming/room/data/GetGuestRoomResultEvent.ts @@ -2,7 +2,7 @@ import { IMessageEvent } from '../../../../../../core/communication/messages/IMe import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; import { RoomInfoParser } from '../../../parser/room/data/RoomInfoParser'; -export class RoomInfoEvent extends MessageEvent implements IMessageEvent +export class GetGuestRoomResultEvent extends MessageEvent implements IMessageEvent { constructor(callBack: Function) { diff --git a/src/nitro/communication/messages/incoming/room/data/RoomEntryInfoMessageEvent.ts b/src/nitro/communication/messages/incoming/room/data/RoomEntryInfoMessageEvent.ts new file mode 100644 index 00000000..bcf5f89a --- /dev/null +++ b/src/nitro/communication/messages/incoming/room/data/RoomEntryInfoMessageEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; +import { RoomEntryInfoMessageParser } from '../../../parser/room/data/RoomEntryInfoMessageParser'; + +export class RoomEntryInfoMessageEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, RoomEntryInfoMessageParser); + } + + public getParser(): RoomEntryInfoMessageParser + { + return this.parser as RoomEntryInfoMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/room/data/RoomInfoOwnerEvent.ts b/src/nitro/communication/messages/incoming/room/data/RoomInfoOwnerEvent.ts deleted file mode 100644 index cbe37b2a..00000000 --- a/src/nitro/communication/messages/incoming/room/data/RoomInfoOwnerEvent.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { RoomInfoOwnerParser } from '../../../parser/room/data/RoomInfoOwnerParser'; - -export class RoomInfoOwnerEvent extends MessageEvent implements IMessageEvent -{ - constructor(callBack: Function) - { - super(callBack, RoomInfoOwnerParser); - } - - public getParser(): RoomInfoOwnerParser - { - return this.parser as RoomInfoOwnerParser; - } -} diff --git a/src/nitro/communication/messages/incoming/room/data/index.ts b/src/nitro/communication/messages/incoming/room/data/index.ts index e68d0d70..5f0345e5 100644 --- a/src/nitro/communication/messages/incoming/room/data/index.ts +++ b/src/nitro/communication/messages/incoming/room/data/index.ts @@ -1,7 +1,7 @@ +export * from './GetGuestRoomResultEvent'; export * from './RoomBannedUsersEvent'; export * from './RoomChatSettingsEvent'; -export * from './RoomInfoEvent'; -export * from './RoomInfoOwnerEvent'; +export * from './RoomEntryInfoMessageEvent'; export * from './RoomScoreEvent'; export * from './RoomSettingsErrorEvent'; export * from './RoomSettingsEvent'; diff --git a/src/nitro/communication/messages/incoming/room/furniture/DiceValueMessageEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/DiceValueMessageEvent.ts index 4b331398..1bf71fce 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/DiceValueMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/DiceValueMessageEvent.ts @@ -1,16 +1,16 @@ import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { FurnitureState2Parser } from '../../../parser/room/furniture/FurnitureState2Parser'; +import { DiceValueMessageParser } from '../../../parser/room/furniture/DiceValueMessageParser'; export class DiceValueMessageEvent extends MessageEvent implements IMessageEvent { constructor(callBack: Function) { - super(callBack, FurnitureState2Parser); + super(callBack, DiceValueMessageParser); } - public getParser(): FurnitureState2Parser + public getParser(): DiceValueMessageParser { - return this.parser as FurnitureState2Parser; + return this.parser as DiceValueMessageParser; } } diff --git a/src/nitro/communication/messages/incoming/room/furniture/FurnitureItemDataEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/FurnitureItemDataEvent.ts deleted file mode 100644 index 171cdd8d..00000000 --- a/src/nitro/communication/messages/incoming/room/furniture/FurnitureItemDataEvent.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { FurnitureItemDataParser } from '../../../parser/room/furniture/FurnitureItemDataParser'; - -export class FurnitureItemDataEvent extends MessageEvent implements IMessageEvent -{ - constructor(callBack: Function) - { - super(callBack, FurnitureItemDataParser); - } - - public getParser(): FurnitureItemDataParser - { - return this.parser as FurnitureItemDataParser; - } -} diff --git a/src/nitro/communication/messages/incoming/room/furniture/FurnitureStateEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/FurnitureStateEvent.ts deleted file mode 100644 index 26b42ba7..00000000 --- a/src/nitro/communication/messages/incoming/room/furniture/FurnitureStateEvent.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { FurnitureStateParser } from '../../../parser/room/furniture/FurnitureStateParser'; - -export class FurnitureStateEvent extends MessageEvent implements IMessageEvent -{ - constructor(callBack: Function) - { - super(callBack, FurnitureStateParser); - } - - public getParser(): FurnitureStateParser - { - return this.parser as FurnitureStateParser; - } -} diff --git a/src/nitro/communication/messages/incoming/room/furniture/ItemDataUpdateMessageEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/ItemDataUpdateMessageEvent.ts new file mode 100644 index 00000000..e50e0554 --- /dev/null +++ b/src/nitro/communication/messages/incoming/room/furniture/ItemDataUpdateMessageEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; +import { ItemDataUpdateMessageParser } from '../../../parser/room/furniture/ItemDataUpdateMessageParser'; + +export class ItemDataUpdateMessageEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, ItemDataUpdateMessageParser); + } + + public getParser(): ItemDataUpdateMessageParser + { + return this.parser as ItemDataUpdateMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/room/furniture/OneWayDoorStatusMessageEvent.ts b/src/nitro/communication/messages/incoming/room/furniture/OneWayDoorStatusMessageEvent.ts new file mode 100644 index 00000000..03033c3b --- /dev/null +++ b/src/nitro/communication/messages/incoming/room/furniture/OneWayDoorStatusMessageEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; +import { OneWayDoorStatusMessageParser } from '../../../parser/room/furniture/OneWayDoorStatusMessageParser'; + +export class OneWayDoorStatusMessageEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, OneWayDoorStatusMessageParser); + } + + public getParser(): OneWayDoorStatusMessageParser + { + return this.parser as OneWayDoorStatusMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/room/furniture/index.ts b/src/nitro/communication/messages/incoming/room/furniture/index.ts index be7d5cb1..a866b849 100644 --- a/src/nitro/communication/messages/incoming/room/furniture/index.ts +++ b/src/nitro/communication/messages/incoming/room/furniture/index.ts @@ -2,14 +2,14 @@ export * from './DiceValueMessageEvent'; export * from './floor'; export * from './FurnitureAliasesEvent'; export * from './FurnitureDataEvent'; -export * from './FurnitureItemDataEvent'; export * from './FurniturePostItStickyPoleOpenEvent'; export * from './FurnitureStackHeightEvent'; -export * from './FurnitureStateEvent'; export * from './GroupFurniContextMenuInfoMessageEvent'; +export * from './ItemDataUpdateMessageEvent'; export * from './LoveLockFurniFinishedEvent'; export * from './LoveLockFurniFriendConfirmedEvent'; export * from './LoveLockFurniStartEvent'; +export * from './OneWayDoorStatusMessageEvent'; export * from './RoomDimmerPresetsMessageData'; export * from './RoomDimmerPresetsMessageEvent'; export * from './wall'; diff --git a/src/nitro/communication/messages/incoming/room/mapping/RoomModelNameEvent.ts b/src/nitro/communication/messages/incoming/room/mapping/RoomModelNameEvent.ts deleted file mode 100644 index 85908552..00000000 --- a/src/nitro/communication/messages/incoming/room/mapping/RoomModelNameEvent.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { RoomModelNameParser } from '../../../parser/room/mapping/RoomModelNameParser'; - -export class RoomModelNameEvent extends MessageEvent implements IMessageEvent -{ - constructor(callBack: Function) - { - super(callBack, RoomModelNameParser); - } - - public getParser(): RoomModelNameParser - { - return this.parser as RoomModelNameParser; - } -} diff --git a/src/nitro/communication/messages/incoming/room/mapping/RoomReadyMessageEvent.ts b/src/nitro/communication/messages/incoming/room/mapping/RoomReadyMessageEvent.ts new file mode 100644 index 00000000..cad05381 --- /dev/null +++ b/src/nitro/communication/messages/incoming/room/mapping/RoomReadyMessageEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; +import { RoomReadyMessageParser } from '../../../parser/room/mapping/RoomReadyMessageParser'; + +export class RoomReadyMessageEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, RoomReadyMessageParser); + } + + public getParser(): RoomReadyMessageParser + { + return this.parser as RoomReadyMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/room/mapping/index.ts b/src/nitro/communication/messages/incoming/room/mapping/index.ts index 038f1df4..1ada5b8c 100644 --- a/src/nitro/communication/messages/incoming/room/mapping/index.ts +++ b/src/nitro/communication/messages/incoming/room/mapping/index.ts @@ -2,7 +2,7 @@ export * from './FloorHeightMapEvent'; export * from './RoomEntryTileMessageEvent'; export * from './RoomHeightMapEvent'; export * from './RoomHeightMapUpdateEvent'; -export * from './RoomModelNameEvent'; export * from './RoomOccupiedTilesMessageEvent'; export * from './RoomPaintEvent'; +export * from './RoomReadyMessageEvent'; export * from './RoomVisualizationSettingsEvent'; diff --git a/src/nitro/communication/messages/parser/room/data/RoomInfoOwnerParser.ts b/src/nitro/communication/messages/parser/room/data/RoomEntryInfoMessageParser.ts similarity index 90% rename from src/nitro/communication/messages/parser/room/data/RoomInfoOwnerParser.ts rename to src/nitro/communication/messages/parser/room/data/RoomEntryInfoMessageParser.ts index fd28163a..c52da864 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomInfoOwnerParser.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomEntryInfoMessageParser.ts @@ -1,6 +1,6 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; -export class RoomInfoOwnerParser implements IMessageParser +export class RoomEntryInfoMessageParser implements IMessageParser { private _roomId: number; private _isOwner: boolean; diff --git a/src/nitro/communication/messages/parser/room/data/index.ts b/src/nitro/communication/messages/parser/room/data/index.ts index f509c354..648d08bd 100644 --- a/src/nitro/communication/messages/parser/room/data/index.ts +++ b/src/nitro/communication/messages/parser/room/data/index.ts @@ -1,7 +1,7 @@ export * from './RoomChatSettings'; export * from './RoomChatSettingsParser'; export * from './RoomDataParser'; -export * from './RoomInfoOwnerParser'; +export * from './RoomEntryInfoMessageParser'; export * from './RoomInfoParser'; export * from './RoomModerationSettings'; export * from './RoomScoreParser'; diff --git a/src/nitro/communication/messages/parser/room/furniture/FurnitureState2Parser.ts b/src/nitro/communication/messages/parser/room/furniture/DiceValueMessageParser.ts similarity index 90% rename from src/nitro/communication/messages/parser/room/furniture/FurnitureState2Parser.ts rename to src/nitro/communication/messages/parser/room/furniture/DiceValueMessageParser.ts index 08a650c1..8b94c4fe 100644 --- a/src/nitro/communication/messages/parser/room/furniture/FurnitureState2Parser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/DiceValueMessageParser.ts @@ -1,6 +1,6 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; -export class FurnitureState2Parser implements IMessageParser +export class DiceValueMessageParser implements IMessageParser { private _itemId: number; private _value: number; diff --git a/src/nitro/communication/messages/parser/room/furniture/FurnitureItemDataParser.ts b/src/nitro/communication/messages/parser/room/furniture/ItemDataUpdateMessageParser.ts similarity index 90% rename from src/nitro/communication/messages/parser/room/furniture/FurnitureItemDataParser.ts rename to src/nitro/communication/messages/parser/room/furniture/ItemDataUpdateMessageParser.ts index 8c2e700e..bf5974b5 100644 --- a/src/nitro/communication/messages/parser/room/furniture/FurnitureItemDataParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/ItemDataUpdateMessageParser.ts @@ -1,6 +1,6 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; -export class FurnitureItemDataParser implements IMessageParser +export class ItemDataUpdateMessageParser implements IMessageParser { private _itemId: number; private _data: string; diff --git a/src/nitro/communication/messages/parser/room/furniture/FurnitureStateParser.ts b/src/nitro/communication/messages/parser/room/furniture/OneWayDoorStatusMessageParser.ts similarity index 90% rename from src/nitro/communication/messages/parser/room/furniture/FurnitureStateParser.ts rename to src/nitro/communication/messages/parser/room/furniture/OneWayDoorStatusMessageParser.ts index 946650ee..db5e62d8 100644 --- a/src/nitro/communication/messages/parser/room/furniture/FurnitureStateParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/OneWayDoorStatusMessageParser.ts @@ -1,6 +1,6 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; -export class FurnitureStateParser implements IMessageParser +export class OneWayDoorStatusMessageParser implements IMessageParser { private _itemId: number; private _state: number; diff --git a/src/nitro/communication/messages/parser/room/furniture/index.ts b/src/nitro/communication/messages/parser/room/furniture/index.ts index 458b1bf0..92946c41 100644 --- a/src/nitro/communication/messages/parser/room/furniture/index.ts +++ b/src/nitro/communication/messages/parser/room/furniture/index.ts @@ -1,14 +1,14 @@ +export * from './DiceValueMessageParser'; export * from './floor'; export * from './FurnitureAliasesParser'; export * from './FurnitureDataParser'; -export * from './FurnitureItemDataParser'; export * from './FurnitureStackHeightParser'; -export * from './FurnitureState2Parser'; -export * from './FurnitureStateParser'; export * from './GroupFurniContextMenuInfoMessageParser'; +export * from './ItemDataUpdateMessageParser'; export * from './LoveLockFurniFinishedParser'; export * from './LoveLockFurniFriendConfirmedParser'; export * from './LoveLockFurniStartParser'; +export * from './OneWayDoorStatusMessageParser'; export * from './RoomDimmerPresetsMessageParser'; export * from './wall'; export * from './youtube'; diff --git a/src/nitro/communication/messages/parser/room/mapping/RoomModelNameParser.ts b/src/nitro/communication/messages/parser/room/mapping/RoomReadyMessageParser.ts similarity index 91% rename from src/nitro/communication/messages/parser/room/mapping/RoomModelNameParser.ts rename to src/nitro/communication/messages/parser/room/mapping/RoomReadyMessageParser.ts index d9c42590..8c938352 100644 --- a/src/nitro/communication/messages/parser/room/mapping/RoomModelNameParser.ts +++ b/src/nitro/communication/messages/parser/room/mapping/RoomReadyMessageParser.ts @@ -1,6 +1,6 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; -export class RoomModelNameParser implements IMessageParser +export class RoomReadyMessageParser implements IMessageParser { private _name: string; private _roomId: number; diff --git a/src/nitro/communication/messages/parser/room/mapping/index.ts b/src/nitro/communication/messages/parser/room/mapping/index.ts index 155d6846..11846fd2 100644 --- a/src/nitro/communication/messages/parser/room/mapping/index.ts +++ b/src/nitro/communication/messages/parser/room/mapping/index.ts @@ -2,7 +2,7 @@ export * from './FloorHeightMapMessageParser'; export * from './RoomEntryTileMessageParser'; export * from './RoomHeightMapParser'; export * from './RoomHeightMapUpdateParser'; -export * from './RoomModelNameParser'; export * from './RoomOccupiedTilesMessageParser'; export * from './RoomPaintParser'; +export * from './RoomReadyMessageParser'; export * from './RoomVisualizationSettingsParser'; diff --git a/src/nitro/room/RoomMessageHandler.ts b/src/nitro/room/RoomMessageHandler.ts index b9e06c38..b15dbc45 100644 --- a/src/nitro/room/RoomMessageHandler.ts +++ b/src/nitro/room/RoomMessageHandler.ts @@ -12,8 +12,8 @@ import { FurnitureFloorRemoveEvent } from '../communication/messages/incoming/ro import { FurnitureFloorUpdateEvent } from '../communication/messages/incoming/room/furniture/floor/FurnitureFloorUpdateEvent'; import { FurnitureAliasesEvent } from '../communication/messages/incoming/room/furniture/FurnitureAliasesEvent'; import { FurnitureDataEvent } from '../communication/messages/incoming/room/furniture/FurnitureDataEvent'; -import { FurnitureItemDataEvent } from '../communication/messages/incoming/room/furniture/FurnitureItemDataEvent'; -import { FurnitureStateEvent } from '../communication/messages/incoming/room/furniture/FurnitureStateEvent'; +import { ItemDataUpdateMessageEvent } from '../communication/messages/incoming/room/furniture/ItemDataUpdateMessageEvent'; +import { OneWayDoorStatusMessageEvent } from '../communication/messages/incoming/room/furniture/OneWayDoorStatusMessageEvent'; import { FurnitureWallAddEvent } from '../communication/messages/incoming/room/furniture/wall/FurnitureWallAddEvent'; import { FurnitureWallEvent } from '../communication/messages/incoming/room/furniture/wall/FurnitureWallEvent'; import { FurnitureWallRemoveEvent } from '../communication/messages/incoming/room/furniture/wall/FurnitureWallRemoveEvent'; @@ -22,8 +22,8 @@ import { FloorHeightMapEvent } from '../communication/messages/incoming/room/map import { RoomEntryTileMessageEvent } from '../communication/messages/incoming/room/mapping/RoomEntryTileMessageEvent'; import { RoomHeightMapEvent } from '../communication/messages/incoming/room/mapping/RoomHeightMapEvent'; import { RoomHeightMapUpdateEvent } from '../communication/messages/incoming/room/mapping/RoomHeightMapUpdateEvent'; -import { RoomModelNameEvent } from '../communication/messages/incoming/room/mapping/RoomModelNameEvent'; import { RoomPaintEvent } from '../communication/messages/incoming/room/mapping/RoomPaintEvent'; +import { RoomReadyMessageEvent } from '../communication/messages/incoming/room/mapping/RoomReadyMessageEvent'; import { RoomVisualizationSettingsEvent } from '../communication/messages/incoming/room/mapping/RoomVisualizationSettingsEvent'; import { PetFigureUpdateEvent } from '../communication/messages/incoming/room/pet/PetFigureUpdateEvent'; import { YouArePlayingGameEvent } from '../communication/messages/incoming/room/session/YouArePlayingGameEvent'; @@ -106,7 +106,7 @@ export class RoomMessageHandler extends Disposable this._connection = connection; this._connection.addMessageEvent(new UserInfoEvent(this.onUserInfoEvent.bind(this))); - this._connection.addMessageEvent(new RoomModelNameEvent(this.onRoomModelNameEvent.bind(this))); + this._connection.addMessageEvent(new RoomReadyMessageEvent(this.onRoomReadyMessageEvent.bind(this))); this._connection.addMessageEvent(new RoomPaintEvent(this.onRoomPaintEvent.bind(this))); this._connection.addMessageEvent(new FloorHeightMapEvent(this.onRoomModelEvent.bind(this))); this._connection.addMessageEvent(new RoomHeightMapEvent(this.onRoomHeightMapEvent.bind(this))); @@ -125,8 +125,8 @@ export class RoomMessageHandler extends Disposable this._connection.addMessageEvent(new FurnitureWallRemoveEvent(this.onFurnitureWallRemoveEvent.bind(this))); this._connection.addMessageEvent(new FurnitureWallUpdateEvent(this.onFurnitureWallUpdateEvent.bind(this))); this._connection.addMessageEvent(new FurnitureDataEvent(this.onFurnitureDataEvent.bind(this))); - this._connection.addMessageEvent(new FurnitureItemDataEvent(this.onFurnitureItemDataEvent.bind(this))); - this._connection.addMessageEvent(new FurnitureStateEvent(this.onFurnitureStateEvent.bind(this))); + this._connection.addMessageEvent(new ItemDataUpdateMessageEvent(this.onItemDataUpdateMessageEvent.bind(this))); + this._connection.addMessageEvent(new OneWayDoorStatusMessageEvent(this.onOneWayDoorStatusMessageEvent.bind(this))); this._connection.addMessageEvent(new RoomUnitDanceEvent(this.onRoomUnitDanceEvent.bind(this))); this._connection.addMessageEvent(new RoomUnitEffectEvent(this.onRoomUnitEffectEvent.bind(this))); this._connection.addMessageEvent(new RoomUnitEvent(this.onRoomUnitEvent.bind(this))); @@ -176,18 +176,18 @@ export class RoomMessageHandler extends Disposable this._ownUserId = parser.userInfo.userId; } - private onRoomModelNameEvent(event: RoomModelNameEvent): void + private onRoomReadyMessageEvent(event: RoomReadyMessageEvent): void { - if(!(event instanceof RoomModelNameEvent) || !event.connection) return; + const parser = event.getParser(); - if(this._currentRoomId !== event.getParser().roomId) + if(this._currentRoomId !== parser.roomId) { - this.setRoomId(event.getParser().roomId); + this.setRoomId(parser.roomId); } if(this._roomCreator) { - this._roomCreator.setRoomInstanceModelName(event.getParser().roomId, event.getParser().name); + this._roomCreator.setRoomInstanceModelName(parser.roomId, parser.name); } if(this._initialConnection) @@ -627,18 +627,18 @@ export class RoomMessageHandler extends Disposable this._roomCreator.updateRoomObjectFloor(this._currentRoomId, parser.furnitureId, null, null, parser.objectData.state, parser.objectData); } - private onFurnitureItemDataEvent(event: FurnitureItemDataEvent): void + private onItemDataUpdateMessageEvent(event: ItemDataUpdateMessageEvent): void { - if(!(event instanceof FurnitureItemDataEvent) || !event.connection || !this._roomCreator) return; + if(!(event instanceof ItemDataUpdateMessageEvent) || !event.connection || !this._roomCreator) return; const parser = event.getParser(); this._roomCreator.updateRoomObjectWallItemData(this._currentRoomId, parser.furnitureId, parser.data); } - private onFurnitureStateEvent(event: FurnitureStateEvent): void + private onOneWayDoorStatusMessageEvent(event: OneWayDoorStatusMessageEvent): void { - if(!(event instanceof FurnitureStateEvent) || !event.connection || !this._roomCreator) return; + if(!(event instanceof OneWayDoorStatusMessageEvent) || !event.connection || !this._roomCreator) return; const parser = event.getParser(); diff --git a/src/nitro/session/SessionDataManager.ts b/src/nitro/session/SessionDataManager.ts index 50e13c7d..912cb8fb 100644 --- a/src/nitro/session/SessionDataManager.ts +++ b/src/nitro/session/SessionDataManager.ts @@ -6,7 +6,7 @@ import { FigureUpdateEvent, MysteryBoxKeysEvent } from '../communication'; import { INitroCommunicationManager } from '../communication/INitroCommunicationManager'; import { AvailabilityStatusMessageEvent } from '../communication/messages/incoming/availability/AvailabilityStatusMessageEvent'; import { ChangeUserNameResultMessageEvent } from '../communication/messages/incoming/avatar/ChangeUserNameResultMessageEvent'; -import { RoomModelNameEvent } from '../communication/messages/incoming/room/mapping/RoomModelNameEvent'; +import { RoomReadyMessageEvent } from '../communication/messages/incoming/room/mapping/RoomReadyMessageEvent'; import { UserPermissionsEvent } from '../communication/messages/incoming/user/access/UserPermissionsEvent'; import { UserInfoEvent } from '../communication/messages/incoming/user/data/UserInfoEvent'; import { UserNameChangeMessageEvent } from '../communication/messages/incoming/user/data/UserNameChangeMessageEvent'; @@ -131,7 +131,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana this._communication.registerMessageEvent(new AvailabilityStatusMessageEvent(this.onAvailabilityStatusMessageEvent.bind(this))); this._communication.registerMessageEvent(new ChangeUserNameResultMessageEvent(this.onChangeNameUpdateEvent.bind(this))); this._communication.registerMessageEvent(new UserNameChangeMessageEvent(this.onUserNameChangeMessageEvent.bind(this))); - this._communication.registerMessageEvent(new RoomModelNameEvent(this.onRoomModelNameEvent.bind(this))); + this._communication.registerMessageEvent(new RoomReadyMessageEvent(this.onRoomModelNameEvent.bind(this))); this._communication.registerMessageEvent(new InClientLinkEvent(this.onInClientLinkEvent.bind(this))); this._communication.registerMessageEvent(new MysteryBoxKeysEvent(this.onMysteryBoxKeysEvent.bind(this))); @@ -335,7 +335,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana this.events.dispatchEvent(new UserNameUpdateEvent(this._name)); } - private onRoomModelNameEvent(event: RoomModelNameEvent): void + private onRoomModelNameEvent(event: RoomReadyMessageEvent): void { if(!event) return; diff --git a/src/nitro/session/handler/RoomDataHandler.ts b/src/nitro/session/handler/RoomDataHandler.ts index d96e6be8..66773f0d 100644 --- a/src/nitro/session/handler/RoomDataHandler.ts +++ b/src/nitro/session/handler/RoomDataHandler.ts @@ -1,5 +1,5 @@ import { IConnection } from '../../../core/communication/connections/IConnection'; -import { RoomInfoEvent } from '../../communication/messages/incoming/room/data/RoomInfoEvent'; +import { GetGuestRoomResultEvent } from '../../communication/messages/incoming/room/data/GetGuestRoomResultEvent'; import { RoomSessionEvent } from '../events/RoomSessionEvent'; import { RoomSessionPropertyUpdateEvent } from '../events/RoomSessionPropertyUpdateEvent'; import { IRoomHandlerListener } from '../IRoomHandlerListener'; @@ -11,12 +11,12 @@ export class RoomDataHandler extends BaseHandler { super(connection, listener); - connection.addMessageEvent(new RoomInfoEvent(this.onRoomInfoEvent.bind(this))); + connection.addMessageEvent(new GetGuestRoomResultEvent(this.onGetGuestRoomResultEvent.bind(this))); } - private onRoomInfoEvent(event: RoomInfoEvent): void + private onGetGuestRoomResultEvent(event: GetGuestRoomResultEvent): void { - if(!(event instanceof RoomInfoEvent)) return; + if(!(event instanceof GetGuestRoomResultEvent)) return; const parser = event.getParser(); @@ -39,4 +39,4 @@ export class RoomDataHandler extends BaseHandler this.listener.events.dispatchEvent(new RoomSessionPropertyUpdateEvent(RoomSessionPropertyUpdateEvent.RSDUE_ALLOW_PETS, roomSession)); this.listener.events.dispatchEvent(new RoomSessionEvent(RoomSessionEvent.ROOM_DATA, roomSession)); } -} \ No newline at end of file +} diff --git a/src/nitro/session/handler/RoomSessionHandler.ts b/src/nitro/session/handler/RoomSessionHandler.ts index dde134d4..e5198523 100644 --- a/src/nitro/session/handler/RoomSessionHandler.ts +++ b/src/nitro/session/handler/RoomSessionHandler.ts @@ -3,7 +3,7 @@ import { DesktopViewEvent } from '../../communication/messages/incoming/desktop/ import { RoomDoorbellAcceptedEvent } from '../../communication/messages/incoming/room/access/doorbell/RoomDoorbellAcceptedEvent'; import { RoomDoorbellRejectedEvent } from '../../communication/messages/incoming/room/access/doorbell/RoomDoorbellRejectedEvent'; import { RoomEnterEvent } from '../../communication/messages/incoming/room/access/RoomEnterEvent'; -import { RoomModelNameEvent } from '../../communication/messages/incoming/room/mapping/RoomModelNameEvent'; +import { RoomReadyMessageEvent } from '../../communication/messages/incoming/room/mapping/RoomReadyMessageEvent'; import { GoToFlatMessageComposer } from '../../communication/messages/outgoing/room/session/GoToFlatMessageComposer'; import { RoomSessionDoorbellEvent } from '../events/RoomSessionDoorbellEvent'; import { IRoomHandlerListener } from '../IRoomHandlerListener'; @@ -20,7 +20,7 @@ export class RoomSessionHandler extends BaseHandler super(connection, listener); connection.addMessageEvent(new RoomEnterEvent(this.onRoomEnterEvent.bind(this))); - connection.addMessageEvent(new RoomModelNameEvent(this.onRoomModelNameEvent.bind(this))); + connection.addMessageEvent(new RoomReadyMessageEvent(this.onRoomReadyMessageEvent.bind(this))); connection.addMessageEvent(new DesktopViewEvent(this.onDesktopViewEvent.bind(this))); connection.addMessageEvent(new RoomDoorbellAcceptedEvent(this.onRoomDoorbellAcceptedEvent.bind(this))); connection.addMessageEvent(new RoomDoorbellRejectedEvent(this.onRoomDoorbellRejectedEvent.bind(this))); @@ -33,9 +33,9 @@ export class RoomSessionHandler extends BaseHandler if(this.listener) this.listener.sessionUpdate(this.roomId, RoomSessionHandler.RS_CONNECTED); } - private onRoomModelNameEvent(event: RoomModelNameEvent): void + private onRoomReadyMessageEvent(event: RoomReadyMessageEvent): void { - if(!(event instanceof RoomModelNameEvent)) return; + if(!(event instanceof RoomReadyMessageEvent)) return; const fromRoomId = this.roomId; const toRoomId = event.getParser().roomId;