From b947df37c9946c062b5aa4261d695462498cf95b Mon Sep 17 00:00:00 2001 From: Bill Date: Wed, 16 Feb 2022 04:37:26 -0500 Subject: [PATCH] Add :shake & :rotate command --- .../widgets/handlers/RoomWidgetChatInputHandler.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/api/nitro/room/widgets/handlers/RoomWidgetChatInputHandler.ts b/src/api/nitro/room/widgets/handlers/RoomWidgetChatInputHandler.ts index b286dd1a..879f8367 100644 --- a/src/api/nitro/room/widgets/handlers/RoomWidgetChatInputHandler.ts +++ b/src/api/nitro/room/widgets/handlers/RoomWidgetChatInputHandler.ts @@ -1,4 +1,4 @@ -import { AvatarExpressionEnum, HabboClubLevelEnum, NitroEvent, RoomControllerLevel, RoomSessionChatEvent, RoomSettingsComposer, RoomWidgetEnum, RoomZoomEvent, TextureUtils } from '@nitrots/nitro-renderer'; +import { AvatarExpressionEnum, HabboClubLevelEnum, NitroEvent, RoomControllerLevel, RoomRotatingEffect, RoomSessionChatEvent, RoomSettingsComposer, RoomShakingEffect, RoomWidgetEnum, RoomZoomEvent, TextureUtils } from '@nitrots/nitro-renderer'; import { GetConfiguration, GetNitroInstance } from '../../..'; import { GetRoomEngine, GetSessionDataManager, LocalizeText } from '../../../..'; import { FloorplanEditorEvent } from '../../../../../events/floorplan-editor/FloorplanEditorEvent'; @@ -66,6 +66,17 @@ export class RoomWidgetChatInputHandler extends RoomWidgetHandler switch(firstPart.toLowerCase()) { + case ':shake': + RoomShakingEffect.init(2500, 5000); + RoomShakingEffect.turnVisualizationOn(); + + return null; + + case ':rotate': + RoomRotatingEffect.init(2500, 5000); + RoomRotatingEffect.turnVisualizationOn(); + + return null; case ':d': case ';d': if(GetSessionDataManager().clubLevel === HabboClubLevelEnum.VIP) @@ -110,6 +121,7 @@ export class RoomWidgetChatInputHandler extends RoomWidgetHandler return null; case ':iddqd': + case ':flip': GetRoomEngine().events.dispatchEvent(new RoomZoomEvent(this.container.roomSession.roomId, -1, true)); return null;