From 5412f3d3b349cf3bcca092b5745c3e9e9b88c652 Mon Sep 17 00:00:00 2001 From: Bill Date: Sat, 18 Jun 2022 19:37:56 -0400 Subject: [PATCH] Changes --- src/api/navigator/RoomSettingsData.ts | 78 ------------------- .../furniture/useFurnitureRoomLinkWidget.ts | 4 +- 2 files changed, 2 insertions(+), 80 deletions(-) delete mode 100644 src/api/navigator/RoomSettingsData.ts diff --git a/src/api/navigator/RoomSettingsData.ts b/src/api/navigator/RoomSettingsData.ts deleted file mode 100644 index 18852ab3..00000000 --- a/src/api/navigator/RoomSettingsData.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { RoomSettingsDataParser } from '@nitrots/nitro-renderer'; - -export class RoomSettingsData -{ - public roomId: number; - public roomName: string; - public roomOriginalName: string; - public roomDescription: string; - public categoryId: number; - public userCount: number; - public tags: string[]; - public tradeState: number; - public allowWalkthrough: boolean; - - public lockState: number; - public originalLockState: number; - public password: string; - public confirmPassword: string; - public allowPets: boolean; - public allowPetsEat: boolean; - - public usersWithRights: Map; - - public hideWalls: boolean; - public wallThickness: number; - public floorThickness: number; - public chatBubbleMode: number; - public chatBubbleWeight: number; - public chatBubbleSpeed: number; - public chatFloodProtection: number; - public chatDistance: number; - - public muteState: number; - public kickState: number; - public banState: number; - public bannedUsers: any[]; - public selectedUserToUnban: number; - - constructor(parser: RoomSettingsDataParser) - { - if(!parser) throw new Error('invalid_parser'); - - const data = parser.data; - - this.roomId = data.roomId; - this.roomName = data.name; - this.roomOriginalName = data.name; - this.roomDescription = data.description; - this.categoryId = data.categoryId; - this.userCount = data.maximumVisitorsLimit; - this.tags = data.tags; - this.tradeState = data.tradeMode; - this.allowWalkthrough = data.allowWalkThrough; - - this.lockState = data.doorMode; - this.originalLockState = data.doorMode; - this.password = null; - this.confirmPassword = null; - this.allowPets = data.allowPets; - this.allowPetsEat = data.allowFoodConsume; - - this.usersWithRights = new Map(); - - this.hideWalls = data.hideWalls; - this.wallThickness = data.wallThickness; - this.floorThickness = data.floorThickness; - this.chatBubbleMode = data.chatSettings.mode; - this.chatBubbleWeight = data.chatSettings.weight; - this.chatBubbleSpeed = data.chatSettings.speed; - this.chatFloodProtection = data.chatSettings.protection; - this.chatDistance = data.chatSettings.distance; - - this.muteState = data.roomModerationSettings.allowMute; - this.kickState = data.roomModerationSettings.allowKick; - this.banState = data.roomModerationSettings.allowBan; - this.bannedUsers = []; - } -} diff --git a/src/hooks/rooms/widgets/furniture/useFurnitureRoomLinkWidget.ts b/src/hooks/rooms/widgets/furniture/useFurnitureRoomLinkWidget.ts index 0e8faea4..208f67f3 100644 --- a/src/hooks/rooms/widgets/furniture/useFurnitureRoomLinkWidget.ts +++ b/src/hooks/rooms/widgets/furniture/useFurnitureRoomLinkWidget.ts @@ -1,4 +1,4 @@ -import { GetGuestRoomResultEvent, RoomEngineTriggerWidgetEvent, RoomInfoComposer, RoomObjectVariable } from '@nitrots/nitro-renderer'; +import { GetGuestRoomMessageComposer, GetGuestRoomResultEvent, RoomEngineTriggerWidgetEvent, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { useEffect, useState } from 'react'; import { GetCommunication, GetRoomEngine, SendMessageComposer } from '../../../../api'; import { UseRoomEngineEvent } from '../../../events'; @@ -29,7 +29,7 @@ const useFurnitureRoomLinkWidgetState = () => setRoomIdToEnter(roomId); - SendMessageComposer(new RoomInfoComposer(roomId, false, false)); + SendMessageComposer(new GetGuestRoomMessageComposer(roomId, false, false)); }); useEffect(() =>