mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-27 01:40:52 +01:00
cleaned RoomEngineObjectPlacedEvent
This commit is contained in:
parent
035779da57
commit
ea1c12a9e9
@ -60,7 +60,7 @@ export class FurnitureGiftOpenedParser implements IMessageParser
|
|||||||
return this._Str_3970;
|
return this._Str_3970;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_4057():boolean
|
public get placedInRoom():boolean
|
||||||
{
|
{
|
||||||
return this._Str_3224;
|
return this._Str_3224;
|
||||||
}
|
}
|
||||||
|
@ -2043,12 +2043,12 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
|
|||||||
const location = roomObject.getLocation();
|
const location = roomObject.getLocation();
|
||||||
|
|
||||||
if(_arg_3) maskUpdate = new ObjectRoomMaskUpdateMessage(ObjectRoomMaskUpdateMessage.ADD_MASK, maskName, maskType, location);
|
if(_arg_3) maskUpdate = new ObjectRoomMaskUpdateMessage(ObjectRoomMaskUpdateMessage.ADD_MASK, maskName, maskType, location);
|
||||||
else maskUpdate = new ObjectRoomMaskUpdateMessage(ObjectRoomMaskUpdateMessage._Str_10260, maskName);
|
else maskUpdate = new ObjectRoomMaskUpdateMessage(ObjectRoomMaskUpdateMessage.REMOVE_MASK, maskName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
maskUpdate = new ObjectRoomMaskUpdateMessage(ObjectRoomMaskUpdateMessage._Str_10260, maskName);
|
maskUpdate = new ObjectRoomMaskUpdateMessage(ObjectRoomMaskUpdateMessage.REMOVE_MASK, maskName);
|
||||||
}
|
}
|
||||||
|
|
||||||
const roomOwnObject = this.getRoomOwnObject(roomId);
|
const roomOwnObject = this.getRoomOwnObject(roomId);
|
||||||
|
@ -904,7 +904,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
|
|||||||
|
|
||||||
if(!session || session.isSpectator) return;
|
if(!session || session.isSpectator) return;
|
||||||
|
|
||||||
this.sendWalkUpdate(event._Str_16836, event._Str_17676);
|
this.sendWalkUpdate(event.tileXAsInt, event.tileYAsInt);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_24048(event: RoomObjectMouseEvent, roomId: number): void
|
private _Str_24048(event: RoomObjectMouseEvent, roomId: number): void
|
||||||
@ -1429,16 +1429,16 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
|
|||||||
{
|
{
|
||||||
if(this._whereYouClickIsWhereYouGo)
|
if(this._whereYouClickIsWhereYouGo)
|
||||||
{
|
{
|
||||||
return new ObjectTileCursorUpdateMessage(new Vector3d(k._Str_16836, k._Str_17676, k._Str_21459), 0, true, k.eventId);
|
return new ObjectTileCursorUpdateMessage(new Vector3d(k.tileXAsInt, k.tileYAsInt, k.tileZAsInt), 0, true, k.eventId);
|
||||||
}
|
}
|
||||||
|
|
||||||
const roomObject = this._roomEngine.getRoomObjectCursor(roomId);
|
const roomObject = this._roomEngine.getRoomObjectCursor(roomId);
|
||||||
|
|
||||||
if(roomObject && roomObject.visualization)
|
if(roomObject && roomObject.visualization)
|
||||||
{
|
{
|
||||||
const _local_4 = k._Str_16836;
|
const _local_4 = k.tileXAsInt;
|
||||||
const _local_5 = k._Str_17676;
|
const _local_5 = k.tileYAsInt;
|
||||||
const _local_6 = k._Str_21459;
|
const _local_6 = k.tileZAsInt;
|
||||||
const _local_7 = this._roomEngine.getRoomInstance(roomId);
|
const _local_7 = this._roomEngine.getRoomInstance(roomId);
|
||||||
|
|
||||||
if(_local_7)
|
if(_local_7)
|
||||||
|
@ -27,7 +27,7 @@ export class RoomEngineObjectPlacedEvent extends RoomEngineObjectEvent
|
|||||||
this._instanceData = instanceData;
|
this._instanceData = instanceData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_7031(): string
|
public get wallLocation(): string
|
||||||
{
|
{
|
||||||
return this._wallLocation;
|
return this._wallLocation;
|
||||||
}
|
}
|
||||||
@ -52,17 +52,17 @@ export class RoomEngineObjectPlacedEvent extends RoomEngineObjectEvent
|
|||||||
return this._direction;
|
return this._direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_4057(): boolean
|
public get placedInRoom(): boolean
|
||||||
{
|
{
|
||||||
return this._placedInRoom;
|
return this._placedInRoom;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_23888(): boolean
|
public get placedOnFloor(): boolean
|
||||||
{
|
{
|
||||||
return this._placedOnFloor;
|
return this._placedOnFloor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_23432(): boolean
|
public get placedOnWall(): boolean
|
||||||
{
|
{
|
||||||
return this._placedOnWall;
|
return this._placedOnWall;
|
||||||
}
|
}
|
||||||
|
@ -31,17 +31,17 @@ export class RoomObjectTileMouseEvent extends RoomObjectMouseEvent
|
|||||||
return this._tileZ;
|
return this._tileZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_16836(): number
|
public get tileXAsInt(): number
|
||||||
{
|
{
|
||||||
return Math.trunc(this._tileX + 0.499);
|
return Math.trunc(this._tileX + 0.499);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_17676(): number
|
public get tileYAsInt(): number
|
||||||
{
|
{
|
||||||
return Math.trunc(this._tileY + 0.499);
|
return Math.trunc(this._tileY + 0.499);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_21459(): number
|
public get tileZAsInt(): number
|
||||||
{
|
{
|
||||||
return Math.trunc(this._tileZ + 0.499);
|
return Math.trunc(this._tileZ + 0.499);
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ import { Vector3d } from '../../../room/utils/Vector3d';
|
|||||||
export class ObjectRoomMaskUpdateMessage extends RoomObjectUpdateMessage
|
export class ObjectRoomMaskUpdateMessage extends RoomObjectUpdateMessage
|
||||||
{
|
{
|
||||||
public static ADD_MASK: string = 'RORMUM_ADD_MASK';
|
public static ADD_MASK: string = 'RORMUM_ADD_MASK';
|
||||||
public static _Str_10260: string = 'RORMUM_ADD_MASK';
|
public static REMOVE_MASK: string = 'RORMUM_ADD_MASK';
|
||||||
public static DOOR: string = 'door';
|
public static DOOR: string = 'door';
|
||||||
public static WINDOW: string = 'window';
|
public static WINDOW: string = 'window';
|
||||||
public static HOLE: string = 'hole';
|
public static HOLE: string = 'hole';
|
||||||
|
@ -28,7 +28,7 @@ export class ObjectTileCursorUpdateMessage extends RoomObjectUpdateMessage
|
|||||||
return this._visible;
|
return this._visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_20637(): string
|
public get sourceEventId(): string
|
||||||
{
|
{
|
||||||
return this._sourceEventId;
|
return this._sourceEventId;
|
||||||
}
|
}
|
||||||
|
@ -259,7 +259,7 @@ export class RoomLogic extends RoomObjectLogicBase
|
|||||||
|
|
||||||
update = true;
|
update = true;
|
||||||
break;
|
break;
|
||||||
case ObjectRoomMaskUpdateMessage._Str_10260:
|
case ObjectRoomMaskUpdateMessage.REMOVE_MASK:
|
||||||
update = this._planeBitmapMaskParser.removeMask(message.maskId);
|
update = this._planeBitmapMaskParser.removeMask(message.maskId);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ export class TileCursorLogic extends RoomObjectLogicBase
|
|||||||
{
|
{
|
||||||
if(!(message instanceof ObjectTileCursorUpdateMessage)) return;
|
if(!(message instanceof ObjectTileCursorUpdateMessage)) return;
|
||||||
|
|
||||||
if(this._lastEventId && (this._lastEventId === message._Str_20637)) return;
|
if(this._lastEventId && (this._lastEventId === message.sourceEventId)) return;
|
||||||
|
|
||||||
if(message.toggleVisibility) this._isHidden = !this._isHidden;
|
if(message.toggleVisibility) this._isHidden = !this._isHidden;
|
||||||
|
|
||||||
@ -61,6 +61,6 @@ export class TileCursorLogic extends RoomObjectLogicBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._lastEventId = message._Str_20637;
|
this._lastEventId = message.sourceEventId;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,8 +1,8 @@
|
|||||||
import { IConnection } from '../../../core/communication/connections/IConnection';
|
import { IConnection } from '../../../core/communication/connections/IConnection';
|
||||||
import { IRoomHandlerListener } from '../IRoomHandlerListener';
|
|
||||||
import { BaseHandler } from './BaseHandler';
|
|
||||||
import { FurnitureGiftOpenedEvent } from '../../communication/messages/incoming/inventory/furni/gifts/FurnitureGiftOpenedEvent';
|
import { FurnitureGiftOpenedEvent } from '../../communication/messages/incoming/inventory/furni/gifts/FurnitureGiftOpenedEvent';
|
||||||
import { RoomSessionPresentEvent } from '../events/RoomSessionPresentEvent';
|
import { RoomSessionPresentEvent } from '../events/RoomSessionPresentEvent';
|
||||||
|
import { IRoomHandlerListener } from '../IRoomHandlerListener';
|
||||||
|
import { BaseHandler } from './BaseHandler';
|
||||||
|
|
||||||
export class RoomPresentHandler extends BaseHandler
|
export class RoomPresentHandler extends BaseHandler
|
||||||
{
|
{
|
||||||
@ -29,7 +29,7 @@ export class RoomPresentHandler extends BaseHandler
|
|||||||
|
|
||||||
if(this.listener && this.listener.events) this.listener.events.dispatchEvent(
|
if(this.listener && this.listener.events) this.listener.events.dispatchEvent(
|
||||||
new RoomSessionPresentEvent(RoomSessionPresentEvent.RSPE_PRESENT_OPENED, session, parser.classId, parser._Str_2887,
|
new RoomSessionPresentEvent(RoomSessionPresentEvent.RSPE_PRESENT_OPENED, session, parser.classId, parser._Str_2887,
|
||||||
parser.productCode, parser.placedItemId, parser.placedItemType, parser._Str_4057, parser.petFigureString));
|
parser.productCode, parser.placedItemId, parser.placedItemType, parser.placedInRoom, parser.petFigureString));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user