mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-01-19 05:46:27 +01:00
changes
This commit is contained in:
parent
ebd88e491d
commit
4895ca72c4
@ -1,4 +1,4 @@
|
|||||||
import { RoomSettingsParser } from '@nitrots/nitro-renderer';
|
import { RoomSettingsDataParser } from '@nitrots/nitro-renderer';
|
||||||
|
|
||||||
export class RoomSettingsData
|
export class RoomSettingsData
|
||||||
{
|
{
|
||||||
@ -36,41 +36,43 @@ export class RoomSettingsData
|
|||||||
public bannedUsers: any[];
|
public bannedUsers: any[];
|
||||||
public selectedUserToUnban: number;
|
public selectedUserToUnban: number;
|
||||||
|
|
||||||
constructor(parser: RoomSettingsParser)
|
constructor(parser: RoomSettingsDataParser)
|
||||||
{
|
{
|
||||||
if(!parser) throw new Error('invalid_parser');
|
if(!parser) throw new Error('invalid_parser');
|
||||||
|
|
||||||
this.roomId = parser.roomId;
|
const data = parser.data;
|
||||||
this.roomName = parser.name;
|
|
||||||
this.roomOriginalName = parser.name;
|
|
||||||
this.roomDescription = parser.description;
|
|
||||||
this.categoryId = parser.categoryId;
|
|
||||||
this.userCount = parser.userCount;
|
|
||||||
this.tags = parser.tags;
|
|
||||||
this.tradeState = parser.tradeMode;
|
|
||||||
this.allowWalkthrough = parser.allowWalkthrough;
|
|
||||||
|
|
||||||
this.lockState = parser.state;
|
this.roomId = data.roomId;
|
||||||
this.originalLockState = parser.state;
|
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.password = null;
|
||||||
this.confirmPassword = null;
|
this.confirmPassword = null;
|
||||||
this.allowPets = parser.allowPets;
|
this.allowPets = data.allowPets;
|
||||||
this.allowPetsEat = parser.allowPetsEat;
|
this.allowPetsEat = data.allowFoodConsume;
|
||||||
|
|
||||||
this.usersWithRights = new Map<number, string>();
|
this.usersWithRights = new Map<number, string>();
|
||||||
|
|
||||||
this.hideWalls = parser.hideWalls;
|
this.hideWalls = data.hideWalls;
|
||||||
this.wallThickness = parser.thicknessWall;
|
this.wallThickness = data.wallThickness;
|
||||||
this.floorThickness = parser.thicknessFloor;
|
this.floorThickness = data.floorThickness;
|
||||||
this.chatBubbleMode = parser.chatSettings.mode;
|
this.chatBubbleMode = data.chatSettings.mode;
|
||||||
this.chatBubbleWeight = parser.chatSettings.weight;
|
this.chatBubbleWeight = data.chatSettings.weight;
|
||||||
this.chatBubbleSpeed = parser.chatSettings.speed;
|
this.chatBubbleSpeed = data.chatSettings.speed;
|
||||||
this.chatFloodProtection = parser.chatSettings.protection;
|
this.chatFloodProtection = data.chatSettings.protection;
|
||||||
this.chatDistance = parser.chatSettings.distance;
|
this.chatDistance = data.chatSettings.distance;
|
||||||
|
|
||||||
this.muteState = parser.moderationSettings.allowMute;
|
this.muteState = data.roomModerationSettings.allowMute;
|
||||||
this.kickState = parser.moderationSettings.allowKick;
|
this.kickState = data.roomModerationSettings.allowKick;
|
||||||
this.banState = parser.moderationSettings.allowBan;
|
this.banState = data.roomModerationSettings.allowBan;
|
||||||
this.bannedUsers = [];
|
this.bannedUsers = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user