mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 15:36:18 +00:00
🆙 Init V3
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { GetRoomEngine, GetSessionDataManager, RoomEngineObjectEvent, RoomObjectVariable } from '@nitrots/nitro-renderer';
|
||||
|
||||
export function IsFurnitureSelectionDisabled(event: RoomEngineObjectEvent): boolean
|
||||
{
|
||||
let result = false;
|
||||
|
||||
const roomObject = GetRoomEngine().getRoomObject(event.roomId, event.objectId, event.category);
|
||||
|
||||
if(roomObject)
|
||||
{
|
||||
const selectionDisabled = (roomObject.model.getValue<number>(RoomObjectVariable.FURNITURE_SELECTION_DISABLED) === 1);
|
||||
|
||||
if(selectionDisabled)
|
||||
{
|
||||
result = true;
|
||||
|
||||
if(GetSessionDataManager().isModerator) result = false;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user