cleaned IRoomEngineServices

This commit is contained in:
Dank074 2021-06-12 15:49:11 -05:00
parent ea1c12a9e9
commit 9f2c1fa2f0
3 changed files with 28 additions and 28 deletions

View File

@ -38,10 +38,10 @@ export interface IRoomEngineServices
removeRoomObjectUser(roomId: number, objectId: number): void;
loadRoomObjectBadgeImage(roomId: number, objectId: number, objectCategory: number, badgeId: string, groupBadge?: boolean): void;
updateRoomObjectMask(roomId: number, objectId: number, _arg_?: boolean): void;
_Str_16645(objectId: number, category: number, _arg_3: boolean, instanceData?: string, stuffData?: IObjectData, state?: number, frameNumber?: number, posture?: string): void;
_Str_7972(k: boolean): void;
setObjectMoverIconSprite(objectId: number, category: number, _arg_3: boolean, instanceData?: string, stuffData?: IObjectData, state?: number, frameNumber?: number, posture?: string): void;
setObjectMoverIconSpriteVisible(k: boolean): void;
updateMousePointer(type: string, objectId: number, objectType: string): void;
_Str_17948(): void;
removeObjectMoverIconSprite(): void;
getRoomTileObjectMap(k: number): TileObjectMap;
isPlayingGame(): boolean;
connection: IConnection;
@ -50,4 +50,4 @@ export interface IRoomEngineServices
activeRoomId: number;
events: IEventDispatcher;
isDecorating: boolean;
}
}

View File

