cleaned RoomEngineObjectPlacedEvent

This commit is contained in:
Dank074 2021-06-12 15:05:04 -05:00
parent 035779da57
commit ea1c12a9e9
10 changed files with 27 additions and 27 deletions

View File

@ -60,7 +60,7 @@ export class FurnitureGiftOpenedParser implements IMessageParser
return this._Str_3970;
}
public get _Str_4057():boolean
public get placedInRoom():boolean
{
return this._Str_3224;
}

View File

@ -2043,12 +2043,12 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
const location = roomObject.getLocation();
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
{
maskUpdate = new ObjectRoomMaskUpdateMessage(ObjectRoomMaskUpdateMessage._Str_10260, maskName);
maskUpdate = new ObjectRoomMaskUpdateMessage(ObjectRoomMaskUpdateMessage.REMOVE_MASK, maskName);
}
const roomOwnObject = this.getRoomOwnObject(roomId);

View File

@ -904,7 +904,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
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
@ -1429,16 +1429,16 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
{
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);
if(roomObject && roomObject.visualization)
{
const _local_4 = k._Str_16836;
const _local_5 = k._Str_17676;
const _local_6 = k._Str_21459;
const _local_4 = k.tileXAsInt;
const _local_5 = k.tileYAsInt;
const _local_6 = k.tileZAsInt;
const _local_7 = this._roomEngine.getRoomInstance(roomId);
if(_local_7)

View File

@ -27,7 +27,7 @@ export class RoomEngineObjectPlacedEvent extends RoomEngineObjectEvent
this._instanceData = instanceData;
}
public get _Str_7031(): string
public get wallLocation(): string
{
return this._wallLocation;
}
@ -52,17 +52,17 @@ export class RoomEngineObjectPlacedEvent extends RoomEngineObjectEvent
return this._direction;
}
public get _Str_4057(): boolean
public get placedInRoom(): boolean
{
return this._placedInRoom;
}
public get _Str_23888(): boolean
public get placedOnFloor(): boolean
{
return this._placedOnFloor;
}
public get _Str_23432(): boolean
public get placedOnWall(): boolean
{
return this._placedOnWall;
}

View File

@ -31,18 +31,18 @@ export class RoomObjectTileMouseEvent extends RoomObjectMouseEvent
return this._tileZ;
}
public get _Str_16836(): number
public get tileXAsInt(): number
{
return Math.trunc(this._tileX + 0.499);
}
public get _Str_17676(): number
public get tileYAsInt(): number
{
return Math.trunc(this._tileY + 0.499);
}
public get _Str_21459(): number
public get tileZAsInt(): number
{
return Math.trunc(this._tileZ + 0.499);
}
}
}

View File

@ -5,7 +5,7 @@ import { Vector3d } from '../../../room/utils/Vector3d';
export class ObjectRoomMaskUpdateMessage extends RoomObjectUpdateMessage
{
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 WINDOW: string = 'window';
public static HOLE: string = 'hole';
@ -51,4 +51,4 @@ export class ObjectRoomMaskUpdateMessage extends RoomObjectUpdateMessage
{
return this._maskCategory;
}
}
}

View File

@ -28,7 +28,7 @@ export class ObjectTileCursorUpdateMessage extends RoomObjectUpdateMessage
return this._visible;
}
public get _Str_20637(): string
public get sourceEventId(): string
{
return this._sourceEventId;
}
@ -37,4 +37,4 @@ export class ObjectTileCursorUpdateMessage extends RoomObjectUpdateMessage
{
return this._toggleVisibility;
}
}
}

View File

@ -259,7 +259,7 @@ export class RoomLogic extends RoomObjectLogicBase
update = true;
break;
case ObjectRoomMaskUpdateMessage._Str_10260:
case ObjectRoomMaskUpdateMessage.REMOVE_MASK:
update = this._planeBitmapMaskParser.removeMask(message.maskId);
break;

View File

@ -34,7 +34,7 @@ export class TileCursorLogic extends RoomObjectLogicBase
{
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;
@ -61,6 +61,6 @@ export class TileCursorLogic extends RoomObjectLogicBase
}
}
this._lastEventId = message._Str_20637;
this._lastEventId = message.sourceEventId;
}
}
}

View File

@ -1,8 +1,8 @@
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 { RoomSessionPresentEvent } from '../events/RoomSessionPresentEvent';
import { IRoomHandlerListener } from '../IRoomHandlerListener';
import { BaseHandler } from './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(
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));
}