You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 07:26:18 +00:00
Move to Renderer V2
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": [ "@nitrots/eslint-config" ]
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
# Only exists if Bazel was run
|
||||
/bazel-out
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# profiling files
|
||||
chrome-profiler-events*.json
|
||||
speed-measure-plugin*.json
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history/*
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
testem.log
|
||||
/typings
|
||||
.git
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
*.zip
|
||||
*.as
|
||||
*.bin
|
||||
@@ -0,0 +1 @@
|
||||
export * from './src';
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "@nitrots/events",
|
||||
"description": "Nitro events module",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0",
|
||||
"scripts": {
|
||||
"build": "vite build",
|
||||
"compile": "tsc --project ./tsconfig.json --noEmit false",
|
||||
"eslint": "eslint ./src --fix"
|
||||
},
|
||||
"main": "./index",
|
||||
"dependencies": {
|
||||
"@nitrots/api": "1.0.0",
|
||||
"@nitrots/eslint-config": "1.0.0",
|
||||
"@nitrots/utils": "1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "~5.4.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
import { IEventDispatcher, INitroEvent } from '@nitrots/api';
|
||||
import { NitroLogger } from '@nitrots/utils';
|
||||
|
||||
export class EventDispatcher implements IEventDispatcher
|
||||
{
|
||||
private _listeners: Map<string, Function[]> = new Map();
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
this.removeAllListeners();
|
||||
}
|
||||
|
||||
public addEventListener<T extends INitroEvent>(type: string, callback: (event: T) => void): void
|
||||
{
|
||||
if(!type || !callback) return;
|
||||
|
||||
const existing = this._listeners.get(type);
|
||||
|
||||
if(!existing)
|
||||
{
|
||||
this._listeners.set(type, [callback]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
existing.push(callback);
|
||||
}
|
||||
|
||||
public removeEventListener(type: string, callback: Function): void
|
||||
{
|
||||
if(!type || !callback) return;
|
||||
|
||||
const existing = this._listeners.get(type);
|
||||
|
||||
if(!existing || !existing.length) return;
|
||||
|
||||
for(const [i, cb] of existing.entries())
|
||||
{
|
||||
if(!cb || (cb !== callback)) continue;
|
||||
|
||||
existing.splice(i, 1);
|
||||
|
||||
if(!existing.length) this._listeners.delete(type);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public dispatchEvent<T extends INitroEvent>(event: T): boolean
|
||||
{
|
||||
if(!event) return false;
|
||||
|
||||
NitroLogger.events('Dispatched Event', event.type);
|
||||
|
||||
this.processEvent(event);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private processEvent<T extends INitroEvent>(event: T): void
|
||||
{
|
||||
const existing = this._listeners.get(event.type);
|
||||
|
||||
if(!existing || !existing.length) return;
|
||||
|
||||
const callbacks: Function[] = [];
|
||||
|
||||
for(const callback of existing)
|
||||
{
|
||||
if(!callback) continue;
|
||||
|
||||
callbacks.push(callback);
|
||||
}
|
||||
|
||||
while(callbacks.length)
|
||||
{
|
||||
const callback = callbacks.shift();
|
||||
|
||||
try
|
||||
{
|
||||
(callback as Function)(event);
|
||||
}
|
||||
|
||||
catch (err)
|
||||
{
|
||||
NitroLogger.error(err.stack);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public removeAllListeners(): void
|
||||
{
|
||||
this._listeners.clear();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { EventDispatcher } from './EventDispatcher';
|
||||
|
||||
const eventDispatcher = new EventDispatcher();
|
||||
|
||||
export const GetEventDispatcher = () => eventDispatcher;
|
||||
@@ -0,0 +1,16 @@
|
||||
export class NitroEventType
|
||||
{
|
||||
public static readonly CONFIG_LOADED = 'CONFIG_LOADED';
|
||||
public static readonly CONFIG_FAILED = 'CONFIG_FAILED';
|
||||
public static readonly LOCALIZATION_LOADED = 'LOCALIZATION_LOADED';
|
||||
public static readonly LOCALIZATION_FAILED = 'LOCALIZATION_FAILED';
|
||||
public static readonly SOCKET_OPENED = 'SOCKET_OPENED';
|
||||
public static readonly SOCKET_CLOSED = 'SOCKET_CLOSED';
|
||||
public static readonly SOCKET_ERROR = 'SOCKET_ERROR';
|
||||
public static readonly SOCKET_CONNECTED = 'SOCKET_CONNECTED';
|
||||
public static readonly AVATAR_ASSET_DOWNLOADED = 'AVATAR_ASSET_DOWNLOADED';
|
||||
public static readonly AVATAR_ASSET_LOADED = 'AVATAR_ASSET_LOADED';
|
||||
public static readonly AVATAR_EFFECT_DOWNLOADED = 'AVATAR_EFFECT_DOWNLOADED';
|
||||
public static readonly AVATAR_EFFECT_LOADED = 'AVATAR_EFFECT_LOADED';
|
||||
public static readonly FURNITURE_DATA_LOADED = 'FURNITURE_DATA_LOADED';
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
import { NitroEvent } from './core';
|
||||
|
||||
export class NitroSettingsEvent extends NitroEvent
|
||||
{
|
||||
public static SETTINGS_UPDATED: string = 'NSE_SETTINGS_UPDATED';
|
||||
|
||||
private _volumeSystem: number;
|
||||
private _volumeFurni: number;
|
||||
private _volumeTrax: number;
|
||||
private _oldChat: boolean;
|
||||
private _roomInvites: boolean;
|
||||
private _cameraFollow: boolean;
|
||||
private _flags: number;
|
||||
private _chatType: number;
|
||||
|
||||
constructor()
|
||||
{
|
||||
super(NitroSettingsEvent.SETTINGS_UPDATED);
|
||||
}
|
||||
|
||||
public clone(): NitroSettingsEvent
|
||||
{
|
||||
const clone = new NitroSettingsEvent();
|
||||
|
||||
clone._volumeSystem = this._volumeSystem;
|
||||
clone._volumeFurni = this._volumeFurni;
|
||||
clone._volumeTrax = this._volumeTrax;
|
||||
clone._oldChat = this._oldChat;
|
||||
clone._roomInvites = this._roomInvites;
|
||||
clone._cameraFollow = this._cameraFollow;
|
||||
clone._flags = this._flags;
|
||||
clone._chatType = this._chatType;
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
||||
public get volumeSystem(): number
|
||||
{
|
||||
return this._volumeSystem;
|
||||
}
|
||||
|
||||
public set volumeSystem(volume: number)
|
||||
{
|
||||
this._volumeSystem = volume;
|
||||
}
|
||||
|
||||
public get volumeFurni(): number
|
||||
{
|
||||
return this._volumeFurni;
|
||||
}
|
||||
|
||||
public set volumeFurni(volume: number)
|
||||
{
|
||||
this._volumeFurni = volume;
|
||||
}
|
||||
|
||||
public get volumeTrax(): number
|
||||
{
|
||||
return this._volumeTrax;
|
||||
}
|
||||
|
||||
public set volumeTrax(volume: number)
|
||||
{
|
||||
this._volumeTrax = volume;
|
||||
}
|
||||
|
||||
public get oldChat(): boolean
|
||||
{
|
||||
return this._oldChat;
|
||||
}
|
||||
|
||||
public set oldChat(value: boolean)
|
||||
{
|
||||
this._oldChat = value;
|
||||
}
|
||||
|
||||
public get roomInvites(): boolean
|
||||
{
|
||||
return this._roomInvites;
|
||||
}
|
||||
|
||||
public set roomInvites(value: boolean)
|
||||
{
|
||||
this._roomInvites = value;
|
||||
}
|
||||
|
||||
public get cameraFollow(): boolean
|
||||
{
|
||||
return this._cameraFollow;
|
||||
}
|
||||
|
||||
public set cameraFollow(value: boolean)
|
||||
{
|
||||
this._cameraFollow = value;
|
||||
}
|
||||
|
||||
public get flags(): number
|
||||
{
|
||||
return this._flags;
|
||||
}
|
||||
|
||||
public set flags(flags: number)
|
||||
{
|
||||
this._flags = flags;
|
||||
}
|
||||
|
||||
public get chatType(): number
|
||||
{
|
||||
return this._chatType;
|
||||
}
|
||||
|
||||
public set chatType(type: number)
|
||||
{
|
||||
this._chatType = type;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { NitroEvent } from './core';
|
||||
|
||||
export class NitroSoundEvent extends NitroEvent
|
||||
{
|
||||
public static PLAY_SOUND: string = 'NSOE_PLAY_SOUND';
|
||||
|
||||
private _sampleCode: string;
|
||||
|
||||
constructor(type: string, sampleCode: string)
|
||||
{
|
||||
super(type);
|
||||
this._sampleCode = sampleCode;
|
||||
}
|
||||
|
||||
public get sampleCode(): string
|
||||
{
|
||||
return this._sampleCode;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { NitroToolbarEvent } from './NitroToolbarEvent';
|
||||
|
||||
export class NitroToolbarAnimateIconEvent extends NitroToolbarEvent
|
||||
{
|
||||
public static ANIMATE_ICON: string = 'NTAIE_ANIMATE_ICON';
|
||||
|
||||
private _image: HTMLImageElement;
|
||||
private _x: number;
|
||||
private _y: number;
|
||||
|
||||
constructor(image: HTMLImageElement, x: number, y: number)
|
||||
{
|
||||
super(NitroToolbarAnimateIconEvent.ANIMATE_ICON);
|
||||
|
||||
this._image = image;
|
||||
this._x = x;
|
||||
this._y = y;
|
||||
}
|
||||
|
||||
public get image(): HTMLImageElement
|
||||
{
|
||||
return this._image;
|
||||
}
|
||||
|
||||
public get x(): number
|
||||
{
|
||||
return this._x;
|
||||
}
|
||||
|
||||
public get y(): number
|
||||
{
|
||||
return this._y;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import { NitroEvent } from './core';
|
||||
|
||||
export class NitroToolbarEvent extends NitroEvent
|
||||
{
|
||||
public static TOOLBAR_CLICK: string = 'NTE_TOOLBAR_CLICK';
|
||||
public static SELECT_OWN_AVATAR: string = 'NTE_SELECT_OWN_AVATAR';
|
||||
|
||||
private _iconId: string;
|
||||
private _iconName: string;
|
||||
|
||||
constructor(type: string)
|
||||
{
|
||||
super(type);
|
||||
}
|
||||
|
||||
public get iconId(): string
|
||||
{
|
||||
return this._iconId;
|
||||
}
|
||||
|
||||
public set iconId(id: string)
|
||||
{
|
||||
this._iconId = id;
|
||||
}
|
||||
|
||||
public get iconName(): string
|
||||
{
|
||||
return this._iconName;
|
||||
}
|
||||
|
||||
public set iconName(name: string)
|
||||
{
|
||||
this._iconName = name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { IEffectAssetDownloadLibrary } from '@nitrots/api';
|
||||
import { NitroEvent } from '../core';
|
||||
|
||||
export class AvatarRenderEffectLibraryEvent extends NitroEvent
|
||||
{
|
||||
public static DOWNLOAD_COMPLETE: string = 'ARELE_DOWNLOAD_COMPLETE';
|
||||
|
||||
private _library: IEffectAssetDownloadLibrary;
|
||||
|
||||
constructor(type: string, library: IEffectAssetDownloadLibrary)
|
||||
{
|
||||
super(type);
|
||||
|
||||
this._library = library;
|
||||
}
|
||||
|
||||
public get library(): IEffectAssetDownloadLibrary
|
||||
{
|
||||
return this._library;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { IAvatarAssetDownloadLibrary } from '@nitrots/api';
|
||||
import { NitroEvent } from '../core';
|
||||
|
||||
export class AvatarRenderLibraryEvent extends NitroEvent
|
||||
{
|
||||
public static DOWNLOAD_COMPLETE: string = 'ARLE_DOWNLOAD_COMPLETE';
|
||||
|
||||
private _library: IAvatarAssetDownloadLibrary;
|
||||
|
||||
constructor(type: string, library: IAvatarAssetDownloadLibrary)
|
||||
{
|
||||
super(type);
|
||||
|
||||
this._library = library;
|
||||
}
|
||||
|
||||
public get library(): IAvatarAssetDownloadLibrary
|
||||
{
|
||||
return this._library;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from './AvatarRenderEffectLibraryEvent';
|
||||
export * from './AvatarRenderLibraryEvent';
|
||||
@@ -0,0 +1,11 @@
|
||||
import { NitroEvent } from '../core';
|
||||
|
||||
export class RoomCameraWidgetManagerEvent extends NitroEvent
|
||||
{
|
||||
public static INITIALIZED: string = 'RCWM_INITIALIZED';
|
||||
|
||||
constructor(type: string)
|
||||
{
|
||||
super(type);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from './RoomCameraWidgetManagerEvent';
|
||||
@@ -0,0 +1,27 @@
|
||||
import { IConnection } from '@nitrots/api';
|
||||
import { NitroEvent } from '../core';
|
||||
|
||||
export class NitroCommunicationDemoEvent extends NitroEvent
|
||||
{
|
||||
public static CONNECTION_ESTABLISHED = 'NCE_ESTABLISHED';
|
||||
public static CONNECTION_CLOSED = 'NCE_CLOSED';
|
||||
public static CONNECTION_ERROR = 'NCE_ERROR';
|
||||
public static CONNECTION_HANDSHAKING = 'NCE_HANDSHAKING';
|
||||
public static CONNECTION_HANDSHAKED = 'NCE_HANDSHAKED';
|
||||
public static CONNECTION_HANDSHAKE_FAILED = 'NCE_HANDSHAKE_FAILED';
|
||||
public static CONNECTION_AUTHENTICATED = 'NCE_AUTHENTICATED';
|
||||
|
||||
private _connection: IConnection;
|
||||
|
||||
constructor(type: string, connection: IConnection)
|
||||
{
|
||||
super(type);
|
||||
|
||||
this._connection = connection;
|
||||
}
|
||||
|
||||
public get connection(): IConnection
|
||||
{
|
||||
return this._connection;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from './NitroCommunicationDemoEvent';
|
||||
@@ -0,0 +1,12 @@
|
||||
import { NitroEvent } from './NitroEvent';
|
||||
|
||||
export class ConfigurationEvent extends NitroEvent
|
||||
{
|
||||
public static LOADED: string = 'NCE_LOADED';
|
||||
public static FAILED: string = 'NCE_FAILED';
|
||||
|
||||
constructor(type: string)
|
||||
{
|
||||
super(type);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
import { IConnection, IMessageEvent, IMessageParser } from '@nitrots/api';
|
||||
|
||||
export class MessageEvent implements IMessageEvent
|
||||
{
|
||||
private _callBack: Function;
|
||||
private _parserClass: Function;
|
||||
private _parser: IMessageParser;
|
||||
private _connection: IConnection;
|
||||
|
||||
constructor(callBack: Function, parser: { new(): IMessageParser })
|
||||
{
|
||||
this._callBack = callBack;
|
||||
this._parserClass = parser;
|
||||
this._parser = null;
|
||||
this._connection = null;
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
this._callBack = null;
|
||||
this._parserClass = null;
|
||||
this._parser = null;
|
||||
this._connection = null;
|
||||
}
|
||||
|
||||
public get callBack(): Function
|
||||
{
|
||||
return this._callBack;
|
||||
}
|
||||
|
||||
public get parserClass(): Function
|
||||
{
|
||||
return this._parserClass;
|
||||
}
|
||||
|
||||
public get parser(): IMessageParser
|
||||
{
|
||||
return this._parser;
|
||||
}
|
||||
|
||||
public set parser(parser: IMessageParser)
|
||||
{
|
||||
this._parser = parser;
|
||||
}
|
||||
|
||||
public get connection(): IConnection
|
||||
{
|
||||
return this._connection;
|
||||
}
|
||||
|
||||
public set connection(connection: IConnection)
|
||||
{
|
||||
this._connection = connection;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { INitroEvent } from '@nitrots/api';
|
||||
|
||||
export class NitroEvent implements INitroEvent
|
||||
{
|
||||
private _type: string;
|
||||
|
||||
constructor(type: string)
|
||||
{
|
||||
this._type = type;
|
||||
}
|
||||
|
||||
public get type(): string
|
||||
{
|
||||
return this._type;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { IConnection } from '@nitrots/api';
|
||||
import { NitroEvent } from './NitroEvent';
|
||||
|
||||
export class SocketConnectionEvent extends NitroEvent
|
||||
{
|
||||
public static CONNECTION_OPENED = 'SCE_OPEN';
|
||||
public static CONNECTION_CLOSED = 'SCE_CLOSED';
|
||||
public static CONNECTION_ERROR = 'SCE_ERROR';
|
||||
public static CONNECTION_MESSAGE = 'SCE_MESSAGE';
|
||||
|
||||
private _connection: IConnection;
|
||||
private _originalEvent: Event;
|
||||
|
||||
constructor(type: string, connection: IConnection, originalEvent: Event)
|
||||
{
|
||||
super(type);
|
||||
|
||||
this._connection = connection;
|
||||
this._originalEvent = event;
|
||||
}
|
||||
|
||||
public get connection(): IConnection
|
||||
{
|
||||
return this._connection;
|
||||
}
|
||||
|
||||
public get originalEvent(): Event
|
||||
{
|
||||
return this._originalEvent;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export * from './ConfigurationEvent';
|
||||
export * from './MessageEvent';
|
||||
export * from './NitroEvent';
|
||||
export * from './SocketConnectionEvent';
|
||||
@@ -0,0 +1,14 @@
|
||||
export * from './EventDispatcher';
|
||||
export * from './GetEventDispatcher';
|
||||
export * from './NitroEventType';
|
||||
export * from './NitroSettingsEvent';
|
||||
export * from './NitroSoundEvent';
|
||||
export * from './NitroToolbarAnimateIconEvent';
|
||||
export * from './NitroToolbarEvent';
|
||||
export * from './avatar';
|
||||
export * from './camera';
|
||||
export * from './communication';
|
||||
export * from './core';
|
||||
export * from './room';
|
||||
export * from './session';
|
||||
export * from './sound';
|
||||
@@ -0,0 +1,34 @@
|
||||
import { RoomEngineEvent } from './RoomEngineEvent';
|
||||
|
||||
export class RoomBackgroundColorEvent extends RoomEngineEvent
|
||||
{
|
||||
public static ROOM_COLOR: string = 'REE_ROOM_COLOR';
|
||||
|
||||
private _color: number;
|
||||
private _brightness: number;
|
||||
private _bgOnly: boolean;
|
||||
|
||||
constructor(roomId: number, color: number, _arg_3: number, _arg_4: boolean)
|
||||
{
|
||||
super(RoomBackgroundColorEvent.ROOM_COLOR, roomId);
|
||||
|
||||
this._color = color;
|
||||
this._brightness = _arg_3;
|
||||
this._bgOnly = _arg_4;
|
||||
}
|
||||
|
||||
public get color(): number
|
||||
{
|
||||
return this._color;
|
||||
}
|
||||
|
||||
public get brightness(): number
|
||||
{
|
||||
return this._brightness;
|
||||
}
|
||||
|
||||
public get bgOnly(): boolean
|
||||
{
|
||||
return this._bgOnly;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { NitroEvent } from '../core';
|
||||
|
||||
export class RoomContentLoadedEvent extends NitroEvent
|
||||
{
|
||||
public static RCLE_SUCCESS: string = 'RCLE_SUCCESS';
|
||||
public static RCLE_FAILURE: string = 'RCLE_FAILURE';
|
||||
public static RCLE_CANCEL: string = 'RCLE_CANCEL';
|
||||
|
||||
private _contentType: string;
|
||||
|
||||
constructor(type: string, contentType: string)
|
||||
{
|
||||
super(type);
|
||||
|
||||
this._contentType = contentType;
|
||||
}
|
||||
|
||||
public get contentType(): string
|
||||
{
|
||||
return this._contentType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { RoomEngineEvent } from './RoomEngineEvent';
|
||||
|
||||
export class RoomDragEvent extends RoomEngineEvent
|
||||
{
|
||||
public static ROOM_DRAG: string = 'RDE_ROOM_DRAG';
|
||||
|
||||
private _offsetX: number;
|
||||
private _offsetY: number;
|
||||
|
||||
constructor(roomId: number, offsetX: number, offsetY: number)
|
||||
{
|
||||
super(RoomDragEvent.ROOM_DRAG, roomId);
|
||||
|
||||
this._offsetX = offsetX;
|
||||
this._offsetY = offsetY;
|
||||
}
|
||||
|
||||
public get offsetX(): number
|
||||
{
|
||||
return this._offsetX;
|
||||
}
|
||||
|
||||
public get offsetY(): number
|
||||
{
|
||||
return this._offsetY;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
import { RoomEngineEvent } from './RoomEngineEvent';
|
||||
|
||||
export class RoomEngineDimmerStateEvent extends RoomEngineEvent
|
||||
{
|
||||
public static ROOM_COLOR: string = 'REDSE_ROOM_COLOR';
|
||||
|
||||
private _state: number;
|
||||
private _presetId: number;
|
||||
private _effectId: number;
|
||||
private _color: number;
|
||||
private _brightness: number;
|
||||
|
||||
constructor(k: number, state: number, presetId: number, effectId: number, color: number, brightness: number)
|
||||
{
|
||||
super(RoomEngineDimmerStateEvent.ROOM_COLOR, k);
|
||||
|
||||
this._state = state;
|
||||
this._presetId = presetId;
|
||||
this._effectId = effectId;
|
||||
this._color = color;
|
||||
this._brightness = brightness;
|
||||
}
|
||||
|
||||
public get state(): number
|
||||
{
|
||||
return this._state;
|
||||
}
|
||||
|
||||
public get presetId(): number
|
||||
{
|
||||
return this._presetId;
|
||||
}
|
||||
|
||||
public get effectId(): number
|
||||
{
|
||||
return this._effectId;
|
||||
}
|
||||
|
||||
public get color(): number
|
||||
{
|
||||
return this._color;
|
||||
}
|
||||
|
||||
public get brightness(): number
|
||||
{
|
||||
return this._brightness;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { NitroEvent } from '../core';
|
||||
|
||||
export class RoomEngineEvent extends NitroEvent
|
||||
{
|
||||
public static INITIALIZED: string = 'REE_INITIALIZED';
|
||||
public static ENGINE_INITIALIZED: string = 'REE_ENGINE_INITIALIZED';
|
||||
public static OBJECTS_INITIALIZED: string = 'REE_OBJECTS_INITIALIZED';
|
||||
public static NORMAL_MODE: string = 'REE_NORMAL_MODE';
|
||||
public static GAME_MODE: string = 'REE_GAME_MODE';
|
||||
public static ROOM_ZOOMED: string = 'REE_ROOM_ZOOMED';
|
||||
public static DISPOSED: string = 'REE_DISPOSED';
|
||||
|
||||
private _roomId: number;
|
||||
|
||||
constructor(type: string, roomId: number)
|
||||
{
|
||||
super(type);
|
||||
|
||||
this._roomId = roomId;
|
||||
}
|
||||
|
||||
public get roomId(): number
|
||||
{
|
||||
return this._roomId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
import { RoomEngineEvent } from './RoomEngineEvent';
|
||||
|
||||
export class RoomEngineObjectEvent extends RoomEngineEvent
|
||||
{
|
||||
public static SELECTED: string = 'REOE_SELECTED';
|
||||
public static DESELECTED: string = 'REOE_DESELECTED';
|
||||
public static ADDED: string = 'REOE_ADDED';
|
||||
public static REMOVED: string = 'REOE_REMOVED';
|
||||
public static PLACED: string = 'REOE_PLACED';
|
||||
public static PLACED_ON_USER: string = 'REOE_PLACED_ON_USER';
|
||||
public static CONTENT_UPDATED: string = 'REOE_CONTENT_UPDATED';
|
||||
public static REQUEST_MOVE: string = 'REOE_REQUEST_MOVE';
|
||||
public static REQUEST_ROTATE: string = 'REOE_REQUEST_ROTATE';
|
||||
public static REQUEST_MANIPULATION: string = 'REOE_REQUEST_MANIPULATION';
|
||||
public static MOUSE_ENTER: string = 'REOE_MOUSE_ENTER';
|
||||
public static MOUSE_LEAVE: string = 'REOE_MOUSE_LEAVE';
|
||||
public static DOUBLE_CLICK: string = 'REOE_DOUBLE_CLICK';
|
||||
|
||||
private _objectId: number;
|
||||
private _category: number;
|
||||
|
||||
constructor(type: string, roomId: number, objectId: number, category: number)
|
||||
{
|
||||
super(type, roomId);
|
||||
|
||||
this._objectId = objectId;
|
||||
this._category = category;
|
||||
}
|
||||
|
||||
public get objectId(): number
|
||||
{
|
||||
return this._objectId;
|
||||
}
|
||||
|
||||
public get category(): number
|
||||
{
|
||||
return this._category;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
import { RoomEngineObjectEvent } from './RoomEngineObjectEvent';
|
||||
|
||||
export class RoomEngineObjectPlacedEvent extends RoomEngineObjectEvent
|
||||
{
|
||||
private _wallLocation: string = '';
|
||||
private _x: number = 0;
|
||||
private _y: number = 0;
|
||||
private _z: number = 0;
|
||||
private _direction: number = 0;
|
||||
private _placedInRoom: boolean = false;
|
||||
private _placedOnFloor: boolean = false;
|
||||
private _placedOnWall: boolean = false;
|
||||
private _instanceData: string = null;
|
||||
|
||||
constructor(type: string, roomId: number, objectId: number, category: number, wallLocation: string, x: number, y: number, z: number, direction: number, placedInRoom: boolean, placedOnFloor: boolean, placedOnWall: boolean, instanceData: string)
|
||||
{
|
||||
super(type, roomId, objectId, category);
|
||||
|
||||
this._wallLocation = wallLocation;
|
||||
this._x = x;
|
||||
this._y = y;
|
||||
this._z = z;
|
||||
this._direction = direction;
|
||||
this._placedInRoom = placedInRoom;
|
||||
this._placedOnFloor = placedOnFloor;
|
||||
this._placedOnWall = placedOnWall;
|
||||
this._instanceData = instanceData;
|
||||
}
|
||||
|
||||
public get wallLocation(): string
|
||||
{
|
||||
return this._wallLocation;
|
||||
}
|
||||
|
||||
public get x(): number
|
||||
{
|
||||
return this._x;
|
||||
}
|
||||
|
||||
public get y(): number
|
||||
{
|
||||
return this._y;
|
||||
}
|
||||
|
||||
public get z(): number
|
||||
{
|
||||
return this._z;
|
||||
}
|
||||
|
||||
public get direction(): number
|
||||
{
|
||||
return this._direction;
|
||||
}
|
||||
|
||||
public get placedInRoom(): boolean
|
||||
{
|
||||
return this._placedInRoom;
|
||||
}
|
||||
|
||||
public get placedOnFloor(): boolean
|
||||
{
|
||||
return this._placedOnFloor;
|
||||
}
|
||||
|
||||
public get placedOnWall(): boolean
|
||||
{
|
||||
return this._placedOnWall;
|
||||
}
|
||||
|
||||
public get instanceData(): string
|
||||
{
|
||||
return this._instanceData;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import { RoomEngineObjectEvent } from './RoomEngineObjectEvent';
|
||||
|
||||
export class RoomEngineObjectPlacedOnUserEvent extends RoomEngineObjectEvent
|
||||
{
|
||||
private _droppedObjectId: number;
|
||||
private _droppedObjectCategory: number;
|
||||
|
||||
constructor(k: string, roomId: number, objectId: number, category: number, droppedObjectId: number, droppedObjectCategory: number)
|
||||
{
|
||||
super(k, roomId, objectId, category);
|
||||
|
||||
this._droppedObjectId = droppedObjectId;
|
||||
this._droppedObjectCategory = droppedObjectCategory;
|
||||
}
|
||||
|
||||
public get droppedObjectId(): number
|
||||
{
|
||||
return this._droppedObjectId;
|
||||
}
|
||||
|
||||
public get droppedObjectCategory(): number
|
||||
{
|
||||
return this._droppedObjectCategory;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { RoomEngineObjectEvent } from './RoomEngineObjectEvent';
|
||||
|
||||
export class RoomEngineObjectPlaySoundEvent extends RoomEngineObjectEvent
|
||||
{
|
||||
public static PLAY_SOUND: string = 'REOPSE_PLAY_SOUND';
|
||||
public static PLAY_SOUND_AT_PITCH: string = 'REOPSE_PLAY_SOUND_AT_PITCH';
|
||||
|
||||
private _soundId: string;
|
||||
private _pitch: number;
|
||||
|
||||
constructor(type: string, roomId: number, objectId: number, objectCategory: number, soundId: string, pitch: number = 1)
|
||||
{
|
||||
super(type, roomId, objectId, objectCategory);
|
||||
|
||||
this._soundId = soundId;
|
||||
this._pitch = pitch;
|
||||
}
|
||||
|
||||
public get soundId(): string
|
||||
{
|
||||
return this._soundId;
|
||||
}
|
||||
|
||||
public get pitch(): number
|
||||
{
|
||||
return this._pitch;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { RoomEngineObjectEvent } from './RoomEngineObjectEvent';
|
||||
|
||||
export class RoomEngineRoomAdEvent extends RoomEngineObjectEvent
|
||||
{
|
||||
public static FURNI_CLICK: string = 'RERAE_FURNI_CLICK';
|
||||
public static FURNI_DOUBLE_CLICK: string = 'RERAE_FURNI_DOUBLE_CLICK';
|
||||
public static TOOLTIP_SHOW: string = 'RERAE_TOOLTIP_SHOW';
|
||||
public static TOOLTIP_HIDE: string = 'RERAE_TOOLTIP_HIDE';
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import { RoomEngineObjectEvent } from './RoomEngineObjectEvent';
|
||||
|
||||
export class RoomEngineSamplePlaybackEvent extends RoomEngineObjectEvent
|
||||
{
|
||||
public static ROOM_OBJECT_INITIALIZED: string = 'ROPSPE_ROOM_OBJECT_INITIALIZED';
|
||||
public static ROOM_OBJECT_DISPOSED: string = 'ROPSPE_ROOM_OBJECT_DISPOSED';
|
||||
public static PLAY_SAMPLE: string = 'ROPSPE_PLAY_SAMPLE';
|
||||
public static CHANGE_PITCH: string = 'ROPSPE_CHANGE_PITCH';
|
||||
|
||||
private _sampleId: number;
|
||||
private _pitch: number;
|
||||
|
||||
constructor(k: string, roomId: number, objectId: number, objectCategory: number, sampleId: number, pitch: number = 1)
|
||||
{
|
||||
super(k, roomId, objectId, objectCategory);
|
||||
|
||||
this._sampleId = sampleId;
|
||||
this._pitch = pitch;
|
||||
}
|
||||
|
||||
public get sampleId(): number
|
||||
{
|
||||
return this._sampleId;
|
||||
}
|
||||
|
||||
public get pitch(): number
|
||||
{
|
||||
return this._pitch;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
import { RoomEngineObjectEvent } from './RoomEngineObjectEvent';
|
||||
|
||||
export class RoomEngineTriggerWidgetEvent extends RoomEngineObjectEvent
|
||||
{
|
||||
public static OPEN_WIDGET: string = 'RETWE_OPEN_WIDGET';
|
||||
public static CLOSE_WIDGET: string = 'RETWE_CLOSE_WIDGET';
|
||||
public static OPEN_FURNI_CONTEXT_MENU: string = 'RETWE_OPEN_FURNI_CONTEXT_MENU';
|
||||
public static CLOSE_FURNI_CONTEXT_MENU: string = 'RETWE_CLOSE_FURNI_CONTEXT_MENU';
|
||||
public static REQUEST_PLACEHOLDER: string = 'RETWE_REQUEST_PLACEHOLDER';
|
||||
public static REQUEST_CREDITFURNI: string = 'RETWE_REQUEST_CREDITFURNI';
|
||||
public static REQUEST_STACK_HEIGHT: string = 'RETWE_REQUEST_STACK_HEIGHT';
|
||||
public static REQUEST_EXTERNAL_IMAGE: string = 'RETWE_REQUEST_EXTERNAL_IMAGE';
|
||||
public static REQUEST_STICKIE: string = 'RETWE_REQUEST_STICKIE';
|
||||
public static REQUEST_PRESENT: string = 'RETWE_REQUEST_PRESENT';
|
||||
public static REQUEST_TROPHY: string = 'RETWE_REQUEST_TROPHY';
|
||||
public static REQUEST_TEASER: string = 'RETWE_REQUEST_TEASER';
|
||||
public static REQUEST_ECOTRONBOX: string = 'RETWE_REQUEST_ECOTRONBOX';
|
||||
public static REQUEST_DIMMER: string = 'RETWE_REQUEST_DIMMER';
|
||||
public static REMOVE_DIMMER: string = 'RETWE_REMOVE_DIMMER';
|
||||
public static REQUEST_CLOTHING_CHANGE: string = 'RETWE_REQUEST_CLOTHING_CHANGE';
|
||||
public static REQUEST_PLAYLIST_EDITOR: string = 'RETWE_REQUEST_PLAYLIST_EDITOR';
|
||||
public static REQUEST_MANNEQUIN: string = 'RETWE_REQUEST_MANNEQUIN';
|
||||
public static REQUEST_MONSTERPLANT_SEED_PLANT_CONFIRMATION_DIALOG: string = 'ROWRE_REQUEST_MONSTERPLANT_SEED_PLANT_CONFIRMATION_DIALOG';
|
||||
public static REQUEST_PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG: string = 'ROWRE_REQUEST_PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG';
|
||||
public static REQUEST_BACKGROUND_COLOR: string = 'RETWE_REQUEST_BACKGROUND_COLOR';
|
||||
public static REQUEST_MYSTERYBOX_OPEN_DIALOG: string = 'RETWE_REQUEST_MYSTERYBOX_OPEN_DIALOG';
|
||||
public static REQUEST_EFFECTBOX_OPEN_DIALOG: string = 'RETWE_REQUEST_EFFECTBOX_OPEN_DIALOG';
|
||||
public static REQUEST_MYSTERYTROPHY_OPEN_DIALOG: string = 'RETWE_REQUEST_MYSTERYTROPHY_OPEN_DIALOG';
|
||||
public static REQUEST_ACHIEVEMENT_RESOLUTION_ENGRAVING: string = 'RETWE_REQUEST_ACHIEVEMENT_RESOLUTION_ENGRAVING';
|
||||
public static REQUEST_ACHIEVEMENT_RESOLUTION_FAILED: string = 'RETWE_REQUEST_ACHIEVEMENT_RESOLUTION_FAILED';
|
||||
public static REQUEST_FRIEND_FURNITURE_CONFIRM: string = 'RETWE_REQUEST_FRIEND_FURNITURE_CONFIRM';
|
||||
public static REQUEST_FRIEND_FURNITURE_ENGRAVING: string = 'RETWE_REQUEST_FRIEND_FURNITURE_ENGRAVING';
|
||||
public static REQUEST_BADGE_DISPLAY_ENGRAVING: string = 'RETWE_REQUEST_BADGE_DISPLAY_ENGRAVING';
|
||||
public static REQUEST_HIGH_SCORE_DISPLAY: string = 'RETWE_REQUEST_HIGH_SCORE_DISPLAY';
|
||||
public static REQUEST_HIDE_HIGH_SCORE_DISPLAY: string = 'RETWE_REQUEST_HIDE_HIGH_SCORE_DISPLAY';
|
||||
public static REQUEST_INTERNAL_LINK: string = 'RETWE_REQUEST_INTERNAL_LINK';
|
||||
public static REQUEST_ROOM_LINK: string = 'RETWE_REQUEST_ROOM_LINK';
|
||||
public static REQUEST_YOUTUBE: string = 'RETWE_REQUEST_YOUTUBE';
|
||||
|
||||
private _widget: string;
|
||||
|
||||
constructor(type: string, roomId: number, objectId: number, category: number, widget: string = null)
|
||||
{
|
||||
super(type, roomId, objectId, category);
|
||||
|
||||
this._widget = widget;
|
||||
}
|
||||
|
||||
public get widget(): string
|
||||
{
|
||||
return this._widget;
|
||||
}
|
||||
|
||||
public get contextMenu(): string
|
||||
{
|
||||
return this._widget;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { RoomEngineObjectEvent } from './RoomEngineObjectEvent';
|
||||
|
||||
export class RoomEngineUseProductEvent extends RoomEngineObjectEvent
|
||||
{
|
||||
public static USE_PRODUCT_FROM_ROOM: string = 'REUPE_USE_PRODUCT_FROM_ROOM';
|
||||
public static USE_PRODUCT_FROM_INVENTORY: string = 'REUPE_USE_PRODUCT_FROM_INVENTORY';
|
||||
|
||||
private _inventoryStripId: number;
|
||||
private _furnitureTypeId: number;
|
||||
|
||||
constructor(type: string, roomId: number, objectId: number, category: number, inventoryStripId = -1, furnitureTypeId = -1)
|
||||
{
|
||||
super(type, roomId, objectId, category);
|
||||
|
||||
this._inventoryStripId = inventoryStripId;
|
||||
this._furnitureTypeId = furnitureTypeId;
|
||||
}
|
||||
|
||||
public get inventoryStripId(): number
|
||||
{
|
||||
return this._inventoryStripId;
|
||||
}
|
||||
|
||||
public get furnitureTypeId(): number
|
||||
{
|
||||
return this._furnitureTypeId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { IRoomObject } from '@nitrots/api';
|
||||
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||
|
||||
export class RoomObjectBadgeAssetEvent extends RoomObjectEvent
|
||||
{
|
||||
public static LOAD_BADGE: string = 'ROBAE_LOAD_BADGE';
|
||||
|
||||
private _badgeId: string;
|
||||
private _groupBadge: boolean;
|
||||
|
||||
constructor(k: string, _arg_2: IRoomObject, badgeId: string, groupBadge: boolean = true)
|
||||
{
|
||||
super(k, _arg_2);
|
||||
|
||||
this._badgeId = badgeId;
|
||||
this._groupBadge = groupBadge;
|
||||
}
|
||||
|
||||
public get badgeId(): string
|
||||
{
|
||||
return this._badgeId;
|
||||
}
|
||||
|
||||
public get groupBadge(): boolean
|
||||
{
|
||||
return this._groupBadge;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { IRoomObject } from '@nitrots/api';
|
||||
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||
|
||||
export class RoomObjectDataRequestEvent extends RoomObjectEvent
|
||||
{
|
||||
public static RODRE_CURRENT_USER_ID: string = 'RODRE_CURRENT_USER_ID';
|
||||
public static RODRE_URL_PREFIX: string = 'RODRE_URL_PREFIX';
|
||||
|
||||
constructor(type: string, object: IRoomObject)
|
||||
{
|
||||
super(type, object);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
import { IRoomObject } from '@nitrots/api';
|
||||
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||
|
||||
export class RoomObjectDimmerStateUpdateEvent extends RoomObjectEvent
|
||||
{
|
||||
public static DIMMER_STATE: string = 'RODSUE_DIMMER_STATE';
|
||||
|
||||
private _state: number;
|
||||
private _presetId: number;
|
||||
private _effectId: number;
|
||||
private _color: number;
|
||||
private _brightness: number;
|
||||
|
||||
constructor(object: IRoomObject, state: number, presetId: number, effectId: number, color: number, brightness: number)
|
||||
{
|
||||
super(RoomObjectDimmerStateUpdateEvent.DIMMER_STATE, object);
|
||||
|
||||
this._state = state;
|
||||
this._presetId = presetId;
|
||||
this._effectId = effectId;
|
||||
this._color = color;
|
||||
this._brightness = brightness;
|
||||
}
|
||||
|
||||
public get state(): number
|
||||
{
|
||||
return this._state;
|
||||
}
|
||||
|
||||
public get presetId(): number
|
||||
{
|
||||
return this._presetId;
|
||||
}
|
||||
|
||||
public get effectId(): number
|
||||
{
|
||||
return this._effectId;
|
||||
}
|
||||
|
||||
public get color(): number
|
||||
{
|
||||
return this._color;
|
||||
}
|
||||
|
||||
public get brightness(): number
|
||||
{
|
||||
return this._brightness;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import { IRoomObject } from '@nitrots/api';
|
||||
import { NitroEvent } from '../core';
|
||||
|
||||
export class RoomObjectEvent extends NitroEvent
|
||||
{
|
||||
private _object: IRoomObject;
|
||||
|
||||
constructor(type: string, object: IRoomObject)
|
||||
{
|
||||
super(type);
|
||||
|
||||
this._object = object;
|
||||
}
|
||||
|
||||
public get object(): IRoomObject
|
||||
{
|
||||
return this._object;
|
||||
}
|
||||
|
||||
public get objectId(): number
|
||||
{
|
||||
if(!this._object) return -1;
|
||||
|
||||
return this._object.id;
|
||||
}
|
||||
|
||||
public get objectType(): string
|
||||
{
|
||||
if(!this._object) return null;
|
||||
|
||||
return this._object.type;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { IRoomObject } from '@nitrots/api';
|
||||
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||
|
||||
export class RoomObjectFloorHoleEvent extends RoomObjectEvent
|
||||
{
|
||||
public static ADD_HOLE: string = 'ROFHO_ADD_HOLE';
|
||||
public static REMOVE_HOLE: string = 'ROFHO_REMOVE_HOLE';
|
||||
|
||||
constructor(k: string, _arg_2: IRoomObject)
|
||||
{
|
||||
super(k, _arg_2);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||
|
||||
export class RoomObjectFurnitureActionEvent extends RoomObjectEvent
|
||||
{
|
||||
public static DICE_OFF: string = 'ROFCAE_DICE_OFF';
|
||||
public static DICE_ACTIVATE: string = 'ROFCAE_DICE_ACTIVATE';
|
||||
public static USE_HABBOWHEEL: string = 'ROFCAE_USE_HABBOWHEEL';
|
||||
public static STICKIE: string = 'ROFCAE_STICKIE';
|
||||
public static ENTER_ONEWAYDOOR: string = 'ROFCAE_ENTER_ONEWAYDOOR';
|
||||
public static SOUND_MACHINE_INIT: string = 'ROFCAE_SOUND_MACHINE_INIT';
|
||||
public static SOUND_MACHINE_START: string = 'ROFCAE_SOUND_MACHINE_START';
|
||||
public static SOUND_MACHINE_STOP: string = 'ROFCAE_SOUND_MACHINE_STOP';
|
||||
public static SOUND_MACHINE_DISPOSE: string = 'ROFCAE_SOUND_MACHINE_DISPOSE';
|
||||
public static JUKEBOX_INIT: string = 'ROFCAE_JUKEBOX_INIT';
|
||||
public static JUKEBOX_START: string = 'ROFCAE_JUKEBOX_START';
|
||||
public static JUKEBOX_MACHINE_STOP: string = 'ROFCAE_JUKEBOX_MACHINE_STOP';
|
||||
public static JUKEBOX_DISPOSE: string = 'ROFCAE_JUKEBOX_DISPOSE';
|
||||
public static MOUSE_BUTTON: string = 'ROFCAE_MOUSE_BUTTON';
|
||||
public static MOUSE_ARROW: string = 'ROFCAE_MOUSE_ARROW';
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
import { IRoomObject } from '@nitrots/api';
|
||||
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||
|
||||
export class RoomObjectHSLColorEnableEvent extends RoomObjectEvent
|
||||
{
|
||||
public static ROOM_BACKGROUND_COLOR: string = 'ROHSLCEE_ROOM_BACKGROUND_COLOR';
|
||||
|
||||
private _enable: boolean;
|
||||
private _hue: number;
|
||||
private _saturation: number;
|
||||
private _lightness: number;
|
||||
|
||||
constructor(k: string, _arg_2: IRoomObject, _arg_3: boolean, _arg_4: number, _arg_5: number, _arg_6: number)
|
||||
{
|
||||
super(k, _arg_2);
|
||||
|
||||
this._enable = _arg_3;
|
||||
this._hue = _arg_4;
|
||||
this._saturation = _arg_5;
|
||||
this._lightness = _arg_6;
|
||||
}
|
||||
|
||||
public get enable(): boolean
|
||||
{
|
||||
return this._enable;
|
||||
}
|
||||
|
||||
public get hue(): number
|
||||
{
|
||||
return this._hue;
|
||||
}
|
||||
|
||||
public get saturation(): number
|
||||
{
|
||||
return this._saturation;
|
||||
}
|
||||
|
||||
public get lightness(): number
|
||||
{
|
||||
return this._lightness;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
import { RoomEngineEvent } from './RoomEngineEvent';
|
||||
|
||||
export class RoomObjectHSLColorEnabledEvent extends RoomEngineEvent
|
||||
{
|
||||
public static ROOM_BACKGROUND_COLOR: string = 'ROHSLCEE_ROOM_BACKGROUND_COLOR';
|
||||
|
||||
private _enable: boolean;
|
||||
private _hue: number;
|
||||
private _saturation: number;
|
||||
private _lightness: number;
|
||||
|
||||
constructor(k: string, _arg_2: number, _arg_3: boolean, _arg_4: number, _arg_5: number, _arg_6: number)
|
||||
{
|
||||
super(k, _arg_2);
|
||||
|
||||
this._enable = _arg_3;
|
||||
this._hue = _arg_4;
|
||||
this._saturation = _arg_5;
|
||||
this._lightness = _arg_6;
|
||||
}
|
||||
|
||||
public get enable(): boolean
|
||||
{
|
||||
return this._enable;
|
||||
}
|
||||
|
||||
public get hue(): number
|
||||
{
|
||||
return this._hue;
|
||||
}
|
||||
|
||||
public get saturation(): number
|
||||
{
|
||||
return this._saturation;
|
||||
}
|
||||
|
||||
public get lightness(): number
|
||||
{
|
||||
return this._lightness;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
import { IRoomObject } from '@nitrots/api';
|
||||
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||
|
||||
export class RoomObjectMouseEvent extends RoomObjectEvent
|
||||
{
|
||||
public static CLICK: string = 'ROE_MOUSE_CLICK';
|
||||
public static DOUBLE_CLICK: string = 'ROE_MOUSE_DOUBLE_CLICK';
|
||||
public static MOUSE_MOVE: string = 'ROE_MOUSE_MOVE';
|
||||
public static MOUSE_DOWN: string = 'ROE_MOUSE_DOWN';
|
||||
public static MOUSE_DOWN_LONG: string = 'ROE_MOUSE_DOWN_LONG';
|
||||
public static MOUSE_UP: string = 'ROE_MOUSE_UP';
|
||||
public static MOUSE_ENTER: string = 'ROE_MOUSE_ENTER';
|
||||
public static MOUSE_LEAVE: string = 'ROE_MOUSE_LEAVE';
|
||||
|
||||
private _eventId: string = '';
|
||||
private _altKey: boolean;
|
||||
private _ctrlKey: boolean;
|
||||
private _shiftKey: boolean;
|
||||
private _buttonDown: boolean;
|
||||
private _localX: number;
|
||||
private _localY: number;
|
||||
private _spriteOffsetX: number;
|
||||
private _spriteOffsetY: number;
|
||||
|
||||
constructor(type: string, object: IRoomObject, eventId: string, altKey: boolean = false, ctrlKey: boolean = false, shiftKey: boolean = false, buttonDown: boolean = false)
|
||||
{
|
||||
super(type, object);
|
||||
|
||||
this._eventId = eventId;
|
||||
this._altKey = altKey;
|
||||
this._ctrlKey = ctrlKey;
|
||||
this._shiftKey = shiftKey;
|
||||
this._buttonDown = buttonDown;
|
||||
}
|
||||
|
||||
public get eventId(): string
|
||||
{
|
||||
return this._eventId;
|
||||
}
|
||||
|
||||
public get altKey(): boolean
|
||||
{
|
||||
return this._altKey;
|
||||
}
|
||||
|
||||
public get ctrlKey(): boolean
|
||||
{
|
||||
return this._ctrlKey;
|
||||
}
|
||||
|
||||
public get shiftKey(): boolean
|
||||
{
|
||||
return this._shiftKey;
|
||||
}
|
||||
|
||||
public get buttonDown(): boolean
|
||||
{
|
||||
return this._buttonDown;
|
||||
}
|
||||
|
||||
public get localX(): number
|
||||
{
|
||||
return this._localX;
|
||||
}
|
||||
|
||||
public set localX(k: number)
|
||||
{
|
||||
this._localX = k;
|
||||
}
|
||||
|
||||
public get localY(): number
|
||||
{
|
||||
return this._localY;
|
||||
}
|
||||
|
||||
public set localY(k: number)
|
||||
{
|
||||
this._localY = k;
|
||||
}
|
||||
|
||||
public get spriteOffsetX(): number
|
||||
{
|
||||
return this._spriteOffsetX;
|
||||
}
|
||||
|
||||
public set spriteOffsetX(k: number)
|
||||
{
|
||||
this._spriteOffsetX = k;
|
||||
}
|
||||
|
||||
public get spriteOffsetY(): number
|
||||
{
|
||||
return this._spriteOffsetY;
|
||||
}
|
||||
|
||||
public set spriteOffsetY(k: number)
|
||||
{
|
||||
this._spriteOffsetY = k;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { IRoomObject } from '@nitrots/api';
|
||||
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||
|
||||
export class RoomObjectMoveEvent extends RoomObjectEvent
|
||||
{
|
||||
public static POSITION_CHANGED: string = 'ROME_POSITION_CHANGED';
|
||||
public static OBJECT_REMOVED: string = 'ROME_OBJECT_REMOVED';
|
||||
|
||||
constructor(k: string, _arg_2: IRoomObject)
|
||||
{
|
||||
super(k, _arg_2);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import { IRoomObject } from '@nitrots/api';
|
||||
import { RoomObjectFurnitureActionEvent } from './RoomObjectFurnitureActionEvent';
|
||||
|
||||
export class RoomObjectPlaySoundIdEvent extends RoomObjectFurnitureActionEvent
|
||||
{
|
||||
public static PLAY_SOUND: string = 'ROPSIE_PLAY_SOUND';
|
||||
public static PLAY_SOUND_AT_PITCH: string = 'ROPSIE_PLAY_SOUND_AT_PITCH';
|
||||
|
||||
private _soundId: string;
|
||||
private _pitch: number;
|
||||
|
||||
constructor(type: string, object: IRoomObject, soundId: string, pitch: number = 1)
|
||||
{
|
||||
super(type, object);
|
||||
|
||||
this._soundId = soundId;
|
||||
this._pitch = pitch;
|
||||
}
|
||||
|
||||
public get soundId(): string
|
||||
{
|
||||
return this._soundId;
|
||||
}
|
||||
|
||||
public get pitch(): number
|
||||
{
|
||||
return this._pitch;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import { IRoomObject } from '@nitrots/api';
|
||||
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||
|
||||
export class RoomObjectRoomAdEvent extends RoomObjectEvent
|
||||
{
|
||||
public static ROOM_AD_LOAD_IMAGE: string = 'RORAE_ROOM_AD_LOAD_IMAGE';
|
||||
public static ROOM_AD_FURNI_CLICK: string = 'RORAE_ROOM_AD_FURNI_CLICK';
|
||||
public static ROOM_AD_FURNI_DOUBLE_CLICK: string = 'RORAE_ROOM_AD_FURNI_DOUBLE_CLICK';
|
||||
public static ROOM_AD_TOOLTIP_SHOW: string = 'RORAE_ROOM_AD_TOOLTIP_SHOW';
|
||||
public static ROOM_AD_TOOLTIP_HIDE: string = 'RORAE_ROOM_AD_TOOLTIP_HIDE';
|
||||
|
||||
private _imageUrl: string = '';
|
||||
private _clickUrl: string = '';
|
||||
|
||||
constructor(type: string, object: IRoomObject, imageUrl: string = '', clickUrl: string = '')
|
||||
{
|
||||
super(type, object);
|
||||
|
||||
this._imageUrl = imageUrl;
|
||||
this._clickUrl = clickUrl;
|
||||
}
|
||||
|
||||
public get imageUrl(): string
|
||||
{
|
||||
return this._imageUrl;
|
||||
}
|
||||
|
||||
public get clickUrl(): string
|
||||
{
|
||||
return this._clickUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { IRoomObject } from '@nitrots/api';
|
||||
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||
|
||||
export class RoomObjectSamplePlaybackEvent extends RoomObjectEvent
|
||||
{
|
||||
public static ROOM_OBJECT_INITIALIZED: string = 'ROPSPE_ROOM_OBJECT_INITIALIZED';
|
||||
public static ROOM_OBJECT_DISPOSED: string = 'ROPSPE_ROOM_OBJECT_DISPOSED';
|
||||
public static PLAY_SAMPLE: string = 'ROPSPE_PLAY_SAMPLE';
|
||||
public static CHANGE_PITCH: string = 'ROPSPE_CHANGE_PITCH';
|
||||
|
||||
private _sampleId: number;
|
||||
private _pitch: number;
|
||||
|
||||
constructor(k: string, object: IRoomObject, sampleId: number, pitch: number = 1)
|
||||
{
|
||||
super(k, object);
|
||||
|
||||
this._sampleId = sampleId;
|
||||
this._pitch = pitch;
|
||||
}
|
||||
|
||||
public get sampleId(): number
|
||||
{
|
||||
return this._sampleId;
|
||||
}
|
||||
|
||||
public get pitch(): number
|
||||
{
|
||||
return this._pitch;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { RoomEngineObjectEvent } from './RoomEngineObjectEvent';
|
||||
|
||||
export class RoomObjectSoundMachineEvent extends RoomEngineObjectEvent
|
||||
{
|
||||
public static SOUND_MACHINE_INIT: string = 'ROSM_SOUND_MACHINE_INIT';
|
||||
public static SOUND_MACHINE_SWITCHED_ON: string = 'ROSM_SOUND_MACHINE_SWITCHED_ON';
|
||||
public static SOUND_MACHINE_SWITCHED_OFF: string = 'ROSM_SOUND_MACHINE_SWITCHED_OFF';
|
||||
public static SOUND_MACHINE_DISPOSE: string = 'ROSM_SOUND_MACHINE_DISPOSE';
|
||||
public static JUKEBOX_INIT: string = 'ROSM_JUKEBOX_INIT';
|
||||
public static JUKEBOX_SWITCHED_ON: string = 'ROSM_JUKEBOX_SWITCHED_ON';
|
||||
public static JUKEBOX_SWITCHED_OFF: string = 'ROSM_JUKEBOX_SWITCHED_OFF';
|
||||
public static JUKEBOX_DISPOSE: string = 'ROSM_JUKEBOX_DISPOSE';
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { IRoomObject } from '@nitrots/api';
|
||||
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||
|
||||
export class RoomObjectStateChangedEvent extends RoomObjectEvent
|
||||
{
|
||||
public static STATE_CHANGE: string = 'ROSCE_STATE_CHANGE';
|
||||
public static STATE_RANDOM: string = 'ROSCE_STATE_RANDOM';
|
||||
|
||||
private _state: number;
|
||||
|
||||
constructor(type: string, object: IRoomObject, state: number = 0)
|
||||
{
|
||||
super(type, object);
|
||||
|
||||
this._state = state;
|
||||
}
|
||||
|
||||
public get state(): number
|
||||
{
|
||||
return this._state;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
import { IRoomObject } from '@nitrots/api';
|
||||
import { RoomObjectMouseEvent } from './RoomObjectMouseEvent';
|
||||
|
||||
export class RoomObjectTileMouseEvent extends RoomObjectMouseEvent
|
||||
{
|
||||
private _tileX: number;
|
||||
private _tileY: number;
|
||||
private _tileZ: number;
|
||||
|
||||
constructor(type: string, object: IRoomObject, eventId: string, tileX: number, tileY: number, tileZ: number, altKey: boolean = false, ctrlKey: boolean = false, shiftKey: boolean = false, buttonDown: boolean = false)
|
||||
{
|
||||
super(type, object, eventId, altKey, ctrlKey, shiftKey, buttonDown);
|
||||
|
||||
this._tileX = tileX;
|
||||
this._tileY = tileY;
|
||||
this._tileZ = tileZ;
|
||||
}
|
||||
|
||||
public get tileX(): number
|
||||
{
|
||||
return this._tileX;
|
||||
}
|
||||
|
||||
public get tileY(): number
|
||||
{
|
||||
return this._tileY;
|
||||
}
|
||||
|
||||
public get tileZ(): number
|
||||
{
|
||||
return this._tileZ;
|
||||
}
|
||||
|
||||
public get tileXAsInt(): number
|
||||
{
|
||||
return Math.trunc(this._tileX + 0.499);
|
||||
}
|
||||
|
||||
public get tileYAsInt(): number
|
||||
{
|
||||
return Math.trunc(this._tileY + 0.499);
|
||||
}
|
||||
|
||||
public get tileZAsInt(): number
|
||||
{
|
||||
return Math.trunc(this._tileZ + 0.499);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
import { IRoomObject, IVector3D } from '@nitrots/api';
|
||||
import { Vector3d } from '@nitrots/utils';
|
||||
import { RoomObjectMouseEvent } from './RoomObjectMouseEvent';
|
||||
|
||||
export class RoomObjectWallMouseEvent extends RoomObjectMouseEvent
|
||||
{
|
||||
private _wallLocation: IVector3D;
|
||||
private _wallWd: IVector3D;
|
||||
private _wallHt: IVector3D;
|
||||
private _x: number;
|
||||
private _y: number;
|
||||
private _direction: number;
|
||||
|
||||
constructor(type: string, object: IRoomObject, eventId: string, wallLocation: IVector3D, wallWidth: IVector3D, wallHeight: IVector3D, x: number, y: number, direction: number, altKey: boolean = false, ctrlKey: boolean = false, shiftKey: boolean = false, buttonDown: boolean = false)
|
||||
{
|
||||
super(type, object, eventId, altKey, ctrlKey, shiftKey, buttonDown);
|
||||
|
||||
this._wallLocation = new Vector3d();
|
||||
this._wallWd = new Vector3d();
|
||||
this._wallHt = new Vector3d();
|
||||
|
||||
this._wallLocation.assign(wallLocation);
|
||||
this._wallWd.assign(wallWidth);
|
||||
this._wallHt.assign(wallHeight);
|
||||
|
||||
this._x = x;
|
||||
this._y = y;
|
||||
this._direction = direction;
|
||||
}
|
||||
|
||||
public get wallLocation(): IVector3D
|
||||
{
|
||||
return this._wallLocation;
|
||||
}
|
||||
|
||||
public get wallWidth(): IVector3D
|
||||
{
|
||||
return this._wallWd;
|
||||
}
|
||||
|
||||
public get wallHeight(): IVector3D
|
||||
{
|
||||
return this._wallHt;
|
||||
}
|
||||
|
||||
public get x(): number
|
||||
{
|
||||
return this._x;
|
||||
}
|
||||
|
||||
public get y(): number
|
||||
{
|
||||
return this._y;
|
||||
}
|
||||
|
||||
public get direction(): number
|
||||
{
|
||||
return this._direction;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
import { IRoomObject } from '@nitrots/api';
|
||||
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||
|
||||
export class RoomObjectWidgetRequestEvent extends RoomObjectEvent
|
||||
{
|
||||
public static OPEN_WIDGET: string = 'ROWRE_OPEN_WIDGET';
|
||||
public static CLOSE_WIDGET: string = 'ROWRE_CLOSE_WIDGET';
|
||||
public static OPEN_FURNI_CONTEXT_MENU: string = 'ROWRE_OPEN_FURNI_CONTEXT_MENU';
|
||||
public static CLOSE_FURNI_CONTEXT_MENU: string = 'ROWRE_CLOSE_FURNI_CONTEXT_MENU';
|
||||
public static PLACEHOLDER: string = 'ROWRE_PLACEHOLDER';
|
||||
public static CREDITFURNI: string = 'ROWRE_CREDITFURNI';
|
||||
public static STACK_HEIGHT: string = 'ROWRE_STACK_HEIGHT';
|
||||
public static EXTERNAL_IMAGE: string = 'ROWRE_EXTERNAL_IMAGE';
|
||||
public static STICKIE: string = 'ROWRE_STICKIE';
|
||||
public static PRESENT: string = 'ROWRE_PRESENT';
|
||||
public static TROPHY: string = 'ROWRE_TROPHY';
|
||||
public static TEASER: string = 'ROWRE_TEASER';
|
||||
public static ECOTRONBOX: string = 'ROWRE_ECOTRONBOX';
|
||||
public static DIMMER: string = 'ROWRE_DIMMER';
|
||||
public static WIDGET_REMOVE_DIMMER: string = 'ROWRE_WIDGET_REMOVE_DIMMER';
|
||||
public static CLOTHING_CHANGE: string = 'ROWRE_CLOTHING_CHANGE';
|
||||
public static JUKEBOX_PLAYLIST_EDITOR: string = 'ROWRE_JUKEBOX_PLAYLIST_EDITOR';
|
||||
public static MANNEQUIN: string = 'ROWRE_MANNEQUIN';
|
||||
public static PET_PRODUCT_MENU: string = 'ROWRE_PET_PRODUCT_MENU';
|
||||
public static GUILD_FURNI_CONTEXT_MENU: string = 'ROWRE_GUILD_FURNI_CONTEXT_MENU';
|
||||
public static MONSTERPLANT_SEED_PLANT_CONFIRMATION_DIALOG: string = 'ROWRE_MONSTERPLANT_SEED_PLANT_CONFIRMATION_DIALOG';
|
||||
public static PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG: string = 'ROWRE_PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG';
|
||||
public static BACKGROUND_COLOR: string = 'ROWRE_BACKGROUND_COLOR';
|
||||
public static MYSTERYBOX_OPEN_DIALOG: string = 'ROWRE_MYSTERYBOX_OPEN_DIALOG';
|
||||
public static EFFECTBOX_OPEN_DIALOG: string = 'ROWRE_EFFECTBOX_OPEN_DIALOG';
|
||||
public static MYSTERYTROPHY_OPEN_DIALOG: string = 'ROWRE_MYSTERYTROPHY_OPEN_DIALOG';
|
||||
public static ACHIEVEMENT_RESOLUTION_OPEN: string = 'ROWRE_ACHIEVEMENT_RESOLUTION_OPEN';
|
||||
public static ACHIEVEMENT_RESOLUTION_ENGRAVING: string = 'ROWRE_ACHIEVEMENT_RESOLUTION_ENGRAVING';
|
||||
public static ACHIEVEMENT_RESOLUTION_FAILED: string = 'ROWRE_ACHIEVEMENT_RESOLUTION_FAILED';
|
||||
public static FRIEND_FURNITURE_CONFIRM: string = 'ROWRE_FRIEND_FURNITURE_CONFIRM';
|
||||
public static FRIEND_FURNITURE_ENGRAVING: string = 'ROWRE_FRIEND_FURNITURE_ENGRAVING';
|
||||
public static BADGE_DISPLAY_ENGRAVING: string = 'ROWRE_BADGE_DISPLAY_ENGRAVING';
|
||||
public static HIGH_SCORE_DISPLAY: string = 'ROWRE_HIGH_SCORE_DISPLAY';
|
||||
public static HIDE_HIGH_SCORE_DISPLAY: string = 'ROWRE_HIDE_HIGH_SCORE_DISPLAY';
|
||||
public static INERNAL_LINK: string = 'ROWRE_INTERNAL_LINK';
|
||||
public static ROOM_LINK: string = 'ROWRE_ROOM_LINK';
|
||||
public static YOUTUBE: string = 'ROWRE_YOUTUBE';
|
||||
|
||||
constructor(type: string, roomObject: IRoomObject)
|
||||
{
|
||||
super(type, roomObject);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
import { IRoomSpriteMouseEvent } from '@nitrots/api';
|
||||
|
||||
export class RoomSpriteMouseEvent implements IRoomSpriteMouseEvent
|
||||
{
|
||||
private _type: string;
|
||||
private _eventId: string;
|
||||
private _canvasId: string;
|
||||
private _spriteTag: string;
|
||||
private _screenX: number;
|
||||
private _screenY: number;
|
||||
private _localX: number;
|
||||
private _localY: number;
|
||||
private _ctrlKey: boolean;
|
||||
private _altKey: boolean;
|
||||
private _shiftKey: boolean;
|
||||
private _buttonDown: boolean;
|
||||
private _spriteOffsetX: number;
|
||||
private _spriteOffsetY: number;
|
||||
|
||||
constructor(type: string, eventId: string, canvasId: string, spriteTag: string, screenX: number, screenY: number, localX: number = 0, localY: number = 0, ctrlKey: boolean = false, altKey: boolean = false, shiftKey: boolean = false, buttonDown: boolean = false)
|
||||
{
|
||||
this._type = type;
|
||||
this._eventId = eventId;
|
||||
this._canvasId = canvasId;
|
||||
this._spriteTag = spriteTag;
|
||||
this._screenX = screenX;
|
||||
this._screenY = screenY;
|
||||
this._localX = localX;
|
||||
this._localY = localY;
|
||||
this._ctrlKey = ctrlKey;
|
||||
this._altKey = altKey;
|
||||
this._shiftKey = shiftKey;
|
||||
this._buttonDown = buttonDown;
|
||||
this._spriteOffsetX = 0;
|
||||
this._spriteOffsetY = 0;
|
||||
}
|
||||
|
||||
public get type(): string
|
||||
{
|
||||
return this._type;
|
||||
}
|
||||
|
||||
public get eventId(): string
|
||||
{
|
||||
return this._eventId;
|
||||
}
|
||||
|
||||
public get canvasId(): string
|
||||
{
|
||||
return this._canvasId;
|
||||
}
|
||||
|
||||
public get spriteTag(): string
|
||||
{
|
||||
return this._spriteTag;
|
||||
}
|
||||
|
||||
public get screenX(): number
|
||||
{
|
||||
return this._screenX;
|
||||
}
|
||||
|
||||
public get screenY(): number
|
||||
{
|
||||
return this._screenY;
|
||||
}
|
||||
|
||||
public get localX(): number
|
||||
{
|
||||
return this._localX;
|
||||
}
|
||||
|
||||
public get localY(): number
|
||||
{
|
||||
return this._localY;
|
||||
}
|
||||
|
||||
public get ctrlKey(): boolean
|
||||
{
|
||||
return this._ctrlKey;
|
||||
}
|
||||
|
||||
public get altKey(): boolean
|
||||
{
|
||||
return this._altKey;
|
||||
}
|
||||
|
||||
public get shiftKey(): boolean
|
||||
{
|
||||
return this._shiftKey;
|
||||
}
|
||||
|
||||
public get buttonDown(): boolean
|
||||
{
|
||||
return this._buttonDown;
|
||||
}
|
||||
|
||||
public get spriteOffsetX(): number
|
||||
{
|
||||
return this._spriteOffsetX;
|
||||
}
|
||||
|
||||
public set spriteOffsetX(k: number)
|
||||
{
|
||||
this._spriteOffsetX = k;
|
||||
}
|
||||
|
||||
public get spriteOffsetY(): number
|
||||
{
|
||||
return this._spriteOffsetY;
|
||||
}
|
||||
|
||||
public set spriteOffsetY(k: number)
|
||||
{
|
||||
this._spriteOffsetY = k;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { NitroEvent } from '../core';
|
||||
|
||||
export class RoomToObjectEvent extends NitroEvent
|
||||
{
|
||||
public constructor(type: string)
|
||||
{
|
||||
super(type);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { IVector3D } from '@nitrots/api';
|
||||
import { RoomToObjectEvent } from './RoomToObjectEvent';
|
||||
|
||||
export class RoomToObjectOwnAvatarMoveEvent extends RoomToObjectEvent
|
||||
{
|
||||
public static ROAME_MOVE_TO: string = 'ROAME_MOVE_TO';
|
||||
|
||||
private _targetLocation: IVector3D;
|
||||
|
||||
constructor(type: string, targetLocation: IVector3D)
|
||||
{
|
||||
super(type);
|
||||
|
||||
this._targetLocation = targetLocation;
|
||||
}
|
||||
|
||||
public get targetLocation(): IVector3D
|
||||
{
|
||||
return this._targetLocation;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { RoomEngineEvent } from './RoomEngineEvent';
|
||||
|
||||
export class RoomZoomEvent extends RoomEngineEvent
|
||||
{
|
||||
public static ROOM_ZOOM: string = 'REE_ROOM_ZOOM';
|
||||
|
||||
private _level: number;
|
||||
private _forceFlip: boolean;
|
||||
private _asDelta: boolean;
|
||||
|
||||
constructor(roomId: number, level: number, forceFlip: boolean = false, asDelta: boolean = false)
|
||||
{
|
||||
super(RoomZoomEvent.ROOM_ZOOM, roomId);
|
||||
|
||||
this._level = level;
|
||||
this._forceFlip = forceFlip;
|
||||
this._asDelta = asDelta;
|
||||
}
|
||||
|
||||
public get level(): number
|
||||
{
|
||||
return this._level;
|
||||
}
|
||||
|
||||
public get forceFlip(): boolean
|
||||
{
|
||||
return this._forceFlip;
|
||||
}
|
||||
|
||||
public get asDelta(): boolean
|
||||
{
|
||||
return this._asDelta;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
export * from './RoomBackgroundColorEvent';
|
||||
export * from './RoomContentLoadedEvent';
|
||||
export * from './RoomDragEvent';
|
||||
export * from './RoomEngineDimmerStateEvent';
|
||||
export * from './RoomEngineEvent';
|
||||
export * from './RoomEngineObjectEvent';
|
||||
export * from './RoomEngineObjectPlacedEvent';
|
||||
export * from './RoomEngineObjectPlacedOnUserEvent';
|
||||
export * from './RoomEngineObjectPlaySoundEvent';
|
||||
export * from './RoomEngineRoomAdEvent';
|
||||
export * from './RoomEngineSamplePlaybackEvent';
|
||||
export * from './RoomEngineTriggerWidgetEvent';
|
||||
export * from './RoomEngineUseProductEvent';
|
||||
export * from './RoomObjectBadgeAssetEvent';
|
||||
export * from './RoomObjectDataRequestEvent';
|
||||
export * from './RoomObjectDimmerStateUpdateEvent';
|
||||
export * from './RoomObjectEvent';
|
||||
export * from './RoomObjectFloorHoleEvent';
|
||||
export * from './RoomObjectFurnitureActionEvent';
|
||||
export * from './RoomObjectHSLColorEnableEvent';
|
||||
export * from './RoomObjectHSLColorEnabledEvent';
|
||||
export * from './RoomObjectMouseEvent';
|
||||
export * from './RoomObjectMoveEvent';
|
||||
export * from './RoomObjectPlaySoundIdEvent';
|
||||
export * from './RoomObjectRoomAdEvent';
|
||||
export * from './RoomObjectSamplePlaybackEvent';
|
||||
export * from './RoomObjectSoundMachineEvent';
|
||||
export * from './RoomObjectStateChangedEvent';
|
||||
export * from './RoomObjectTileMouseEvent';
|
||||
export * from './RoomObjectWallMouseEvent';
|
||||
export * from './RoomObjectWidgetRequestEvent';
|
||||
export * from './RoomSpriteMouseEvent';
|
||||
export * from './RoomToObjectEvent';
|
||||
export * from './RoomToObjectOwnAvatarMoveEvent';
|
||||
export * from './RoomZoomEvent';
|
||||
@@ -0,0 +1,28 @@
|
||||
import { Texture } from 'pixi.js';
|
||||
import { NitroEvent } from '../core';
|
||||
|
||||
export class BadgeImageReadyEvent extends NitroEvent
|
||||
{
|
||||
public static IMAGE_READY: string = 'BIME_BADGE_IMAGE_READY';
|
||||
|
||||
private _badgeId: string;
|
||||
private _image: Texture;
|
||||
|
||||
constructor(badgeId: string, image: Texture)
|
||||
{
|
||||
super(BadgeImageReadyEvent.IMAGE_READY);
|
||||
|
||||
this._badgeId = badgeId;
|
||||
this._image = image;
|
||||
}
|
||||
|
||||
public get badgeId(): string
|
||||
{
|
||||
return this._badgeId;
|
||||
}
|
||||
|
||||
public get image(): Texture
|
||||
{
|
||||
return this._image;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { NitroEvent } from '../core';
|
||||
|
||||
export class MysteryBoxKeysUpdateEvent extends NitroEvent
|
||||
{
|
||||
public static MYSTERY_BOX_KEYS_UPDATE: string = 'mbke_update';
|
||||
|
||||
private _boxColor: string;
|
||||
private _keyColor: string;
|
||||
|
||||
constructor(boxColor: string, keyColor: string)
|
||||
{
|
||||
super(MysteryBoxKeysUpdateEvent.MYSTERY_BOX_KEYS_UPDATE);
|
||||
|
||||
this._boxColor = boxColor;
|
||||
this._keyColor = keyColor;
|
||||
}
|
||||
|
||||
public get boxColor(): string
|
||||
{
|
||||
return this._boxColor;
|
||||
}
|
||||
|
||||
public get keyColor(): string
|
||||
{
|
||||
return this._keyColor;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { NitroEvent } from '../core';
|
||||
|
||||
export class PerksUpdatedEvent extends NitroEvent
|
||||
{
|
||||
public static PERKS_UPDATED: string = 'PUE_perks_updated';
|
||||
|
||||
constructor()
|
||||
{
|
||||
super(PerksUpdatedEvent.PERKS_UPDATED);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionChatEvent extends RoomSessionEvent
|
||||
{
|
||||
public static CHAT_EVENT: string = 'RSCE_CHAT_EVENT';
|
||||
public static FLOOD_EVENT: string = 'RSCE_FLOOD_EVENT';
|
||||
|
||||
public static CHAT_TYPE_SPEAK: number = 0;
|
||||
public static CHAT_TYPE_WHISPER: number = 1;
|
||||
public static CHAT_TYPE_SHOUT: number = 2;
|
||||
public static CHAT_TYPE_RESPECT: number = 3;
|
||||
public static CHAT_TYPE_PETRESPECT: number = 4;
|
||||
public static CHAT_TYPE_HAND_ITEM_RECEIVED: number = 5;
|
||||
public static CHAT_TYPE_PETTREAT: number = 6;
|
||||
public static CHAT_TYPE_PETREVIVE: number = 7;
|
||||
public static CHAT_TYPE_PET_REBREED_FERTILIZE: number = 8;
|
||||
public static CHAT_TYPE_PET_SPEED_FERTILIZE: number = 9;
|
||||
public static CHAT_TYPE_MUTE_REMAINING: number = 10;
|
||||
|
||||
private _objectId: number;
|
||||
private _message: string;
|
||||
private _chatType: number;
|
||||
private _links: string[];
|
||||
private _extraParam: number;
|
||||
private _style: number;
|
||||
|
||||
constructor(type: string, session: IRoomSession, objectId: number, message: string, chatType: number, style: number = 0, links: string[] = null, extraParam: number = -1)
|
||||
{
|
||||
super(type, session);
|
||||
|
||||
this._objectId = objectId;
|
||||
this._message = message;
|
||||
this._chatType = chatType;
|
||||
this._links = links;
|
||||
this._extraParam = extraParam;
|
||||
this._style = style;
|
||||
}
|
||||
|
||||
public get objectId(): number
|
||||
{
|
||||
return this._objectId;
|
||||
}
|
||||
|
||||
public get message(): string
|
||||
{
|
||||
return this._message;
|
||||
}
|
||||
|
||||
public get chatType(): number
|
||||
{
|
||||
return this._chatType;
|
||||
}
|
||||
|
||||
public get links(): string[]
|
||||
{
|
||||
return this._links;
|
||||
}
|
||||
|
||||
public get extraParam(): number
|
||||
{
|
||||
return this._extraParam;
|
||||
}
|
||||
|
||||
public get style(): number
|
||||
{
|
||||
return this._style;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
import { BreedingPetInfo, IRoomSession, RarityCategoryData } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionConfirmPetBreedingEvent extends RoomSessionEvent
|
||||
{
|
||||
public static CONFIRM_PET_BREEDING: string = 'RSPFUE_CONFIRM_PET_BREEDING';
|
||||
|
||||
private _nestId: number;
|
||||
private _pet1: BreedingPetInfo;
|
||||
private _pet2: BreedingPetInfo;
|
||||
private _rarityCategories: RarityCategoryData[];
|
||||
private _resultPetTypeId: number;
|
||||
|
||||
constructor(session: IRoomSession, nestId: number, pet1: BreedingPetInfo, pet2: BreedingPetInfo, rarityCategories: RarityCategoryData[], resultPetTypeId: number)
|
||||
{
|
||||
super(RoomSessionConfirmPetBreedingEvent.CONFIRM_PET_BREEDING, session);
|
||||
|
||||
this._nestId = nestId;
|
||||
this._pet1 = pet1;
|
||||
this._pet2 = pet2;
|
||||
this._rarityCategories = rarityCategories;
|
||||
this._resultPetTypeId = resultPetTypeId;
|
||||
}
|
||||
|
||||
public get nestId(): number
|
||||
{
|
||||
return this._nestId;
|
||||
}
|
||||
|
||||
public get pet1(): BreedingPetInfo
|
||||
{
|
||||
return this._pet1;
|
||||
}
|
||||
|
||||
public get pet2(): BreedingPetInfo
|
||||
{
|
||||
return this._pet2;
|
||||
}
|
||||
|
||||
public get rarityCategories(): RarityCategoryData[]
|
||||
{
|
||||
return this._rarityCategories;
|
||||
}
|
||||
|
||||
public get resultPetTypeId(): number
|
||||
{
|
||||
return this._resultPetTypeId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionConfirmPetBreedingResultEvent extends RoomSessionEvent
|
||||
{
|
||||
public static RSPFUE_CONFIRM_PET_BREEDING_RESULT: string = 'RSPFUE_CONFIRM_PET_BREEDING_RESULT';
|
||||
|
||||
private _breedingNestStuffId: number;
|
||||
private _result: number;
|
||||
|
||||
constructor(session: IRoomSession, breedingNestStuffId: number, result: number)
|
||||
{
|
||||
super(RoomSessionConfirmPetBreedingResultEvent.RSPFUE_CONFIRM_PET_BREEDING_RESULT, session);
|
||||
|
||||
this._breedingNestStuffId = breedingNestStuffId;
|
||||
this._result = result;
|
||||
}
|
||||
|
||||
public get breedingNestStuffId(): number
|
||||
{
|
||||
return this._breedingNestStuffId;
|
||||
}
|
||||
|
||||
public get result(): number
|
||||
{
|
||||
return this._result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionDanceEvent extends RoomSessionEvent
|
||||
{
|
||||
public static RSDE_DANCE: string = 'RSDE_DANCE';
|
||||
|
||||
private _roomIndex: number;
|
||||
private _danceId: number;
|
||||
|
||||
constructor(session: IRoomSession, roomIndex: number, danceId: number)
|
||||
{
|
||||
super(RoomSessionDanceEvent.RSDE_DANCE, session);
|
||||
|
||||
this._roomIndex = roomIndex;
|
||||
this._danceId = danceId;
|
||||
}
|
||||
|
||||
public get roomIndex(): number
|
||||
{
|
||||
return this._roomIndex;
|
||||
}
|
||||
|
||||
public get danceId(): number
|
||||
{
|
||||
return this._danceId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionDimmerPresetsEventPresetItem } from './RoomSessionDimmerPresetsEventPresetItem';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionDimmerPresetsEvent extends RoomSessionEvent
|
||||
{
|
||||
public static ROOM_DIMMER_PRESETS: string = 'RSDPE_PRESETS';
|
||||
|
||||
private _selectedPresetId: number = 0;
|
||||
private _presets: RoomSessionDimmerPresetsEventPresetItem[];
|
||||
|
||||
constructor(type: string, session: IRoomSession)
|
||||
{
|
||||
super(type, session);
|
||||
|
||||
this._presets = [];
|
||||
}
|
||||
|
||||
public storePreset(id: number, type: number, color: number, brightness: number): void
|
||||
{
|
||||
this._presets[(id - 1)] = new RoomSessionDimmerPresetsEventPresetItem(id, type, color, brightness);
|
||||
}
|
||||
|
||||
public getPreset(id: number): RoomSessionDimmerPresetsEventPresetItem
|
||||
{
|
||||
if((id < 0) || (id >= this._presets.length)) return null;
|
||||
|
||||
return this._presets[id];
|
||||
}
|
||||
|
||||
public get presetCount(): number
|
||||
{
|
||||
return this._presets.length;
|
||||
}
|
||||
|
||||
public get selectedPresetId(): number
|
||||
{
|
||||
return this._selectedPresetId;
|
||||
}
|
||||
|
||||
public set selectedPresetId(id: number)
|
||||
{
|
||||
this._selectedPresetId = id;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
export class RoomSessionDimmerPresetsEventPresetItem
|
||||
{
|
||||
private _id: number;
|
||||
private _type: number;
|
||||
private _color: number;
|
||||
private _brightness: number;
|
||||
|
||||
constructor(id: number, type: number, color: number, brightness: number)
|
||||
{
|
||||
this._id = id;
|
||||
this._type = type;
|
||||
this._color = color;
|
||||
this._brightness = brightness;
|
||||
}
|
||||
|
||||
public get id(): number
|
||||
{
|
||||
return this._id;
|
||||
}
|
||||
|
||||
public get type(): number
|
||||
{
|
||||
return this._type;
|
||||
}
|
||||
|
||||
public get color(): number
|
||||
{
|
||||
return this._color;
|
||||
}
|
||||
|
||||
public get brightness(): number
|
||||
{
|
||||
return this._brightness;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionDoorbellEvent extends RoomSessionEvent
|
||||
{
|
||||
public static DOORBELL: string = 'RSDE_DOORBELL';
|
||||
public static RSDE_REJECTED: string = 'RSDE_REJECTED';
|
||||
public static RSDE_ACCEPTED: string = 'RSDE_ACCEPTED';
|
||||
|
||||
private _userName: string = '';
|
||||
|
||||
constructor(type: string, session: IRoomSession, userName: string)
|
||||
{
|
||||
super(type, session);
|
||||
|
||||
this._userName = userName;
|
||||
}
|
||||
|
||||
public get userName(): string
|
||||
{
|
||||
return this._userName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionErrorMessageEvent extends RoomSessionEvent
|
||||
{
|
||||
public static RSEME_KICKED: string = 'RSEME_KICKED';
|
||||
public static RSEME_PETS_FORBIDDEN_IN_HOTEL: string = 'RSEME_PETS_FORBIDDEN_IN_HOTEL';
|
||||
public static RSEME_PETS_FORBIDDEN_IN_FLAT: string = 'RSEME_PETS_FORBIDDEN_IN_FLAT';
|
||||
public static RSEME_MAX_PETS: string = 'RSEME_MAX_PETS';
|
||||
public static RSEME_MAX_NUMBER_OF_OWN_PETS: string = 'RSEME_MAX_NUMBER_OF_OWN_PETS';
|
||||
public static RSEME_NO_FREE_TILES_FOR_PET: string = 'RSEME_NO_FREE_TILES_FOR_PET';
|
||||
public static RSEME_SELECTED_TILE_NOT_FREE_FOR_PET: string = 'RSEME_SELECTED_TILE_NOT_FREE_FOR_PET';
|
||||
public static RSEME_BOTS_FORBIDDEN_IN_HOTEL: string = 'RSEME_BOTS_FORBIDDEN_IN_HOTEL';
|
||||
public static RSEME_BOTS_FORBIDDEN_IN_FLAT: string = 'RSEME_BOTS_FORBIDDEN_IN_FLAT';
|
||||
public static RSEME_BOT_LIMIT_REACHED: string = 'RSEME_BOT_LIMIT_REACHED';
|
||||
public static RSEME_SELECTED_TILE_NOT_FREE_FOR_BOT: string = 'RSEME_SELECTED_TILE_NOT_FREE_FOR_BOT';
|
||||
public static RSEME_BOT_NAME_NOT_ACCEPTED: string = 'RSEME_BOT_NAME_NOT_ACCEPTED';
|
||||
|
||||
private _message: string;
|
||||
|
||||
constructor(k: string, _arg_2: IRoomSession, _arg_3: string = null)
|
||||
{
|
||||
super(k, _arg_2);
|
||||
|
||||
this._message = _arg_3;
|
||||
}
|
||||
|
||||
public get message(): string
|
||||
{
|
||||
return this._message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { NitroEvent } from '../core';
|
||||
|
||||
export class RoomSessionEvent extends NitroEvent
|
||||
{
|
||||
public static CREATED: string = 'RSE_CREATED';
|
||||
public static STARTED: string = 'RSE_STARTED';
|
||||
public static ENDED: string = 'RSE_ENDED';
|
||||
public static ROOM_DATA: string = 'RSE_ROOM_DATA';
|
||||
|
||||
private _session: IRoomSession;
|
||||
private _openLandingView: boolean;
|
||||
|
||||
constructor(type: string, session: IRoomSession, openLandingView: boolean = true)
|
||||
{
|
||||
super(type);
|
||||
|
||||
this._session = session;
|
||||
this._openLandingView = openLandingView;
|
||||
}
|
||||
|
||||
public get session(): IRoomSession
|
||||
{
|
||||
return this._session;
|
||||
}
|
||||
|
||||
public get openLandingView(): boolean
|
||||
{
|
||||
return this._openLandingView;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionFavoriteGroupUpdateEvent extends RoomSessionEvent
|
||||
{
|
||||
public static FAVOURITE_GROUP_UPDATE: string = 'RSFGUE_FAVOURITE_GROUP_UPDATE';
|
||||
|
||||
private _roomIndex: number;
|
||||
private _habboGroupId: number;
|
||||
private _habboGroupName: string;
|
||||
private _status: number;
|
||||
|
||||
constructor(session: IRoomSession, roomIndex: number, groupId: number, status: number, groupName: string)
|
||||
{
|
||||
super(RoomSessionFavoriteGroupUpdateEvent.FAVOURITE_GROUP_UPDATE, session);
|
||||
|
||||
this._roomIndex = roomIndex;
|
||||
this._habboGroupId = groupId;
|
||||
this._habboGroupName = groupName;
|
||||
this._status = status;
|
||||
}
|
||||
|
||||
public get roomIndex(): number
|
||||
{
|
||||
return this._roomIndex;
|
||||
}
|
||||
|
||||
public get habboGroupId(): number
|
||||
{
|
||||
return this._habboGroupId;
|
||||
}
|
||||
|
||||
public get habboGroupName(): string
|
||||
{
|
||||
return this._habboGroupName;
|
||||
}
|
||||
|
||||
public get status(): number
|
||||
{
|
||||
return this._status;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionFriendRequestEvent extends RoomSessionEvent
|
||||
{
|
||||
public static RSFRE_FRIEND_REQUEST: string = 'RSFRE_FRIEND_REQUEST';
|
||||
|
||||
private _requestId: number = 0;
|
||||
private _userId: number = 0;
|
||||
private _userName: string;
|
||||
|
||||
constructor(session: IRoomSession, requestId: number, userId: number, userName: string)
|
||||
{
|
||||
super(RoomSessionFriendRequestEvent.RSFRE_FRIEND_REQUEST, session);
|
||||
|
||||
this._requestId = requestId;
|
||||
this._userId = userId;
|
||||
this._userName = userName;
|
||||
}
|
||||
|
||||
public get requestId(): number
|
||||
{
|
||||
return this._requestId;
|
||||
}
|
||||
|
||||
public get userId(): number
|
||||
{
|
||||
return this._userId;
|
||||
}
|
||||
|
||||
public get userName(): string
|
||||
{
|
||||
return this._userName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionNestBreedingSuccessEvent extends RoomSessionEvent
|
||||
{
|
||||
public static NEST_BREEDING_SUCCESS: string = 'RSPFUE_NEST_BREEDING_SUCCESS';
|
||||
|
||||
private _rarityCategory: number;
|
||||
private _petId: number;
|
||||
|
||||
constructor(session: IRoomSession, petId: number, rarityCategory: number)
|
||||
{
|
||||
super(RoomSessionNestBreedingSuccessEvent.NEST_BREEDING_SUCCESS, session);
|
||||
|
||||
this._petId = petId;
|
||||
this._rarityCategory = rarityCategory;
|
||||
}
|
||||
|
||||
public get rarityCategory(): number
|
||||
{
|
||||
return this._rarityCategory;
|
||||
}
|
||||
|
||||
public get petId(): number
|
||||
{
|
||||
return this._petId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionPetBreedingEvent extends RoomSessionEvent
|
||||
{
|
||||
public static PET_BREEDING: string = 'RSPFUE_PET_BREEDING';
|
||||
|
||||
private _state: number;
|
||||
private _ownPetId: number;
|
||||
private _otherPetId: number;
|
||||
|
||||
constructor(session: IRoomSession, state: number, ownPetId: number, otherPetId: number)
|
||||
{
|
||||
super(RoomSessionPetBreedingEvent.PET_BREEDING, session);
|
||||
|
||||
this._state = state;
|
||||
this._ownPetId = ownPetId;
|
||||
this._otherPetId = otherPetId;
|
||||
}
|
||||
|
||||
public get state(): number
|
||||
{
|
||||
return this._state;
|
||||
}
|
||||
|
||||
public get ownPetId(): number
|
||||
{
|
||||
return this._ownPetId;
|
||||
}
|
||||
|
||||
public get otherPetId(): number
|
||||
{
|
||||
return this._otherPetId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { IPetBreedingResultData, IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionPetBreedingResultEvent extends RoomSessionEvent
|
||||
{
|
||||
public static PET_BREEDING_RESULT: string = 'RSPFUE_PET_BREEDING_RESULT';
|
||||
|
||||
private _resultData: IPetBreedingResultData;
|
||||
private _otherResultData: IPetBreedingResultData;
|
||||
|
||||
constructor(session: IRoomSession, resultData: IPetBreedingResultData, otherResultData: IPetBreedingResultData)
|
||||
{
|
||||
super(RoomSessionPetBreedingResultEvent.PET_BREEDING_RESULT, session);
|
||||
|
||||
this._resultData = resultData;
|
||||
this._otherResultData = otherResultData;
|
||||
}
|
||||
|
||||
public get resultData(): IPetBreedingResultData
|
||||
{
|
||||
return this._resultData;
|
||||
}
|
||||
|
||||
public get otherResultData(): IPetBreedingResultData
|
||||
{
|
||||
return this._otherResultData;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionPetCommandsUpdateEvent extends RoomSessionEvent
|
||||
{
|
||||
public static PET_COMMANDS: string = 'RSPIUE_ENABLED_PET_COMMANDS';
|
||||
|
||||
private _petId: number;
|
||||
private _allCommandIds: number[];
|
||||
private _enabledCommandIds: number[];
|
||||
|
||||
constructor(k: IRoomSession, id: number, commands: number[], enabledCommands: number[])
|
||||
{
|
||||
super(RoomSessionPetCommandsUpdateEvent.PET_COMMANDS, k);
|
||||
|
||||
this._petId = id;
|
||||
this._allCommandIds = commands;
|
||||
this._enabledCommandIds = enabledCommands;
|
||||
}
|
||||
|
||||
public get id(): number
|
||||
{
|
||||
return this._petId;
|
||||
}
|
||||
|
||||
public get commands(): number[]
|
||||
{
|
||||
return this._allCommandIds;
|
||||
}
|
||||
|
||||
public get enabledCommands(): number[]
|
||||
{
|
||||
return this._enabledCommandIds;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionPetFigureUpdateEvent extends RoomSessionEvent
|
||||
{
|
||||
public static PET_FIGURE_UPDATE: string = 'RSPFUE_PET_FIGURE_UPDATE';
|
||||
|
||||
private _petId: number;
|
||||
private _figure: string;
|
||||
|
||||
constructor(roomSession: IRoomSession, id: number, figure: string)
|
||||
{
|
||||
super(RoomSessionPetFigureUpdateEvent.PET_FIGURE_UPDATE, roomSession);
|
||||
|
||||
this._petId = id;
|
||||
this._figure = figure;
|
||||
}
|
||||
|
||||
public get id(): number
|
||||
{
|
||||
return this._petId;
|
||||
}
|
||||
|
||||
public get figure(): string
|
||||
{
|
||||
return this._figure;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { IRoomPetData, IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionPetInfoUpdateEvent extends RoomSessionEvent
|
||||
{
|
||||
public static PET_INFO: string = 'RSPIUE_PET_INFO';
|
||||
|
||||
private _petInfo: IRoomPetData;
|
||||
|
||||
constructor(k: IRoomSession, _arg_2: IRoomPetData)
|
||||
{
|
||||
super(RoomSessionPetInfoUpdateEvent.PET_INFO, k);
|
||||
|
||||
this._petInfo = _arg_2;
|
||||
}
|
||||
|
||||
public get petInfo(): IRoomPetData
|
||||
{
|
||||
return this._petInfo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionPetLevelUpdateEvent extends RoomSessionEvent
|
||||
{
|
||||
public static PET_LEVEL_UPDATE: string = 'RSPLUE_PET_LEVEL_UPDATE';
|
||||
|
||||
private _petId: number;
|
||||
private _level: number;
|
||||
|
||||
constructor(session: IRoomSession, petId: number, level: number)
|
||||
{
|
||||
super(RoomSessionPetLevelUpdateEvent.PET_LEVEL_UPDATE, session);
|
||||
|
||||
this._petId = petId;
|
||||
this._level = level;
|
||||
}
|
||||
|
||||
public get petId(): number
|
||||
{
|
||||
return this._petId;
|
||||
}
|
||||
|
||||
public get level(): number
|
||||
{
|
||||
return this._level;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
import { IRoomSession, PetFigureData } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionPetPackageEvent extends RoomSessionEvent
|
||||
{
|
||||
public static RSOPPE_OPEN_PET_PACKAGE_REQUESTED: string = 'RSOPPE_OPEN_PET_PACKAGE_REQUESTED';
|
||||
public static RSOPPE_OPEN_PET_PACKAGE_RESULT: string = 'RSOPPE_OPEN_PET_PACKAGE_RESULT';
|
||||
|
||||
private _objectId: number = -1;
|
||||
private _figureData: PetFigureData;
|
||||
private _nameValidationStatus: number = 0;
|
||||
private _nameValidationInfo: string = null;
|
||||
|
||||
constructor(petPackageName: string, session: IRoomSession, objectId: number, figureData: PetFigureData, nameValidationStatus: number, nameValidationInfo: string)
|
||||
{
|
||||
super(petPackageName, session);
|
||||
|
||||
this._objectId = objectId;
|
||||
this._figureData = figureData;
|
||||
this._nameValidationStatus = nameValidationStatus;
|
||||
this._nameValidationInfo = nameValidationInfo;
|
||||
}
|
||||
|
||||
public get objectId(): number
|
||||
{
|
||||
return this._objectId;
|
||||
}
|
||||
|
||||
public get figureData(): PetFigureData
|
||||
{
|
||||
return this._figureData;
|
||||
}
|
||||
|
||||
public get nameValidationStatus(): number
|
||||
{
|
||||
return this._nameValidationStatus;
|
||||
}
|
||||
|
||||
public get nameValidationInfo(): string
|
||||
{
|
||||
return this._nameValidationInfo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionPetStatusUpdateEvent extends RoomSessionEvent
|
||||
{
|
||||
public static PET_STATUS_UPDATE: string = 'RSPFUE_PET_STATUS_UPDATE';
|
||||
|
||||
private _petId: number;
|
||||
private _canBreed: boolean;
|
||||
private _canHarvest: boolean;
|
||||
private _canRevive: boolean;
|
||||
private _hasBreedingPermission: boolean;
|
||||
|
||||
constructor(roomSession: IRoomSession, petId: number, canBreed: boolean, canHarvest: boolean, canRevive: boolean, hasBreedingPermission: boolean)
|
||||
{
|
||||
super(RoomSessionPetStatusUpdateEvent.PET_STATUS_UPDATE, roomSession);
|
||||
|
||||
this._petId = petId;
|
||||
this._canBreed = canBreed;
|
||||
this._canHarvest = canHarvest;
|
||||
this._canRevive = canRevive;
|
||||
this._hasBreedingPermission = hasBreedingPermission;
|
||||
}
|
||||
|
||||
public get petId(): number
|
||||
{
|
||||
return this._petId;
|
||||
}
|
||||
|
||||
public get canBreed(): boolean
|
||||
{
|
||||
return this._canBreed;
|
||||
}
|
||||
|
||||
public get canHarvest(): boolean
|
||||
{
|
||||
return this._canHarvest;
|
||||
}
|
||||
|
||||
public get canRevive(): boolean
|
||||
{
|
||||
return this._canRevive;
|
||||
}
|
||||
|
||||
public get hasBreedingPermission(): boolean
|
||||
{
|
||||
return this._hasBreedingPermission;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
import { IPollQuestion, IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionPollEvent extends RoomSessionEvent
|
||||
{
|
||||
public static OFFER: string = 'RSPE_POLL_OFFER';
|
||||
public static ERROR: string = 'RSPE_POLL_ERROR';
|
||||
public static CONTENT: string = 'RSPE_POLL_CONTENT';
|
||||
|
||||
private _id: number = -1;
|
||||
private _headline: string;
|
||||
private _summary: string;
|
||||
private _numQuestions: number = 0;
|
||||
private _startMessage: string = '';
|
||||
private _endMessage: string = '';
|
||||
private _questionArray: IPollQuestion[] = null;
|
||||
private _npsPoll: boolean = false;
|
||||
|
||||
constructor(k: string, _arg_2: IRoomSession, _arg_3: number)
|
||||
{
|
||||
super(k, _arg_2);
|
||||
|
||||
this._id = _arg_3;
|
||||
}
|
||||
|
||||
public get id(): number
|
||||
{
|
||||
return this._id;
|
||||
}
|
||||
|
||||
public get headline(): string
|
||||
{
|
||||
return this._headline;
|
||||
}
|
||||
|
||||
public set headline(k: string)
|
||||
{
|
||||
this._headline = k;
|
||||
}
|
||||
|
||||
public get summary(): string
|
||||
{
|
||||
return this._summary;
|
||||
}
|
||||
|
||||
public set summary(k: string)
|
||||
{
|
||||
this._summary = k;
|
||||
}
|
||||
|
||||
public get numQuestions(): number
|
||||
{
|
||||
return this._numQuestions;
|
||||
}
|
||||
|
||||
public set numQuestions(k: number)
|
||||
{
|
||||
this._numQuestions = k;
|
||||
}
|
||||
|
||||
public get startMessage(): string
|
||||
{
|
||||
return this._startMessage;
|
||||
}
|
||||
|
||||
public set startMessage(k: string)
|
||||
{
|
||||
this._startMessage = k;
|
||||
}
|
||||
|
||||
public get endMessage(): string
|
||||
{
|
||||
return this._endMessage;
|
||||
}
|
||||
|
||||
public set endMessage(k: string)
|
||||
{
|
||||
this._endMessage = k;
|
||||
}
|
||||
|
||||
public get questionArray(): IPollQuestion[]
|
||||
{
|
||||
return this._questionArray;
|
||||
}
|
||||
|
||||
public set questionArray(k: IPollQuestion[])
|
||||
{
|
||||
this._questionArray = k;
|
||||
}
|
||||
|
||||
public get npsPoll(): boolean
|
||||
{
|
||||
return this._npsPoll;
|
||||
}
|
||||
|
||||
public set npsPoll(k: boolean)
|
||||
{
|
||||
this._npsPoll = k;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionPresentEvent extends RoomSessionEvent
|
||||
{
|
||||
public static RSPE_PRESENT_OPENED: string = 'RSPE_PRESENT_OPENED';
|
||||
|
||||
private _classId: number = 0;
|
||||
private _itemType: string = '';
|
||||
private _productCode: string;
|
||||
private _placedItemId: number = 0;
|
||||
private _placedItemType: string = '';
|
||||
private _placedInRoom: boolean;
|
||||
private _petFigureString: string;
|
||||
|
||||
constructor(k: string, _arg_2: IRoomSession, classId: number, itemType: string, productCode: string, placedItemId: number, placedItemType: string, placedInRoom: boolean, petFigureString: string)
|
||||
{
|
||||
super(k, _arg_2);
|
||||
|
||||
this._classId = classId;
|
||||
this._itemType = itemType;
|
||||
this._productCode = productCode;
|
||||
this._placedItemId = placedItemId;
|
||||
this._placedItemType = placedItemType;
|
||||
this._placedInRoom = placedInRoom;
|
||||
this._petFigureString = petFigureString;
|
||||
}
|
||||
|
||||
public get classId(): number
|
||||
{
|
||||
return this._classId;
|
||||
}
|
||||
|
||||
|
||||
public get itemType(): string
|
||||
{
|
||||
return this._itemType;
|
||||
}
|
||||
|
||||
public get productCode(): string
|
||||
{
|
||||
return this._productCode;
|
||||
}
|
||||
|
||||
public get placedItemId(): number
|
||||
{
|
||||
return this._placedItemId;
|
||||
}
|
||||
|
||||
public get placedInRoom(): boolean
|
||||
{
|
||||
return this._placedInRoom;
|
||||
}
|
||||
|
||||
public get placedItemType(): string
|
||||
{
|
||||
return this._placedItemType;
|
||||
}
|
||||
|
||||
public get petFigureString(): string
|
||||
{
|
||||
return this._petFigureString;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionPropertyUpdateEvent extends RoomSessionEvent
|
||||
{
|
||||
public static RSDUE_ALLOW_PETS: string = 'RSDUE_ALLOW_PETS';
|
||||
|
||||
constructor(k: string, _arg_2: IRoomSession)
|
||||
{
|
||||
super(k, _arg_2);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionQueueEvent extends RoomSessionEvent
|
||||
{
|
||||
public static QUEUE_STATUS: string = 'RSQE_QUEUE_STATUS';
|
||||
public static QUEUE_TYPE_CLUB: string = 'c';
|
||||
public static QUEUE_TYPE_NORMAL: string = 'd';
|
||||
public static QUEUE_TARGET_VISITOR: number = 2;
|
||||
public static QUEUE_TARGET_SPECTATOR: number = 1;
|
||||
|
||||
private _name: string;
|
||||
private _target: number;
|
||||
private _queues: Map<string, number>;
|
||||
private _isActive: boolean;
|
||||
private _activeQueue: string;
|
||||
|
||||
constructor(k: IRoomSession, _arg_2: string, _arg_3: number, _arg_4: boolean = false)
|
||||
{
|
||||
super(RoomSessionQueueEvent.QUEUE_STATUS, k);
|
||||
|
||||
this._name = _arg_2;
|
||||
this._target = _arg_3;
|
||||
this._queues = new Map();
|
||||
this._isActive = _arg_4;
|
||||
}
|
||||
|
||||
public get isActive(): boolean
|
||||
{
|
||||
return this._isActive;
|
||||
}
|
||||
|
||||
public get queueSetName(): string
|
||||
{
|
||||
return this._name;
|
||||
}
|
||||
|
||||
public get queueSetTarget(): number
|
||||
{
|
||||
return this._target;
|
||||
}
|
||||
|
||||
public get queueTypes(): string[]
|
||||
{
|
||||
return Array.from(this._queues.keys());
|
||||
}
|
||||
|
||||
public getQueueSize(k: string): number
|
||||
{
|
||||
return this._queues.get(k);
|
||||
}
|
||||
|
||||
public addQueue(k: string, _arg_2: number): void
|
||||
{
|
||||
this._queues.set(k, _arg_2);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionSpectatorModeEvent extends RoomSessionEvent
|
||||
{
|
||||
public static SPECTATOR_MODE: string = 'RSSME_SPECTATOR_MODE';
|
||||
|
||||
constructor(type: string, session: IRoomSession)
|
||||
{
|
||||
super(type, session);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionUserBadgesEvent extends RoomSessionEvent
|
||||
{
|
||||
public static RSUBE_BADGES: string = 'RSUBE_BADGES';
|
||||
|
||||
private _userId: number = 0;
|
||||
private _badges: string[];
|
||||
|
||||
constructor(k: IRoomSession, _arg_2: number, _arg_3: string[])
|
||||
{
|
||||
super(RoomSessionUserBadgesEvent.RSUBE_BADGES, k);
|
||||
|
||||
this._badges = [];
|
||||
this._userId = _arg_2;
|
||||
this._badges = _arg_3;
|
||||
}
|
||||
|
||||
public get userId(): number
|
||||
{
|
||||
return this._userId;
|
||||
}
|
||||
|
||||
public get badges(): string[]
|
||||
{
|
||||
return this._badges;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { IRoomSession, IRoomUserData } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionUserDataUpdateEvent extends RoomSessionEvent
|
||||
{
|
||||
public static USER_DATA_UPDATED: string = 'RMUDUE_USER_DATA_UPDATED';
|
||||
|
||||
private _addedUsers: IRoomUserData[];
|
||||
|
||||
constructor(session: IRoomSession, addedUsers: IRoomUserData[])
|
||||
{
|
||||
super(RoomSessionUserDataUpdateEvent.USER_DATA_UPDATED, session);
|
||||
|
||||
this._addedUsers = addedUsers;
|
||||
}
|
||||
|
||||
public get addedUsers(): IRoomUserData[]
|
||||
{
|
||||
return this._addedUsers;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionUserFigureUpdateEvent extends RoomSessionEvent
|
||||
{
|
||||
public static USER_FIGURE: string = 'RSUBE_FIGURE';
|
||||
|
||||
private _roomIndex: number = 0;
|
||||
private _figure: string = '';
|
||||
private _gender: string = '';
|
||||
private _customInfo: string = '';
|
||||
private _achievementScore: number;
|
||||
|
||||
constructor(session: IRoomSession, roomIndex: number, figure: string, gender: string, customInfo: string, achievementScore: number)
|
||||
{
|
||||
super(RoomSessionUserFigureUpdateEvent.USER_FIGURE, session);
|
||||
|
||||
this._roomIndex = roomIndex;
|
||||
this._figure = figure;
|
||||
this._gender = gender;
|
||||
this._customInfo = customInfo;
|
||||
this._achievementScore = achievementScore;
|
||||
}
|
||||
|
||||
public get roomIndex(): number
|
||||
{
|
||||
return this._roomIndex;
|
||||
}
|
||||
|
||||
public get figure(): string
|
||||
{
|
||||
return this._figure;
|
||||
}
|
||||
|
||||
public get gender(): string
|
||||
{
|
||||
return this._gender;
|
||||
}
|
||||
|
||||
public get customInfo(): string
|
||||
{
|
||||
return this._customInfo;
|
||||
}
|
||||
|
||||
public get activityPoints(): number
|
||||
{
|
||||
return this._achievementScore;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { NitroEvent } from '../core';
|
||||
|
||||
export class RoomSessionUserTagsEvent extends NitroEvent
|
||||
{
|
||||
public static UTRE_USER_TAGS_RECEIVED: string = 'UTRE_USER_TAGS_RECEIVED';
|
||||
|
||||
private _userId: number;
|
||||
private _tags: string[];
|
||||
|
||||
constructor(k: number, _arg_2: string[])
|
||||
{
|
||||
super(RoomSessionUserTagsEvent.UTRE_USER_TAGS_RECEIVED);
|
||||
|
||||
this._userId = k;
|
||||
this._tags = _arg_2;
|
||||
}
|
||||
|
||||
public get userId(): number
|
||||
{
|
||||
return this._userId;
|
||||
}
|
||||
|
||||
public get tags(): string[]
|
||||
{
|
||||
return this._tags;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
import { IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
|
||||
export class RoomSessionVoteEvent extends RoomSessionEvent
|
||||
{
|
||||
public static VOTE_QUESTION: string = 'RSPE_VOTE_QUESTION';
|
||||
public static VOTE_RESULT: string = 'RSPE_VOTE_RESULT';
|
||||
|
||||
private _question: string = '';
|
||||
private _choices: string[];
|
||||
private _SafeStr_7651: string[];
|
||||
private _SafeStr_7654: number = 0;
|
||||
|
||||
constructor(_arg_1: string, _arg_2: IRoomSession, _arg_3: string, _arg_4: string[], _arg_5: string[] = null, _arg_6: number = 0)
|
||||
{
|
||||
super(_arg_1, _arg_2);
|
||||
|
||||
this._choices = [];
|
||||
this._SafeStr_7651 = [];
|
||||
this._question = _arg_3;
|
||||
this._choices = _arg_4;
|
||||
this._SafeStr_7651 = _arg_5;
|
||||
if(this._SafeStr_7651 == null)
|
||||
{
|
||||
this._SafeStr_7651 = [];
|
||||
}
|
||||
this._SafeStr_7654 = _arg_6;
|
||||
}
|
||||
|
||||
public get question(): string
|
||||
{
|
||||
return this._question;
|
||||
}
|
||||
|
||||
public get choices(): string[]
|
||||
{
|
||||
return this._choices.slice();
|
||||
}
|
||||
|
||||
public get _SafeStr_4173(): string[]
|
||||
{
|
||||
return this._SafeStr_7651.slice();
|
||||
}
|
||||
|
||||
public get _SafeStr_4174(): number
|
||||
{
|
||||
return this._SafeStr_7654;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
import { IQuestion, IRoomSession } from '@nitrots/api';
|
||||
import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionWordQuizEvent extends RoomSessionEvent
|
||||
{
|
||||
public static QUESTION: string = 'RWPUW_NEW_QUESTION';
|
||||
public static FINISHED: string = 'RWPUW_QUESION_FINSIHED';
|
||||
public static ANSWERED: string = 'RWPUW_QUESTION_ANSWERED';
|
||||
|
||||
private _id: number = -1;
|
||||
private _pollType: string = null;
|
||||
private _pollId: number = -1;
|
||||
private _questionId: number = -1;
|
||||
private _duration: number = -1;
|
||||
private _question: IQuestion = null;
|
||||
private _userId: number = -1;
|
||||
private _value: string;
|
||||
private _answerCounts: Map<string, number>;
|
||||
|
||||
constructor(k: string, _arg_2: IRoomSession, _arg_3: number = -1)
|
||||
{
|
||||
super(k, _arg_2);
|
||||
|
||||
this._id = _arg_3;
|
||||
}
|
||||
|
||||
public get id(): number
|
||||
{
|
||||
return this._id;
|
||||
}
|
||||
|
||||
public get pollType(): string
|
||||
{
|
||||
return this._pollType;
|
||||
}
|
||||
|
||||
public set pollType(pollType: string)
|
||||
{
|
||||
this._pollType = pollType;
|
||||
}
|
||||
|
||||
public get pollId(): number
|
||||
{
|
||||
return this._pollId;
|
||||
}
|
||||
|
||||
public set pollId(k: number)
|
||||
{
|
||||
this._pollId = k;
|
||||
}
|
||||
|
||||
public get questionId(): number
|
||||
{
|
||||
return this._questionId;
|
||||
}
|
||||
|
||||
public set questionId(k: number)
|
||||
{
|
||||
this._questionId = k;
|
||||
}
|
||||
|
||||
public get duration(): number
|
||||
{
|
||||
return this._duration;
|
||||
}
|
||||
|
||||
public set duration(k: number)
|
||||
{
|
||||
this._duration = k;
|
||||
}
|
||||
|
||||
public get question(): IQuestion
|
||||
{
|
||||
return this._question;
|
||||
}
|
||||
|
||||
public set question(k: IQuestion)
|
||||
{
|
||||
this._question = k;
|
||||
}
|
||||
|
||||
public get userId(): number
|
||||
{
|
||||
return this._userId;
|
||||
}
|
||||
|
||||
public set userId(k: number)
|
||||
{
|
||||
this._userId = k;
|
||||
}
|
||||
|
||||
public get value(): string
|
||||
{
|
||||
return this._value;
|
||||
}
|
||||
|
||||
public set value(value: string)
|
||||
{
|
||||
this._value = value;
|
||||
}
|
||||
|
||||
public get answerCounts(): Map<string, number>
|
||||
{
|
||||
return this._answerCounts;
|
||||
}
|
||||
|
||||
public set answerCounts(k: Map<string, number>)
|
||||
{
|
||||
this._answerCounts = k;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NitroEvent } from '../core';
|
||||
|
||||
export class SessionDataPreferencesEvent extends NitroEvent
|
||||
{
|
||||
public static UPDATED: string = 'APUE_UPDATED';
|
||||
|
||||
private _uiFlags: number;
|
||||
|
||||
constructor(k: number)
|
||||
{
|
||||
super(SessionDataPreferencesEvent.UPDATED);
|
||||
|
||||
this._uiFlags = k;
|
||||
}
|
||||
|
||||
public get uiFlags(): number
|
||||
{
|
||||
return this._uiFlags;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NitroEvent } from '../core';
|
||||
|
||||
export class UserNameUpdateEvent extends NitroEvent
|
||||
{
|
||||
public static UNUE_NAME_UPDATED: string = 'unue_name_updated';
|
||||
|
||||
private _name: string;
|
||||
|
||||
constructor(name: string)
|
||||
{
|
||||
super(UserNameUpdateEvent.UNUE_NAME_UPDATED);
|
||||
|
||||
this._name = name;
|
||||
}
|
||||
|
||||
public get name(): string
|
||||
{
|
||||
return this._name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
export * from './BadgeImageReadyEvent';
|
||||
export * from './MysteryBoxKeysUpdateEvent';
|
||||
export * from './PerksUpdatedEvent';
|
||||
export * from './RoomSessionChatEvent';
|
||||
export * from './RoomSessionConfirmPetBreedingEvent';
|
||||
export * from './RoomSessionConfirmPetBreedingResultEvent';
|
||||
export * from './RoomSessionDanceEvent';
|
||||
export * from './RoomSessionDimmerPresetsEvent';
|
||||
export * from './RoomSessionDimmerPresetsEventPresetItem';
|
||||
export * from './RoomSessionDoorbellEvent';
|
||||
export * from './RoomSessionErrorMessageEvent';
|
||||
export * from './RoomSessionEvent';
|
||||
export * from './RoomSessionFavoriteGroupUpdateEvent';
|
||||
export * from './RoomSessionFriendRequestEvent';
|
||||
export * from './RoomSessionNestBreedingSuccessEvent';
|
||||
export * from './RoomSessionPetBreedingEvent';
|
||||
export * from './RoomSessionPetBreedingResultEvent';
|
||||
export * from './RoomSessionPetCommandsUpdateEvent';
|
||||
export * from './RoomSessionPetFigureUpdateEvent';
|
||||
export * from './RoomSessionPetInfoUpdateEvent';
|
||||
export * from './RoomSessionPetLevelUpdateEvent';
|
||||
export * from './RoomSessionPetPackageEvent';
|
||||
export * from './RoomSessionPetStatusUpdateEvent';
|
||||
export * from './RoomSessionPollEvent';
|
||||
export * from './RoomSessionPresentEvent';
|
||||
export * from './RoomSessionPropertyUpdateEvent';
|
||||
export * from './RoomSessionQueueEvent';
|
||||
export * from './RoomSessionSpectatorModeEvent';
|
||||
export * from './RoomSessionUserBadgesEvent';
|
||||
export * from './RoomSessionUserDataUpdateEvent';
|
||||
export * from './RoomSessionUserFigureUpdateEvent';
|
||||
export * from './RoomSessionUserTagsEvent';
|
||||
export * from './RoomSessionVoteEvent';
|
||||
export * from './RoomSessionWordQuizEvent';
|
||||
export * from './SessionDataPreferencesEvent';
|
||||
export * from './UserNameUpdateEvent';
|
||||
@@ -0,0 +1,27 @@
|
||||
import { NitroEvent } from '@nitrots/events';
|
||||
|
||||
export class NotifyPlayedSongEvent extends NitroEvent
|
||||
{
|
||||
public static readonly NOTIFY_PLAYED_SONG = 'UIEW_NOTIFY_PLAYED_SONG';
|
||||
|
||||
private _name: string;
|
||||
private _creator: string;
|
||||
|
||||
constructor(name:string, creator:string)
|
||||
{
|
||||
super(NotifyPlayedSongEvent.NOTIFY_PLAYED_SONG);
|
||||
|
||||
this._name = name;
|
||||
this._creator = creator;
|
||||
}
|
||||
|
||||
public get name(): string
|
||||
{
|
||||
return this._name;
|
||||
}
|
||||
|
||||
public get creator(): string
|
||||
{
|
||||
return this._creator;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import { NitroEvent } from '@nitrots/events';
|
||||
|
||||
export class NowPlayingEvent extends NitroEvent
|
||||
{
|
||||
public static readonly NPE_USER_PLAY_SONG = 'NPE_USER_PLAY_SONG';
|
||||
public static readonly NPW_USER_STOP_SONG = 'NPW_USER_STOP_SONG';
|
||||
public static readonly NPE_SONG_CHANGED = 'NPE_SONG_CHANGED';
|
||||
|
||||
private _id:number;
|
||||
private _position:number;
|
||||
private _priority:number;
|
||||
|
||||
constructor(k:string, priority:number, id:number, position:number)
|
||||
{
|
||||
super(k);
|
||||
this._id = id;
|
||||
this._position = position;
|
||||
this._priority = priority;
|
||||
}
|
||||
|
||||
public get id():number
|
||||
{
|
||||
return this._id;
|
||||
}
|
||||
|
||||
public get position():number
|
||||
{
|
||||
return this._position;
|
||||
}
|
||||
|
||||
public get priority():number
|
||||
{
|
||||
return this._priority;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { NitroEvent } from '@nitrots/events';
|
||||
|
||||
export class PlayListStatusEvent extends NitroEvent
|
||||
{
|
||||
public static readonly PLUE_PLAY_LIST_UPDATED = 'PLUE_PLAY_LIST_UPDATED';
|
||||
public static readonly PLUE_PLAY_LIST_FULL = 'PLUE_PLAY_LIST_FULL';
|
||||
|
||||
constructor(k:string)
|
||||
{
|
||||
super(k);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user