@ -2724,7 +2724,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
this._roomObjectEventHandler._Str_8675(this._activeRoomId);
}
private _Str_24651(k: Sprite, _arg_2: string, _arg_3: Texture, scale: number = 1): Sprite
private addOverlayIconSprite(k: Sprite, _arg_2: string, _arg_3: Texture, scale: number = 1): Sprite
{
if(!k || !_arg_3) return;
@ -2769,7 +2769,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
}
}
public _Str_16645(objectId: number, category: number, _arg_3: boolean, instanceData: string = null, stuffData: IObjectData = null, state: number = -1, frameNumber: number = -1, posture: string = null): void
public setObjectMoverIconSprite(objectId: number, category: number, _arg_3: boolean, instanceData: string = null, stuffData: IObjectData = null, state: number = -1, frameNumber: number = -1, posture: string = null): void
{
let type: string = null;
let colorIndex = 0;
@ -2828,9 +2828,9 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
const overlay = this.getRenderingCanvasOverlay(canvas);
this._Str_21215(overlay, RoomEngine.OBJECT_ICON_SPRITE);
this.removeOverlayIconSprite(overlay, RoomEngine.OBJECT_ICON_SPRITE);
const _local_15 = this._Str_24651(overlay, RoomEngine.OBJECT_ICON_SPRITE, imageResult.data, scale);
const _local_15 = this.addOverlayIconSprite(overlay, RoomEngine.OBJECT_ICON_SPRITE, imageResult.data, scale);
if(_local_15)
{
@ -3266,7 +3266,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
if(geometry) geometry.dispose();
}
public _Str_7972(k: boolean): void
public setObjectMoverIconSpriteVisible(k: boolean): void
{
const canvas = this.getActiveRoomInstanceRenderingCanvas();
@ -3281,7 +3281,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
}
}
public _Str_17948(): void
public removeObjectMoverIconSprite(): void
{
const canvas = this.getActiveRoomInstanceRenderingCanvas();
@ -3289,7 +3289,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
const sprite = this.getRenderingCanvasOverlay(canvas);
this._Str_21215(sprite, RoomEngine.OBJECT_ICON_SPRITE);
this.removeOverlayIconSprite(sprite, RoomEngine.OBJECT_ICON_SPRITE);
}
private getRenderingCanvasOverlay(k: IRoomRenderingCanvas): Sprite
@ -3307,7 +3307,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
return sprite;
}
private _Str_21215(k: Sprite, _arg_2: string): boolean
private removeOverlayIconSprite(k: Sprite, _arg_2: string): boolean
{
if(!k) return false;

View File

@ -187,8 +187,8 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
if(this._roomEngine)
{
this._roomEngine._Str_16645(typeId, category, false, extra, stuffData, state, frameNumber, posture);
this._roomEngine._Str_7972(false);
this._roomEngine.setObjectMoverIconSprite(typeId, category, false, extra, stuffData, state, frameNumber, posture);
this._roomEngine.setObjectMoverIconSpriteVisible(false);
}
return true;
@ -196,7 +196,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
public _Str_8675(k: number): boolean
{
this._Str_13199(k);
this.resetSelectedObjectData(k);
return true;
}
@ -969,13 +969,13 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
{
this.setFurnitureAlphaMultiplier(roomObject, 0.5);
this._roomEngine._Str_7972(false);
this._roomEngine.setObjectMoverIconSpriteVisible(false);
}
else
{
this.setFurnitureAlphaMultiplier(roomObject, 0);
this._roomEngine._Str_7972(true);
this._roomEngine.setObjectMoverIconSpriteVisible(true);
}
}
@ -1044,7 +1044,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
}
this.setFurnitureAlphaMultiplier(roomObject, 0.5);
this._roomEngine._Str_7972(true);
this._roomEngine.setObjectMoverIconSpriteVisible(true);
}
if(roomObject)
@ -1100,7 +1100,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
}
}
this._roomEngine._Str_7972(!_local_12);
this._roomEngine.setObjectMoverIconSpriteVisible(!_local_12);
}
}
@ -1547,7 +1547,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
this._roomEngine.setPlacedRoomObjectData(roomId, new SelectedRoomObjectData(selectedData.id, selectedData.category, null, selectedData.dir, null));
this._Str_13199(roomId);
this.resetSelectedObjectData(roomId);
if(this._roomEngine && this._roomEngine.events)
{
@ -1676,15 +1676,15 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
_local_9 = false;
this.setFurnitureAlphaMultiplier(roomObject, 0.5);
this.setSelectedRoomObjectData(roomId, roomObject.id, category, roomObject.getLocation(), roomObject.getDirection(), operation);
this._roomEngine._Str_16645(roomObject.id, category, true);
this._roomEngine._Str_7972(false);
this._roomEngine.setObjectMoverIconSprite(roomObject.id, category, true);
this._roomEngine.setObjectMoverIconSpriteVisible(false);
break;
case RoomObjectOperationType.OBJECT_MOVE_TO: {
const selectedData = this.getSelectedRoomObjectData(roomId);
this._Str_16022(roomId, selectedData.id, selectedData.category, selectedData.loc, selectedData.dir, RoomObjectOperationType.OBJECT_MOVE_TO, selectedData.typeId, selectedData.instanceData, selectedData.stuffData, selectedData.state, selectedData.animFrame, selectedData.posture);
this.setFurnitureAlphaMultiplier(roomObject, 1);
this._roomEngine._Str_17948();
this._roomEngine.removeObjectMoverIconSprite();
if(this._roomEngine.connection)
{
@ -1731,7 +1731,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
}
}
if(_local_9) this._Str_13199(roomId);
if(_local_9) this.resetSelectedObjectData(roomId);
return true;
}
@ -1940,11 +1940,11 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
}
}
private _Str_13199(roomId: number): void
private resetSelectedObjectData(roomId: number): void
{
if(!this._roomEngine) return;
this._roomEngine._Str_17948();
this._roomEngine.removeObjectMoverIconSprite();
const selectedData = this.getSelectedRoomObjectData(roomId);
@ -2014,14 +2014,14 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
public cancelRoomObjectPlacement(roomId: number): boolean
{
this._Str_13199(roomId);
this.resetSelectedObjectData(roomId);
return true;
}
private setSelectedRoomObjectData(roomId: number, id: number, category: number, location: IVector3D, direction: IVector3D, operation: string, typeId: number = 0, instanceData: string = null, stuffData: IObjectData =null, state: number = -1, frameNumber: number = -1, posture: string = null): void
{
this._Str_13199(roomId);
this.resetSelectedObjectData(roomId);
if(!this._roomEngine) return;