This commit is contained in:
dank074 2022-03-25 17:26:16 -05:00
parent 777bc066af
commit 0888710d36

View File

@ -103,19 +103,22 @@ export const InfoStandWidgetFurniView: FC<InfoStandWidgetFurniViewProps> = props
} }
} }
const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, furniData.id, (furniData.isWallItem) ? RoomObjectCategory.WALL : RoomObjectCategory.FLOOR); if(godMode)
if(roomObject)
{ {
const customVariables = roomObject.model.getValue<string[]>(RoomObjectVariable.FURNITURE_CUSTOM_VARIABLES); const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, furniData.id, (furniData.isWallItem) ? RoomObjectCategory.WALL : RoomObjectCategory.FLOOR);
const furnitureData = roomObject.model.getValue<{ [index: string]: string }>(RoomObjectVariable.FURNITURE_DATA);
if(customVariables && customVariables.length) if(roomObject)
{ {
for(const customVariable of customVariables) const customVariables = roomObject.model.getValue<string[]>(RoomObjectVariable.FURNITURE_CUSTOM_VARIABLES);
const furnitureData = roomObject.model.getValue<{ [index: string]: string }>(RoomObjectVariable.FURNITURE_DATA);
if(customVariables && customVariables.length)
{ {
customKeyss.push(customVariable); for(const customVariable of customVariables)
customValuess.push((furnitureData[customVariable]) || ''); {
customKeyss.push(customVariable);
customValuess.push((furnitureData[customVariable]) || '');
}
} }
} }
} }