mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-23 16:10:50 +01:00
Updates
This commit is contained in:
parent
e6084ac3ea
commit
70a6410a99
@ -9,7 +9,7 @@ export class ClientHelloMessageComposer implements IMessageComposer<ConstructorP
|
|||||||
|
|
||||||
constructor(releaseVersion: string, type: string, platform: number, category: number)
|
constructor(releaseVersion: string, type: string, platform: number, category: number)
|
||||||
{
|
{
|
||||||
this._data = [ NitroVersion.RENDERER_VERSION, 'HTML5', ClientPlatformEnum.HTML5, ClientDeviceCategoryEnum.BROWSER ];
|
this._data = [ `NITRO-${ NitroVersion.RENDERER_VERSION.replaceAll('.', '-') }`, 'HTML5', ClientPlatformEnum.HTML5, ClientDeviceCategoryEnum.BROWSER ];
|
||||||
}
|
}
|
||||||
|
|
||||||
public getMessageArray()
|
public getMessageArray()
|
||||||
|
@ -802,17 +802,17 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateObjectRoomColor(k: number, _arg_2: number, _arg_3: number, _arg_4: boolean): boolean
|
public updateObjectRoomColor(roomId: number, color: number, light: number, backgroundOnly: boolean): boolean
|
||||||
{
|
{
|
||||||
const roomObject = this.getRoomOwnObject(k);
|
const roomObject = this.getRoomOwnObject(roomId);
|
||||||
|
|
||||||
if(!roomObject || !roomObject.logic) return false;
|
if(!roomObject || !roomObject.logic) return false;
|
||||||
|
|
||||||
const event = new ObjectRoomColorUpdateMessage(ObjectRoomColorUpdateMessage.BACKGROUND_COLOR, _arg_2, _arg_3, _arg_4);
|
const event = new ObjectRoomColorUpdateMessage(ObjectRoomColorUpdateMessage.BACKGROUND_COLOR, color, light, backgroundOnly);
|
||||||
|
|
||||||
roomObject.logic.processUpdateMessage(event);
|
roomObject.logic.processUpdateMessage(event);
|
||||||
|
|
||||||
this.events.dispatchEvent(new RoomBackgroundColorEvent(k, _arg_2, _arg_3, _arg_4));
|
this.events.dispatchEvent(new RoomBackgroundColorEvent(roomId, color, light, backgroundOnly));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -259,6 +259,8 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
|
|||||||
case RoomObjectWidgetRequestEvent.CLOSE_FURNI_CONTEXT_MENU:
|
case RoomObjectWidgetRequestEvent.CLOSE_FURNI_CONTEXT_MENU:
|
||||||
case RoomObjectWidgetRequestEvent.PLACEHOLDER:
|
case RoomObjectWidgetRequestEvent.PLACEHOLDER:
|
||||||
case RoomObjectWidgetRequestEvent.CREDITFURNI:
|
case RoomObjectWidgetRequestEvent.CREDITFURNI:
|
||||||
|
case RoomObjectWidgetRequestEvent.STACK_HEIGHT:
|
||||||
|
case RoomObjectWidgetRequestEvent.EXTERNAL_IMAGE:
|
||||||
case RoomObjectWidgetRequestEvent.STICKIE:
|
case RoomObjectWidgetRequestEvent.STICKIE:
|
||||||
case RoomObjectWidgetRequestEvent.PRESENT:
|
case RoomObjectWidgetRequestEvent.PRESENT:
|
||||||
case RoomObjectWidgetRequestEvent.TROPHY:
|
case RoomObjectWidgetRequestEvent.TROPHY:
|
||||||
@ -781,6 +783,12 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
|
|||||||
case RoomObjectWidgetRequestEvent.CREDITFURNI:
|
case RoomObjectWidgetRequestEvent.CREDITFURNI:
|
||||||
eventDispatcher.dispatchEvent(new RoomEngineTriggerWidgetEvent(RoomEngineTriggerWidgetEvent.REQUEST_CREDITFURNI, roomId, objectId, objectCategory));
|
eventDispatcher.dispatchEvent(new RoomEngineTriggerWidgetEvent(RoomEngineTriggerWidgetEvent.REQUEST_CREDITFURNI, roomId, objectId, objectCategory));
|
||||||
return;
|
return;
|
||||||
|
case RoomObjectWidgetRequestEvent.STACK_HEIGHT:
|
||||||
|
eventDispatcher.dispatchEvent(new RoomEngineTriggerWidgetEvent(RoomEngineTriggerWidgetEvent.REQUEST_STACK_HEIGHT, roomId, objectId, objectCategory));
|
||||||
|
return;
|
||||||
|
case RoomObjectWidgetRequestEvent.EXTERNAL_IMAGE:
|
||||||
|
eventDispatcher.dispatchEvent(new RoomEngineTriggerWidgetEvent(RoomEngineTriggerWidgetEvent.REQUEST_EXTERNAL_IMAGE, roomId, objectId, objectCategory));
|
||||||
|
return;
|
||||||
case RoomObjectWidgetRequestEvent.STICKIE:
|
case RoomObjectWidgetRequestEvent.STICKIE:
|
||||||
eventDispatcher.dispatchEvent(new RoomEngineTriggerWidgetEvent(RoomEngineTriggerWidgetEvent.REQUEST_STICKIE, roomId, objectId, objectCategory));
|
eventDispatcher.dispatchEvent(new RoomEngineTriggerWidgetEvent(RoomEngineTriggerWidgetEvent.REQUEST_STICKIE, roomId, objectId, objectCategory));
|
||||||
return;
|
return;
|
||||||
|
@ -8,6 +8,8 @@ export class RoomEngineTriggerWidgetEvent extends RoomEngineObjectEvent
|
|||||||
public static CLOSE_FURNI_CONTEXT_MENU: string = 'RETWE_CLOSE_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_PLACEHOLDER: string = 'RETWE_REQUEST_PLACEHOLDER';
|
||||||
public static REQUEST_CREDITFURNI: string = 'RETWE_REQUEST_CREDITFURNI';
|
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_STICKIE: string = 'RETWE_REQUEST_STICKIE';
|
||||||
public static REQUEST_PRESENT: string = 'RETWE_REQUEST_PRESENT';
|
public static REQUEST_PRESENT: string = 'RETWE_REQUEST_PRESENT';
|
||||||
public static REQUEST_TROPHY: string = 'RETWE_REQUEST_TROPHY';
|
public static REQUEST_TROPHY: string = 'RETWE_REQUEST_TROPHY';
|
||||||
|
@ -9,6 +9,8 @@ export class RoomObjectWidgetRequestEvent extends RoomObjectEvent
|
|||||||
public static CLOSE_FURNI_CONTEXT_MENU: string = 'ROWRE_CLOSE_FURNI_CONTEXT_MENU';
|
public static CLOSE_FURNI_CONTEXT_MENU: string = 'ROWRE_CLOSE_FURNI_CONTEXT_MENU';
|
||||||
public static PLACEHOLDER: string = 'ROWRE_PLACEHOLDER';
|
public static PLACEHOLDER: string = 'ROWRE_PLACEHOLDER';
|
||||||
public static CREDITFURNI: string = 'ROWRE_CREDITFURNI';
|
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 STICKIE: string = 'ROWRE_STICKIE';
|
||||||
public static PRESENT: string = 'ROWRE_PRESENT';
|
public static PRESENT: string = 'ROWRE_PRESENT';
|
||||||
public static TROPHY: string = 'ROWRE_TROPHY';
|
public static TROPHY: string = 'ROWRE_TROPHY';
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
import { IAssetData } from '../../../../../core/asset/interfaces';
|
import { IAssetData } from '../../../../../core/asset/interfaces';
|
||||||
import { RoomWidgetEnum } from '../../../../ui';
|
import { RoomObjectWidgetRequestEvent } from '../../../events/RoomObjectWidgetRequestEvent';
|
||||||
import { RoomObjectVariable } from '../../RoomObjectVariable';
|
import { RoomObjectVariable } from '../../RoomObjectVariable';
|
||||||
import { FurnitureMultiStateLogic } from './FurnitureMultiStateLogic';
|
import { FurnitureMultiStateLogic } from './FurnitureMultiStateLogic';
|
||||||
|
|
||||||
export class FurnitureCustomStackHeightLogic extends FurnitureMultiStateLogic
|
export class FurnitureCustomStackHeightLogic extends FurnitureMultiStateLogic
|
||||||
{
|
{
|
||||||
|
public getEventTypes(): string[]
|
||||||
|
{
|
||||||
|
const types = [
|
||||||
|
RoomObjectWidgetRequestEvent.STACK_HEIGHT
|
||||||
|
];
|
||||||
|
|
||||||
|
return this.mergeTypes(super.getEventTypes(), types);
|
||||||
|
}
|
||||||
|
|
||||||
public initialize(asset: IAssetData): void
|
public initialize(asset: IAssetData): void
|
||||||
{
|
{
|
||||||
super.initialize(asset);
|
super.initialize(asset);
|
||||||
@ -12,8 +21,12 @@ export class FurnitureCustomStackHeightLogic extends FurnitureMultiStateLogic
|
|||||||
if(this.object && this.object.model) this.object.model.setValue(RoomObjectVariable.FURNITURE_ALWAYS_STACKABLE, 1);
|
if(this.object && this.object.model) this.object.model.setValue(RoomObjectVariable.FURNITURE_ALWAYS_STACKABLE, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get widget(): string
|
public useObject(): void
|
||||||
{
|
{
|
||||||
return RoomWidgetEnum.CUSTOM_STACK_HEIGHT;
|
if(!this.object || !this.eventDispatcher) return;
|
||||||
|
|
||||||
|
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.STACK_HEIGHT, this.object));
|
||||||
|
|
||||||
|
super.useObject();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
import { IAssetData } from '../../../../../core/asset/interfaces';
|
import { IAssetData } from '../../../../../core/asset/interfaces';
|
||||||
import { RoomWidgetEnum } from '../../../../ui/widget/enums/RoomWidgetEnum';
|
import { RoomObjectWidgetRequestEvent } from '../../../events';
|
||||||
import { RoomObjectVariable } from '../../RoomObjectVariable';
|
import { RoomObjectVariable } from '../../RoomObjectVariable';
|
||||||
import { FurnitureMultiStateLogic } from './FurnitureMultiStateLogic';
|
import { FurnitureMultiStateLogic } from './FurnitureMultiStateLogic';
|
||||||
|
|
||||||
export class FurnitureExternalImageLogic extends FurnitureMultiStateLogic
|
export class FurnitureExternalImageLogic extends FurnitureMultiStateLogic
|
||||||
{
|
{
|
||||||
|
public getEventTypes(): string[]
|
||||||
|
{
|
||||||
|
const types = [
|
||||||
|
RoomObjectWidgetRequestEvent.EXTERNAL_IMAGE
|
||||||
|
];
|
||||||
|
|
||||||
|
return this.mergeTypes(super.getEventTypes(), types);
|
||||||
|
}
|
||||||
|
|
||||||
public initialize(asset: IAssetData): void
|
public initialize(asset: IAssetData): void
|
||||||
{
|
{
|
||||||
super.initialize(asset);
|
super.initialize(asset);
|
||||||
@ -25,8 +34,12 @@ export class FurnitureExternalImageLogic extends FurnitureMultiStateLogic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public get widget(): string
|
public useObject(): void
|
||||||
{
|
{
|
||||||
return RoomWidgetEnum.EXTERNAL_IMAGE;
|
if(!this.object || !this.eventDispatcher) return;
|
||||||
|
|
||||||
|
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.EXTERNAL_IMAGE, this.object));
|
||||||
|
|
||||||
|
super.useObject();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -262,6 +262,8 @@ export class PetVisualization extends FurnitureAnimatedVisualization
|
|||||||
|
|
||||||
protected setPostureAndGesture(posture: string, gesture: string): void
|
protected setPostureAndGesture(posture: string, gesture: string): void
|
||||||
{
|
{
|
||||||
|
if(!this._data) return;
|
||||||
|
|
||||||
if(posture !== this._posture)
|
if(posture !== this._posture)
|
||||||
{
|
{
|
||||||
this._posture = posture;
|
this._posture = posture;
|
||||||
|
Loading…
Reference in New Issue
Block a user