mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 07:26:19 +00:00
🆙 Init V3
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
export class DoorStateType
|
||||
{
|
||||
public static NONE: number = 0;
|
||||
public static START_DOORBELL: number = 1;
|
||||
public static START_PASSWORD: number = 2;
|
||||
public static STATE_PENDING_SERVER: number = 3;
|
||||
public static UPDATE_STATE: number = 4;
|
||||
public static STATE_WAITING: number = 5;
|
||||
public static STATE_NO_ANSWER: number = 6;
|
||||
public static STATE_WRONG_PASSWORD: number = 7;
|
||||
public static STATE_ACCEPTED: number = 8;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { RoomDataParser } from '@nitrots/nitro-renderer';
|
||||
|
||||
export interface INavigatorData
|
||||
{
|
||||
homeRoomId: number;
|
||||
settingsReceived: boolean;
|
||||
enteredGuestRoom: RoomDataParser;
|
||||
currentRoomOwner: boolean;
|
||||
currentRoomId: number;
|
||||
currentRoomIsStaffPick: boolean;
|
||||
createdFlatId: number;
|
||||
avatarId: number;
|
||||
roomPicker: boolean;
|
||||
eventMod: boolean;
|
||||
currentRoomRating: number;
|
||||
canRate: boolean;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export interface INavigatorSearchFilter
|
||||
{
|
||||
name: string;
|
||||
query: string;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
export interface IRoomChatSettings
|
||||
{
|
||||
mode: number;
|
||||
weight: number;
|
||||
speed: number;
|
||||
distance: number;
|
||||
protection: number;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { IRoomChatSettings } from './IRoomChatSettings';
|
||||
import { IRoomModerationSettings } from './IRoomModerationSettings';
|
||||
|
||||
export interface IRoomData
|
||||
{
|
||||
roomId: number;
|
||||
roomName: string;
|
||||
roomDescription: string;
|
||||
categoryId: number;
|
||||
userCount: number;
|
||||
tags: string[];
|
||||
tradeState: number;
|
||||
allowWalkthrough: boolean;
|
||||
lockState: number;
|
||||
password: string;
|
||||
allowPets: boolean;
|
||||
allowPetsEat: boolean;
|
||||
hideWalls: boolean;
|
||||
wallThickness: number;
|
||||
floorThickness: number;
|
||||
chatSettings: IRoomChatSettings;
|
||||
moderationSettings: IRoomModerationSettings;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export interface IRoomModel
|
||||
{
|
||||
clubLevel: number;
|
||||
tileSize: number;
|
||||
name: string;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export interface IRoomModerationSettings
|
||||
{
|
||||
allowMute: number;
|
||||
allowKick: number;
|
||||
allowBan: number;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export class NavigatorSearchResultViewDisplayMode
|
||||
{
|
||||
public static readonly LIST: number = 0;
|
||||
public static readonly THUMBNAILS: number = 1;
|
||||
public static readonly FORCED_THUMBNAILS: number = 2;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
import { RoomDataParser } from '@nitrots/nitro-renderer';
|
||||
|
||||
export class RoomInfoData
|
||||
{
|
||||
private _enteredGuestRoom: RoomDataParser = null;
|
||||
private _createdRoomId: number = 0;
|
||||
private _currentRoomId: number = 0;
|
||||
private _currentRoomOwner: boolean = false;
|
||||
private _canRate: boolean = false;
|
||||
|
||||
public get enteredGuestRoom(): RoomDataParser
|
||||
{
|
||||
return this._enteredGuestRoom;
|
||||
}
|
||||
|
||||
public set enteredGuestRoom(data: RoomDataParser)
|
||||
{
|
||||
this._enteredGuestRoom = data;
|
||||
}
|
||||
|
||||
public get createdRoomId(): number
|
||||
{
|
||||
return this._createdRoomId;
|
||||
}
|
||||
|
||||
public set createdRoomId(id: number)
|
||||
{
|
||||
this._createdRoomId = id;
|
||||
}
|
||||
|
||||
public get currentRoomId(): number
|
||||
{
|
||||
return this._currentRoomId;
|
||||
}
|
||||
|
||||
public set currentRoomId(id: number)
|
||||
{
|
||||
this._currentRoomId = id;
|
||||
}
|
||||
|
||||
public get currentRoomOwner(): boolean
|
||||
{
|
||||
return this._currentRoomOwner;
|
||||
}
|
||||
|
||||
public set currentRoomOwner(flag: boolean)
|
||||
{
|
||||
this._currentRoomOwner = flag;
|
||||
}
|
||||
|
||||
public get canRate(): boolean
|
||||
{
|
||||
return this._canRate;
|
||||
}
|
||||
|
||||
public set canRate(flag: boolean)
|
||||
{
|
||||
this._canRate = flag;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
const BuildMaxVisitorsList = () =>
|
||||
{
|
||||
const list: number[] = [];
|
||||
|
||||
for(let i = 10; i <= 100; i = i + 10) list.push(i);
|
||||
|
||||
return list;
|
||||
};
|
||||
|
||||
export const GetMaxVisitorsList = BuildMaxVisitorsList();
|
||||
@@ -0,0 +1,24 @@
|
||||
import { INavigatorSearchFilter } from './INavigatorSearchFilter';
|
||||
|
||||
export const SearchFilterOptions: INavigatorSearchFilter[] = [
|
||||
{
|
||||
name: 'anything',
|
||||
query: null
|
||||
},
|
||||
{
|
||||
name: 'room.name',
|
||||
query: 'roomname'
|
||||
},
|
||||
{
|
||||
name: 'owner',
|
||||
query: 'owner'
|
||||
},
|
||||
{
|
||||
name: 'tag',
|
||||
query: 'tag'
|
||||
},
|
||||
{
|
||||
name: 'group',
|
||||
query: 'group'
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,7 @@
|
||||
import { GetGuestRoomMessageComposer } from '@nitrots/nitro-renderer';
|
||||
import { SendMessageComposer } from '../nitro';
|
||||
|
||||
export function TryVisitRoom(roomId: number): void
|
||||
{
|
||||
SendMessageComposer(new GetGuestRoomMessageComposer(roomId, false, true));
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
export * from './DoorStateType';
|
||||
export * from './INavigatorData';
|
||||
export * from './INavigatorSearchFilter';
|
||||
export * from './IRoomChatSettings';
|
||||
export * from './IRoomData';
|
||||
export * from './IRoomModel';
|
||||
export * from './IRoomModerationSettings';
|
||||
export * from './NavigatorSearchResultViewDisplayMode';
|
||||
export * from './RoomInfoData';
|
||||
export * from './RoomSettingsUtils';
|
||||
export * from './SearchFilterOptions';
|
||||
export * from './TryVisitRoom';
|
||||
Reference in New Issue
Block a user