Post-it Sticky Pole Packets

This commit is contained in:
MyNameIsBatman 2021-09-18 01:58:00 -03:00
parent 100ef54328
commit d8a4b0e24a
8 changed files with 73 additions and 1 deletions

View File

@ -156,6 +156,7 @@ import { FurnitureFloorUpdateEvent } from './messages/incoming/room/furniture/fl
import { FurnitureAliasesEvent } from './messages/incoming/room/furniture/FurnitureAliasesEvent'; import { FurnitureAliasesEvent } from './messages/incoming/room/furniture/FurnitureAliasesEvent';
import { FurnitureDataEvent } from './messages/incoming/room/furniture/FurnitureDataEvent'; import { FurnitureDataEvent } from './messages/incoming/room/furniture/FurnitureDataEvent';
import { FurnitureItemDataEvent } from './messages/incoming/room/furniture/FurnitureItemDataEvent'; import { FurnitureItemDataEvent } from './messages/incoming/room/furniture/FurnitureItemDataEvent';
import { FurniturePostItStickyPoleOpenEvent } from './messages/incoming/room/furniture/FurniturePostItStickyPoleOpenEvent';
import { FurnitureStackHeightEvent } from './messages/incoming/room/furniture/FurnitureStackHeightEvent'; import { FurnitureStackHeightEvent } from './messages/incoming/room/furniture/FurnitureStackHeightEvent';
import { FurnitureState2Event } from './messages/incoming/room/furniture/FurnitureState2Event'; import { FurnitureState2Event } from './messages/incoming/room/furniture/FurnitureState2Event';
import { FurnitureStateEvent } from './messages/incoming/room/furniture/FurnitureStateEvent'; import { FurnitureStateEvent } from './messages/incoming/room/furniture/FurnitureStateEvent';
@ -395,6 +396,7 @@ import { FurniturePickupComposer } from './messages/outgoing/room/furniture/Furn
import { FurniturePlaceComposer } from './messages/outgoing/room/furniture/FurniturePlaceComposer'; import { FurniturePlaceComposer } from './messages/outgoing/room/furniture/FurniturePlaceComposer';
import { FurniturePlacePaintComposer } from './messages/outgoing/room/furniture/FurniturePlacePaintComposer'; import { FurniturePlacePaintComposer } from './messages/outgoing/room/furniture/FurniturePlacePaintComposer';
import { FurniturePostItPlaceComposer } from './messages/outgoing/room/furniture/FurniturePostItPlaceComposer'; import { FurniturePostItPlaceComposer } from './messages/outgoing/room/furniture/FurniturePostItPlaceComposer';
import { FurniturePostItSaveStickyPoleComposer } from './messages/outgoing/room/furniture/FurniturePostItSaveStickyPoleComposer';
import { FurnitureColorWheelComposer } from './messages/outgoing/room/furniture/logic/FurnitureColorWheelComposer'; import { FurnitureColorWheelComposer } from './messages/outgoing/room/furniture/logic/FurnitureColorWheelComposer';
import { FurnitureDiceActivateComposer } from './messages/outgoing/room/furniture/logic/FurnitureDiceActivateComposer'; import { FurnitureDiceActivateComposer } from './messages/outgoing/room/furniture/logic/FurnitureDiceActivateComposer';
import { FurnitureDiceDeactivateComposer } from './messages/outgoing/room/furniture/logic/FurnitureDiceDeactivateComposer'; import { FurnitureDiceDeactivateComposer } from './messages/outgoing/room/furniture/logic/FurnitureDiceDeactivateComposer';
@ -710,6 +712,7 @@ export class NitroMessages implements IMessageConfiguration
this._events.set(IncomingHeader.LOVELOCK_FURNI_START, LoveLockFurniStartEvent); this._events.set(IncomingHeader.LOVELOCK_FURNI_START, LoveLockFurniStartEvent);
this._events.set(IncomingHeader.OBJECTS_DATA_UPDATE, ObjectsDataUpdateEvent); this._events.set(IncomingHeader.OBJECTS_DATA_UPDATE, ObjectsDataUpdateEvent);
this._events.set(IncomingHeader.FURNITURE_GROUP_CONTEXT_MENU_INFO, GroupFurniContextMenuInfoMessageEvent); this._events.set(IncomingHeader.FURNITURE_GROUP_CONTEXT_MENU_INFO, GroupFurniContextMenuInfoMessageEvent);
this._events.set(IncomingHeader.FURNITURE_POSTIT_STICKY_POLE_OPEN, FurniturePostItStickyPoleOpenEvent);
// FLOOR // FLOOR
this._events.set(IncomingHeader.FURNITURE_FLOOR_ADD, FurnitureFloorAddEvent); this._events.set(IncomingHeader.FURNITURE_FLOOR_ADD, FurnitureFloorAddEvent);
@ -1119,6 +1122,7 @@ export class NitroMessages implements IMessageConfiguration
this._composers.set(OutgoingHeader.FURNITURE_PLACE, FurniturePlaceComposer); this._composers.set(OutgoingHeader.FURNITURE_PLACE, FurniturePlaceComposer);
this._composers.set(OutgoingHeader.ITEM_PAINT, FurniturePlacePaintComposer); this._composers.set(OutgoingHeader.ITEM_PAINT, FurniturePlacePaintComposer);
this._composers.set(OutgoingHeader.FURNITURE_POSTIT_PLACE, FurniturePostItPlaceComposer); this._composers.set(OutgoingHeader.FURNITURE_POSTIT_PLACE, FurniturePostItPlaceComposer);
this._composers.set(OutgoingHeader.FURNITURE_POSTIT_SAVE_STICKY_POLE, FurniturePostItSaveStickyPoleComposer);
// FLOOR // FLOOR
this._composers.set(OutgoingHeader.FURNITURE_FLOOR_UPDATE, FurnitureFloorUpdateComposer); this._composers.set(OutgoingHeader.FURNITURE_FLOOR_UPDATE, FurnitureFloorUpdateComposer);

