mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-31 11:12:35 +01:00
Add FurnitureMysteryBoxLogic
This commit is contained in:
parent
3f025a030e
commit
471c171d47
@ -4,7 +4,7 @@ import { IEventDispatcher } from '../../core/events/IEventDispatcher';
|
||||
import { IRoomObjectEventHandler } from '../../room/object/logic/IRoomObjectEventHandler';
|
||||
import { IRoomObjectLogicFactory } from '../../room/object/logic/IRoomObjectLogicFactory';
|
||||
import { RoomObjectLogicBase } from '../../room/object/logic/RoomObjectLogicBase';
|
||||
import { FurnitureEffectBoxLogic, FurnitureLoveLockLogic, FurnitureMonsterplantSeedLogic, FurnitureMysteryTrophyLogic, FurnitureRandomTeleportLogic, FurnitureRentableSpaceLogic } from './object';
|
||||
import { FurnitureEffectBoxLogic, FurnitureLoveLockLogic, FurnitureMonsterplantSeedLogic, FurnitureMysteryBoxLogic, FurnitureMysteryTrophyLogic, FurnitureRandomTeleportLogic, FurnitureRentableSpaceLogic } from './object';
|
||||
import { AvatarLogic } from './object/logic/avatar/AvatarLogic';
|
||||
import { FurnitureBadgeDisplayLogic } from './object/logic/furniture/FurnitureBadgeDisplayLogic';
|
||||
import { FurnitureChangeStateWhenStepOnLogic } from './object/logic/furniture/FurnitureChangeStateWhenStepOnLogic';
|
||||
@ -295,6 +295,9 @@ export class RoomObjectLogicFactory implements IRoomObjectLogicFactory
|
||||
case RoomObjectLogicType.FURNITURE_MONSTERPLANT_SEED:
|
||||
logic = FurnitureMonsterplantSeedLogic;
|
||||
break;
|
||||
case RoomObjectLogicType.FURNITURE_MYSTERYBOX:
|
||||
logic = FurnitureMysteryBoxLogic;
|
||||
break;
|
||||
case RoomObjectLogicType.FURNITURE_MYSTERYTROPHY:
|
||||
logic = FurnitureMysteryTrophyLogic;
|
||||
break;
|
||||
|
@ -0,0 +1,25 @@
|
||||
import { ContextMenuEnum } from '../../../../ui';
|
||||
import { RoomObjectWidgetRequestEvent } from '../../../events/RoomObjectWidgetRequestEvent';
|
||||
import { FurnitureMultiStateLogic } from './FurnitureMultiStateLogic';
|
||||
|
||||
export class FurnitureMysteryBoxLogic extends FurnitureMultiStateLogic
|
||||
{
|
||||
public getEventTypes(): string[]
|
||||
{
|
||||
const types = [ RoomObjectWidgetRequestEvent.MYSTERYBOX_OPEN_DIALOG ];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public useObject(): void
|
||||
{
|
||||
if(!this.eventDispatcher || !this.object) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.MYSTERYBOX_OPEN_DIALOG, this.object));
|
||||
}
|
||||
|
||||
public get contextMenu(): string
|
||||
{
|
||||
return ContextMenuEnum.MYSTERY_BOX;
|
||||
}
|
||||
}
|
@ -24,6 +24,7 @@ export * from './FurnitureMannequinLogic';
|
||||
export * from './FurnitureMonsterplantSeedLogic';
|
||||
export * from './FurnitureMultiHeightLogic';
|
||||
export * from './FurnitureMultiStateLogic';
|
||||
export * from './FurnitureMysteryBoxLogic';
|
||||
export * from './FurnitureMysteryTrophyLogic';
|
||||
export * from './FurnitureOneWayDoorLogic';
|
||||
export * from './FurniturePetCustomizationLogic';
|
||||
|
Loading…
x
Reference in New Issue
Block a user