Update api

This commit is contained in:
Bill 2021-06-14 01:14:39 -04:00
parent bd9c7e001e
commit 88a8c2f015
19 changed files with 391 additions and 14 deletions

View File

@ -0,0 +1,6 @@
import { IConnection, Nitro } from 'nitro-renderer';
export function GetConnection(): IConnection
{
return Nitro.instance.communication.connection;
}

View File

@ -1,3 +1,4 @@
export * from './avatar'; export * from './avatar';
export * from './GetConnection';
export * from './room'; export * from './room';
export * from './session'; export * from './session';

View File

@ -1,6 +1,6 @@
import { RoomEngineObjectEvent, RoomObjectVariable } from 'nitro-renderer'; import { RoomEngineObjectEvent, RoomObjectVariable } from 'nitro-renderer';
import { GetSessionDataManager } from '../../../api'; import { GetSessionDataManager } from '../..';
import { GetRoomEngine } from '../../../api/nitro/room/GetRoomEngine'; import { GetRoomEngine } from './GetRoomEngine';
export function IsFurnitureSelectionDisabled(event: RoomEngineObjectEvent): boolean export function IsFurnitureSelectionDisabled(event: RoomEngineObjectEvent): boolean
{ {

View File

@ -3,5 +3,6 @@ export * from './DispatchResizeEvent';
export * from './DispatchTouchEvent'; export * from './DispatchTouchEvent';
export * from './GetRoomEngine'; export * from './GetRoomEngine';
export * from './InitializeRoomInstanceRenderingCanvas'; export * from './InitializeRoomInstanceRenderingCanvas';
export * from './IsFurnitureSelectionDisabled';
export * from './ProcessRoomObjectOperation'; export * from './ProcessRoomObjectOperation';
export * from './SetActiveRoomId'; export * from './SetActiveRoomId';

View File

@ -1,6 +1,6 @@
import { IRoomSession, RoomControllerLevel } from 'nitro-renderer'; import { IRoomSession, RoomControllerLevel } from 'nitro-renderer';
import { GetSessionDataManager } from '../../../api'; import { GetSessionDataManager } from '../..';
import { GetRoomEngine } from '../../../api/nitro/room/GetRoomEngine'; import { GetRoomEngine } from '../room/GetRoomEngine';
import { IsOwnerOfFurniture } from './IsOwnerOfFurniture'; import { IsOwnerOfFurniture } from './IsOwnerOfFurniture';
export function CanManipulateFurniture(roomSession: IRoomSession, objectId: number, category: number): boolean export function CanManipulateFurniture(roomSession: IRoomSession, objectId: number, category: number): boolean

View File

@ -0,0 +1,30 @@
import { RoomObjectVariable, RoomUserData } from 'nitro-renderer';
import { GetRoomEngine } from '../room';
import { GetRoomSession } from './GetRoomSession';
import { GetSessionDataManager } from './GetSessionDataManager';
import { UserInfoData } from './UserInfoData';
export function GetBotInfoData(roomId: number, objectId: number, category: number, userData: RoomUserData): UserInfoData
{
const userInfoData = new UserInfoData(UserInfoData.BOT);
userInfoData.name = userData.name;
userInfoData.motto = userData.custom;
userInfoData.webID = userData.webID;
userInfoData.userRoomId = objectId;
userInfoData.userType = userData.type;
const roomObject = GetRoomEngine().getRoomObject(roomId, objectId, category);
if(roomObject) userInfoData.carryItem = roomObject.model.getValue<number>(RoomObjectVariable.FIGURE_CARRY_OBJECT);
userInfoData.amIOwner = GetRoomSession().isRoomOwner;
userInfoData.isGuildRoom = GetRoomSession().isGuildRoom;
userInfoData.roomControllerLevel = GetRoomSession().controllerLevel;
userInfoData.amIAnyRoomController = GetSessionDataManager().isModerator;
userInfoData.isAmbassador = GetSessionDataManager().isAmbassador;
userInfoData.badges = [ 'BOT' ];
userInfoData.figure = userData.figure;
return userInfoData;
}

View File

@ -1,7 +1,9 @@
import { IFurnitureData, Nitro, ObjectDataFactory, RoomObjectCategory, RoomObjectVariable, RoomWidgetEnumItemExtradataParameter, Vector3d } from 'nitro-renderer'; import { IFurnitureData, Nitro, ObjectDataFactory, RoomObjectCategory, RoomObjectVariable, RoomWidgetEnumItemExtradataParameter, Vector3d } from 'nitro-renderer';
import { GetRoomEngine, GetRoomSession, GetSessionDataManager } from '../../../../../api'; import { GetRoomEngine } from '../room';
import { IsOwnerOfFurniture } from '../../../../room-host/utils/IsOwnerOfFurniture';
import { FurnitureInfoData } from './FurnitureInfoData'; import { FurnitureInfoData } from './FurnitureInfoData';
import { GetRoomSession } from './GetRoomSession';
import { GetSessionDataManager } from './GetSessionDataManager';
import { IsOwnerOfFurniture } from './IsOwnerOfFurniture';
export function GetFurnitureInfoData(roomId: number, objectId: number, category: number): FurnitureInfoData export function GetFurnitureInfoData(roomId: number, objectId: number, category: number): FurnitureInfoData
{ {

View File

@ -0,0 +1,31 @@
import { RoomObjectVariable, RoomUserData } from 'nitro-renderer';
import { GetRoomEngine } from '../room';
import { GetRoomSession } from './GetRoomSession';
import { GetSessionDataManager } from './GetSessionDataManager';
import { RentableBotInfoData } from './RentableBotInfoData';
import { UserInfoData } from './UserInfoData';
export function GetRentableBotInfoData(roomId: number, objectId: number, category: number, userData: RoomUserData): RentableBotInfoData
{
const rentBotInfoData = new RentableBotInfoData(UserInfoData.BOT);
rentBotInfoData.name = userData.name;
rentBotInfoData.motto = userData.custom;
rentBotInfoData.webID = userData.webID;
rentBotInfoData.userRoomId = objectId;
rentBotInfoData.ownerId = userData.ownerId;
rentBotInfoData.ownerName = userData.ownerName;
rentBotInfoData.botSkills = userData.botSkills;
const roomObject = GetRoomEngine().getRoomObject(roomId, objectId, category);
if(roomObject) rentBotInfoData.carryItem = roomObject.model.getValue<number>(RoomObjectVariable.FIGURE_CARRY_OBJECT);
rentBotInfoData.amIOwner = GetRoomSession().isRoomOwner;
rentBotInfoData.roomControllerLevel = GetRoomSession().controllerLevel;
rentBotInfoData.amIAnyRoomController = GetSessionDataManager().isModerator;
rentBotInfoData.badges = [ 'BOT' ];
rentBotInfoData.figure = userData.figure;
return rentBotInfoData;
}

View File

@ -1,5 +1,7 @@
import { IFurnitureData, RoomObjectCategory, RoomObjectVariable } from 'nitro-renderer'; import { IFurnitureData, RoomObjectCategory, RoomObjectVariable } from 'nitro-renderer';
import { GetRoomEngine, GetRoomSession, GetSessionDataManager } from '../../../../../api'; import { GetRoomEngine } from '../room';
import { GetRoomSession } from './GetRoomSession';
import { GetSessionDataManager } from './GetSessionDataManager';
import { RoomObjectNameData } from './RoomObjectNameData'; import { RoomObjectNameData } from './RoomObjectNameData';
export function GetRoomObjectNameData(roomId: number, objectId: number, category: number): RoomObjectNameData export function GetRoomObjectNameData(roomId: number, objectId: number, category: number): RoomObjectNameData

View File

@ -1,5 +1,7 @@
import { RoomControllerLevel, RoomModerationParser, RoomObjectType, RoomObjectVariable, RoomTradingLevelEnum, RoomUserData } from 'nitro-renderer'; import { RoomControllerLevel, RoomModerationParser, RoomObjectType, RoomObjectVariable, RoomTradingLevelEnum, RoomUserData } from 'nitro-renderer';
import { GetRoomEngine, GetRoomSession, GetSessionDataManager } from '../../../../../api'; import { GetRoomEngine } from '../room';
import { GetRoomSession } from './GetRoomSession';
import { GetSessionDataManager } from './GetSessionDataManager';
import { UserInfoData } from './UserInfoData'; import { UserInfoData } from './UserInfoData';
export const _Str_18400: number = 0; export const _Str_18400: number = 0;
@ -8,9 +10,11 @@ export const _Str_13798: number = 3;
export function GetUserInfoData(roomId: number, objectId: number, category: number, userData: RoomUserData): UserInfoData export function GetUserInfoData(roomId: number, objectId: number, category: number, userData: RoomUserData): UserInfoData
{ {
const isOwnUser = false; let userDataType = UserInfoData.OWN_USER;
const userInfoData = new UserInfoData(); if(userData.webID !== GetSessionDataManager().userId) userDataType = UserInfoData.PEER;
const userInfoData = new UserInfoData(userDataType);
userInfoData.isSpectatorMode = GetRoomSession().isSpectator; userInfoData.isSpectatorMode = GetRoomSession().isSpectator;
userInfoData.name = userData.name; userInfoData.name = userData.name;
@ -24,7 +28,7 @@ export function GetUserInfoData(roomId: number, objectId: number, category: numb
if(roomObject) userInfoData.carryItem = roomObject.model.getValue<number>(RoomObjectVariable.FIGURE_CARRY_OBJECT); if(roomObject) userInfoData.carryItem = roomObject.model.getValue<number>(RoomObjectVariable.FIGURE_CARRY_OBJECT);
if(isOwnUser) if(userDataType === UserInfoData.OWN_USER)
{ {
userInfoData.realName = GetSessionDataManager().realName; userInfoData.realName = GetSessionDataManager().realName;
userInfoData.allowNameChange = GetSessionDataManager().canChangeName; userInfoData.allowNameChange = GetSessionDataManager().canChangeName;
@ -36,7 +40,7 @@ export function GetUserInfoData(roomId: number, objectId: number, category: numb
userInfoData.amIAnyRoomController = GetSessionDataManager().isModerator; userInfoData.amIAnyRoomController = GetSessionDataManager().isModerator;
userInfoData.isAmbassador = GetSessionDataManager().isAmbassador; userInfoData.isAmbassador = GetSessionDataManager().isAmbassador;
if(!isOwnUser) if(userDataType === UserInfoData.PEER)
{ {
// userInfoData.canBeAskedAsFriend = this._container.friendService.canBeAskedForAFriend(userData.webID); // userInfoData.canBeAskedAsFriend = this._container.friendService.canBeAskedForAFriend(userData.webID);

View File

@ -0,0 +1,70 @@
import { RoomAdsUpdateComposer, RoomObjectOperationType, SecurityLevel } from 'nitro-renderer';
import { GetConnection } from '../GetConnection';
import { GetRoomEngine } from '../room';
import { GetSessionDataManager } from './GetSessionDataManager';
export class FurniAction
{
public static ROTATE: string = 'FA_ROTATE';
public static MOVE: string = 'FA_MOVE';
public static PICKUP: string = 'FA_PICKUP';
public static EJECT: string = 'FA_EJECT';
public static USE: string = 'FA_USE';
public static OPEN_WELCOME_GIFT: string = 'FA_OPEN_WELCOME_GIFT';
public static SAVE_STUFF_DATA: string = 'FA_SAVE_STUFF_DATA';
}
export function ProcessFurniAction(type: string, objectId: number, category: number, offerId = -1, objectData: string = null): void
{
switch(type)
{
case FurniAction.ROTATE:
GetRoomEngine().processRoomObjectOperation(objectId, category, RoomObjectOperationType.OBJECT_ROTATE_POSITIVE);
return;
case FurniAction.MOVE:
GetRoomEngine().processRoomObjectOperation(objectId, category, RoomObjectOperationType.OBJECT_MOVE);
return;
case FurniAction.PICKUP:
GetRoomEngine().processRoomObjectOperation(objectId, category, RoomObjectOperationType.OBJECT_PICKUP);
return;
case FurniAction.EJECT:
GetRoomEngine().processRoomObjectOperation(objectId, category, RoomObjectOperationType.OBJECT_EJECT);
return;
case FurniAction.USE:
GetRoomEngine().useRoomObject(objectId, category);
return;
case FurniAction.SAVE_STUFF_DATA: {
if(objectData)
{
const mapData = new Map<string, string>();
const dataParts = objectData.split('\t');
if(dataParts)
{
for(const part of dataParts)
{
const partPieces = part.split('=', 2);
if(partPieces && partPieces.length === 2)
{
const piece1 = partPieces[0];
const piece2 = partPieces[1];
mapData.set(piece1, piece2);
}
}
}
GetRoomEngine().processRoomObjectWallOperation(objectId, category, RoomObjectOperationType.OBJECT_SAVE_STUFF_DATA, mapData);
if(GetSessionDataManager().hasSecurity(SecurityLevel.MODERATOR))
{
GetConnection().send(new RoomAdsUpdateComposer(this._widget.furniData.id, mapData));
}
mapData.clear();
}
return;
}
}
}

View File

@ -0,0 +1,194 @@
import { RoomUnitDropHandItemComposer, RoomUnitGiveHandItemComposer, RoomUserData } from 'nitro-renderer';
import { GetConnection } from '../GetConnection';
import { GetRoomSession } from './GetRoomSession';
import { GetSessionDataManager } from './GetSessionDataManager';
export class UserAction
{
public static WHISPER_USER: string = 'UA_WHISPER_USER';
public static IGNORE_USER: string = 'UA_IGNORE_USER';
public static IGNORE_USER_BUBBLE: string = 'UA_IGNORE_USER_BUBBLE';
public static UNIGNORE_USER: string = 'UA_UNIGNORE_USER';
public static KICK_USER: string = 'UA_KICK_USER';
public static BAN_USER_HOUR: string = 'UA_BAN_USER_HOUR';
public static BAN_USER_DAY: string = 'UA_BAN_USER_DAY';
public static BAN_USER_PERM: string = 'UA_BAN_USER_PERM';
public static MUTE_USER_2MIN: string = 'UA_MUTE_USER_2MIN';
public static MUTE_USER_5MIN: string = 'UA_MUTE_USER_5MIN';
public static MUTE_USER_10MIN: string = 'UA_MUTE_USER_10MIN';
public static SEND_FRIEND_REQUEST: string = 'UA_SEND_FRIEND_REQUEST';
public static RESPECT_USER: string = 'UA_RESPECT_USER';
public static GIVE_RIGHTS: string = 'UA_GIVE_RIGHTS';
public static TAKE_RIGHTS: string = 'UA_TAKE_RIGHTS';
public static START_TRADING: string = 'UA_START_TRADING';
public static OPEN_HOME_PAGE: string = 'UA_OPEN_HOME_PAGE';
public static REPORT: string = 'UA_REPORT';
public static PICKUP_PET: string = 'UA_PICKUP_PET';
public static MOUNT_PET: string = 'UA_MOUNT_PET';
public static TOGGLE_PET_RIDING_PERMISSION: string = 'UA_TOGGLE_PET_RIDING_PERMISSION';
public static TOGGLE_PET_BREEDING_PERMISSION: string = 'UA_TOGGLE_PET_BREEDING_PERMISSION';
public static DISMOUNT_PET: string = 'UA_DISMOUNT_PET';
public static SADDLE_OFF: string = 'UA_SADDLE_OFF';
public static TRAIN_PET: string = 'UA_TRAIN_PET';
public static RESPECT_PET: string = 'UA_ RESPECT_PET';
public static TREAT_PET: string = 'UA_TREAT_PET';
public static REQUEST_PET_UPDATE: string = 'UA_REQUEST_PET_UPDATE';
public static START_NAME_CHANGE: string = 'UA_START_NAME_CHANGE';
public static PASS_CARRY_ITEM: string = 'UA_PASS_CARRY_ITEM';
public static DROP_CARRY_ITEM: string = 'UA_DROP_CARRY_ITEM';
public static GIVE_CARRY_ITEM_TO_PET: string = 'UA_GIVE_CARRY_ITEM_TO_PET';
public static GIVE_WATER_TO_PET: string = 'UA_GIVE_WATER_TO_PET';
public static GIVE_LIGHT_TO_PET: string = 'UA_GIVE_LIGHT_TO_PET';
public static REQUEST_BREED_PET: string = 'UA_REQUEST_BREED_PET';
public static HARVEST_PET: string = 'UA_HARVEST_PET';
public static REVIVE_PET: string = 'UA_REVIVE_PET';
public static COMPOST_PLANT: string = 'UA_COMPOST_PLANT';
public static GET_BOT_INFO: string = 'UA_GET_BOT_INFO';
public static REPORT_CFH_OTHER: string = 'UA_REPORT_CFH_OTHER';
public static AMBASSADOR_ALERT_USER: string = 'UA_AMBASSADOR_ALERT_USER';
public static AMBASSADOR_KICK_USER: string = 'UA_AMBASSADOR_KICK_USER';
public static AMBASSADOR_MUTE_USER_2MIN: string = 'UA_AMBASSADOR_MUTE_2MIN';
public static AMBASSADOR_MUTE_USER_10MIN: string = 'UA_AMBASSADOR_MUTE_10MIN';
public static AMBASSADOR_MUTE_USER_60MIN: string = 'UA_AMBASSADOR_MUTE_60MIN';
public static AMBASSADOR_MUTE_USER_18HOUR: string = 'UA_AMBASSADOR_MUTE_18HOUR';
}
export function ProcessUserAction(userId: number, type: string): void
{
let userData: RoomUserData = null;
const petMessages = [
UserAction.REQUEST_PET_UPDATE,
UserAction.RESPECT_PET,
UserAction.PICKUP_PET,
UserAction.MOUNT_PET,
UserAction.TOGGLE_PET_RIDING_PERMISSION,
UserAction.TOGGLE_PET_BREEDING_PERMISSION,
UserAction.DISMOUNT_PET,
UserAction.SADDLE_OFF,
UserAction.GIVE_CARRY_ITEM_TO_PET,
UserAction.GIVE_WATER_TO_PET,
UserAction.GIVE_LIGHT_TO_PET,
UserAction.TREAT_PET
];
if(petMessages.indexOf(type) >= 0)
{
userData = GetRoomSession().userDataManager.getPetData(userId);
}
else
{
userData = GetRoomSession().userDataManager.getUserData(userId);
}
if(!userData) return
switch(type)
{
case UserAction.RESPECT_USER:
GetSessionDataManager().giveRespect(userId);
return;
case UserAction.RESPECT_PET:
GetSessionDataManager().givePetRespect(userId);
return;
// case UserAction.WHISPER_USER:
// this._container.events.dispatchEvent(new RoomWidgetChatInputContentUpdateEvent(RoomWidgetChatInputContentUpdateEvent.WHISPER, userData.name));
// return;
case UserAction.IGNORE_USER:
GetSessionDataManager().ignoreUser(userData.name);
return;
case UserAction.UNIGNORE_USER:
GetSessionDataManager().unignoreUser(userData.name);
return;
case UserAction.KICK_USER:
GetRoomSession().sendKickMessage(userId);
return;
case UserAction.BAN_USER_DAY:
case UserAction.BAN_USER_HOUR:
case UserAction.BAN_USER_PERM:
GetRoomSession().sendBanMessage(userId, type);
return;
case UserAction.MUTE_USER_2MIN:
GetRoomSession().sendMuteMessage(userId, 2);
return;
case UserAction.MUTE_USER_5MIN:
GetRoomSession().sendMuteMessage(userId, 5);
return;
case UserAction.MUTE_USER_10MIN:
GetRoomSession().sendMuteMessage(userId, 10);
return;
case UserAction.GIVE_RIGHTS:
GetRoomSession().sendGiveRightsMessage(userId);
return;
case UserAction.TAKE_RIGHTS:
GetRoomSession().sendTakeRightsMessage(userId);
return;
// case UserAction.START_TRADING:
// if(userData) this._widget.inventoryTrading.startTrade(userData.roomIndex, userData.name);
// return;
// case UserAction.OPEN_HOME_PAGE:
// GetSessionDataManager()._Str_21275(userId, _local_3.name);
// return;
// case UserAction.PICKUP_PET:
// GetRoomSession()._Str_13781(_local_2);
// return;
// case UserAction.MOUNT_PET:
// GetRoomSession()._Str_21066(_local_2);
// return;
// case UserAction.TOGGLE_PET_RIDING_PERMISSION:
// GetRoomSession()._Str_21025(_local_2);
// return;
// case UserAction.TOGGLE_PET_BREEDING_PERMISSION:
// GetRoomSession()._Str_21562(_local_2);
// return;
// case UserAction.DISMOUNT_PET:
// GetRoomSession()._Str_19075(_local_2);
// return;
// case UserAction.SADDLE_OFF:
// GetRoomSession()._Str_21635(_local_2);
// return;
case UserAction.PASS_CARRY_ITEM:
GetConnection().send(new RoomUnitGiveHandItemComposer(userId));
return;
// case UserAction.GIVE_CARRY_ITEM_TO_PET:
// GetConnection().send(new RoomUnitGiveHandItemPetComposer(userId));
// return;
// case UserAction.GIVE_WATER_TO_PET:
// GetConnection().send(new _Str_7251(_local_2, PetSupplementEnum._Str_9473));
// return;
// case UserAction.GIVE_LIGHT_TO_PET:
// GetConnection().send(new _Str_7251(_local_2, PetSupplementEnum._Str_8421));
// return;
// case UserAction.TREAT_PET:
// GetConnection().send(new _Str_8184(_local_2));
// return;
case UserAction.DROP_CARRY_ITEM:
GetConnection().send(new RoomUnitDropHandItemComposer());
return;
case UserAction.REQUEST_PET_UPDATE:
GetRoomSession().userDataManager.requestPetInfo(userId);
return;
case UserAction.REPORT:
return;
case UserAction.REPORT_CFH_OTHER:
return;
case UserAction.AMBASSADOR_ALERT_USER:
GetRoomSession().sendAmbassadorAlertMessage(userId);
return;
case UserAction.AMBASSADOR_KICK_USER:
GetRoomSession().sendKickMessage(userId);
return;
case UserAction.AMBASSADOR_MUTE_USER_2MIN:
GetRoomSession().sendMuteMessage(userId, 2);
return;
case UserAction.AMBASSADOR_MUTE_USER_10MIN:
GetRoomSession().sendMuteMessage(userId, 10);
return;
case UserAction.AMBASSADOR_MUTE_USER_60MIN:
GetRoomSession().sendMuteMessage(userId, 60);
return;
case UserAction.AMBASSADOR_MUTE_USER_18HOUR:
GetRoomSession().sendMuteMessage(userId, 1080);
return;
}
}

View File

@ -0,0 +1,17 @@
export class RentableBotInfoData
{
constructor(
public name: string = '',
public motto: string = '',
public webID: number = 0,
public figure: string = '',
public badges: string[] = [],
public carryItem: number = 0,
public userRoomId: number = 0,
public amIOwner: boolean = false,
public amIAnyRoomController: boolean = false,
public roomControllerLevel: number = 0,
public ownerId: number = -1,
public ownerName: string = '',
public botSkills: number[] = []) {}
}

View File

@ -1,6 +1,11 @@
export class UserInfoData export class UserInfoData
{ {
public static OWN_USER: string = 'UID_OWN_USER';
public static PEER: string = 'UID_PEER';
public static BOT: string = 'UID_BOT';
constructor( constructor(
public type: string,
public name: string = '', public name: string = '',
public motto: string = '', public motto: string = '',
public achievementScore: number = 0, public achievementScore: number = 0,

View File

@ -1,6 +1,20 @@
export * from './CanManipulateFurniture';
export * from './FurnitureInfoData';
export * from './GetBotInfoData';
export * from './GetFurnitureDataForProductOffer'; export * from './GetFurnitureDataForProductOffer';
export * from './GetFurnitureInfoData';
export * from './GetProductDataForLocalization';
export * from './GetRentableBotInfoData';
export * from './GetRoomObjectNameData';
export * from './GetRoomSession'; export * from './GetRoomSession';
export * from './GetRoomSessionManager'; export * from './GetRoomSessionManager';
export * from './GetSessionDataManager'; export * from './GetSessionDataManager';
export * from './GetUserInfoData';
export * from './IsOwnerOfFurniture';
export * from './ProcessFurniAction';
export * from './ProcessUserAction';
export * from './RentableBotInfoData';
export * from './RoomObjectNameData';
export * from './SendChatTypingMessage'; export * from './SendChatTypingMessage';
export * from './StartRoomSession'; export * from './StartRoomSession';
export * from './UserInfoData';

View File

@ -1,7 +1,9 @@
import { EventDispatcher, IEventDispatcher, IRoomSession, RoomBackgroundColorEvent, RoomEngineDimmerStateEvent, RoomEngineEvent, RoomEngineObjectEvent, RoomId, RoomObjectCategory, RoomObjectHSLColorEnabledEvent, RoomObjectOperationType, RoomSessionEvent, RoomZoomEvent } from 'nitro-renderer'; import { EventDispatcher, IEventDispatcher, IRoomSession, RoomBackgroundColorEvent, RoomEngineDimmerStateEvent, RoomEngineEvent, RoomEngineObjectEvent, RoomId, RoomObjectCategory, RoomObjectHSLColorEnabledEvent, RoomObjectOperationType, RoomSessionEvent, RoomZoomEvent } from 'nitro-renderer';
import { FC, useCallback, useState } from 'react'; import { FC, useCallback, useState } from 'react';
import { IsFurnitureSelectionDisabled } from '../../api/nitro/room/IsFurnitureSelectionDisabled';
import { ProcessRoomObjectOperation } from '../../api/nitro/room/ProcessRoomObjectOperation'; import { ProcessRoomObjectOperation } from '../../api/nitro/room/ProcessRoomObjectOperation';
import { SetActiveRoomId } from '../../api/nitro/room/SetActiveRoomId'; import { SetActiveRoomId } from '../../api/nitro/room/SetActiveRoomId';
import { CanManipulateFurniture } from '../../api/nitro/session/CanManipulateFurniture';
import { GetRoomSession } from '../../api/nitro/session/GetRoomSession'; import { GetRoomSession } from '../../api/nitro/session/GetRoomSession';
import { StartRoomSession } from '../../api/nitro/session/StartRoomSession'; import { StartRoomSession } from '../../api/nitro/session/StartRoomSession';
import { useRoomEngineEvent } from '../../hooks/events/nitro/room/room-engine-event'; import { useRoomEngineEvent } from '../../hooks/events/nitro/room/room-engine-event';
@ -10,8 +12,6 @@ import { RoomErrorHandler } from '../room-error-handler/RoomErrorHandler';
import { RoomView } from '../room/RoomView'; import { RoomView } from '../room/RoomView';
import { RoomWidgetRoomEngineUpdateEvent, RoomWidgetRoomObjectUpdateEvent } from '../room/widgets/events'; import { RoomWidgetRoomEngineUpdateEvent, RoomWidgetRoomObjectUpdateEvent } from '../room/widgets/events';
import { RoomHostViewProps } from './RoomHostView.types'; import { RoomHostViewProps } from './RoomHostView.types';
import { CanManipulateFurniture } from './utils/CanManipulateFurniture';
import { IsFurnitureSelectionDisabled } from './utils/IsFurnitureSelectionDisabled';
export const RoomHostView: FC<RoomHostViewProps> = props => export const RoomHostView: FC<RoomHostViewProps> = props =>
{ {