View File

@ -30,7 +30,8 @@ export class IncomingHeader
public static FURNITURE_FLOOR_UPDATE = 3776; public static FURNITURE_FLOOR_UPDATE = 3776;
public static FURNITURE_ITEMDATA = 2202; public static FURNITURE_ITEMDATA = 2202;
public static FURNITURE_STATE = 2376; public static FURNITURE_STATE = 2376;
public static FURNITURE_GROUP_CONTEXT_MENU_INFO= 3293; public static FURNITURE_GROUP_CONTEXT_MENU_INFO = 3293;
public static FURNITURE_POSTIT_STICKY_POLE_OPEN = 2366;
public static GAME_CENTER_ACHIEVEMENTS = 2265; public static GAME_CENTER_ACHIEVEMENTS = 2265;
public static GAME_CENTER_GAME_LIST = 222; public static GAME_CENTER_GAME_LIST = 222;
public static GAME_CENTER_STATUS = 2893; public static GAME_CENTER_STATUS = 2893;

View File

@ -0,0 +1,16 @@
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
import { FurniturePostItStickyPoleOpenParser } from '../../../parser/room/furniture/FurniturePostItStickyPoleOpenParser';
export class FurniturePostItStickyPoleOpenEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)
{
super(callBack, FurniturePostItStickyPoleOpenParser);
}
public getParser(): FurniturePostItStickyPoleOpenParser
{
return this.parser as FurniturePostItStickyPoleOpenParser;
}
}

View File

@ -2,6 +2,7 @@ export * from './floor';
export * from './FurnitureAliasesEvent'; export * from './FurnitureAliasesEvent';
export * from './FurnitureDataEvent'; export * from './FurnitureDataEvent';
export * from './FurnitureItemDataEvent'; export * from './FurnitureItemDataEvent';
export * from './FurniturePostItStickyPoleOpenEvent';
export * from './FurnitureStackHeightEvent'; export * from './FurnitureStackHeightEvent';
export * from './FurnitureState2Event'; export * from './FurnitureState2Event';
export * from './FurnitureStateEvent'; export * from './FurnitureStateEvent';

View File

@ -31,6 +31,7 @@ export class OutgoingHeader
public static FURNITURE_PICKUP = 3456; public static FURNITURE_PICKUP = 3456;
public static FURNITURE_PLACE = 1258; public static FURNITURE_PLACE = 1258;
public static FURNITURE_POSTIT_PLACE = 2248; public static FURNITURE_POSTIT_PLACE = 2248;
public static FURNITURE_POSTIT_SAVE_STICKY_POLE = 3283;
public static FURNITURE_RANDOMSTATE = 3617; public static FURNITURE_RANDOMSTATE = 3617;
public static FURNITURE_WALL_MULTISTATE = 210; public static FURNITURE_WALL_MULTISTATE = 210;
public static FURNITURE_WALL_UPDATE = 168; public static FURNITURE_WALL_UPDATE = 168;

View File

@ -0,0 +1,21 @@
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
export class FurniturePostItSaveStickyPoleComposer implements IMessageComposer<ConstructorParameters<typeof FurniturePostItSaveStickyPoleComposer>>
{
private _data: ConstructorParameters<typeof FurniturePostItSaveStickyPoleComposer>;
constructor(itemId: number, wallLocation: string, color: string, text: string)
{
this._data = [ itemId, wallLocation, color, text ];
}
public getMessageArray()
{
return this._data;
}
public dispose(): void
{
return;
}
}

View File

@ -6,6 +6,7 @@ export * from './FurniturePickupComposer';
export * from './FurniturePlaceComposer'; export * from './FurniturePlaceComposer';
export * from './FurniturePlacePaintComposer'; export * from './FurniturePlacePaintComposer';
export * from './FurniturePostItPlaceComposer'; export * from './FurniturePostItPlaceComposer';
export * from './FurniturePostItSaveStickyPoleComposer';
export * from './logic'; export * from './logic';
export * from './mannequin'; export * from './mannequin';
export * from './presents'; export * from './presents';

View File

@ -0,0 +1,27 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../../core';
export class FurniturePostItStickyPoleOpenParser implements IMessageParser
{
private _itemId: number;
public flush(): boolean
{
this._itemId = 0;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._itemId = parseInt(wrapper.readString());
return true;
}
public get furnitureId(): number
{
return this._itemId;
}
}