From c262e7c3c56cade2cd23cd834e951ff598f05af0 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Tue, 19 Jan 2021 17:04:06 -0700 Subject: [PATCH] minor fixes to allow build to succeed. --- PepperDashEssentials/ControlSystem.cs | 10 +++------- .../Room/Components/ComponentFactory.cs | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/PepperDashEssentials/ControlSystem.cs b/PepperDashEssentials/ControlSystem.cs index 143929c9..95d8d169 100644 --- a/PepperDashEssentials/ControlSystem.cs +++ b/PepperDashEssentials/ControlSystem.cs @@ -439,14 +439,13 @@ namespace PepperDash.Essentials } else { - room = new ComponentRoom(roomConfig) + room = new ComponentRoom(roomConfig); } if (room != null && room is EssentialsRoomBase) { if (room is EssentialsHuddleSpaceRoom) { - DeviceManager.AddDevice(room); Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleSpaceRoom, attempting to add to DeviceManager with Fusion"); DeviceManager.AddDevice(new Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase((EssentialsHuddleSpaceRoom)room, 0xf1)); @@ -458,7 +457,6 @@ namespace PepperDash.Essentials } else if (room is EssentialsHuddleVtc1Room) { - DeviceManager.AddDevice(room); Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleVtc1Room, attempting to add to DeviceManager with Fusion"); DeviceManager.AddDevice(new EssentialsHuddleVtc1FusionController((EssentialsHuddleVtc1Room)room, 0xf1)); @@ -470,13 +468,11 @@ namespace PepperDash.Essentials else { Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is NOT EssentialsRoom, attempting to add to DeviceManager w/o Fusion"); - DeviceManager.AddDevice(room); } - } - else if (room != null && room is ComponentRoom) + else if (room != null) { - + DeviceManager.AddDevice(room); } else Debug.Console(0, Debug.ErrorLogLevel.Notice, "Notice: Cannot create room from config, key '{0}' - Is this intentional? This may be a valid configuration.", roomConfig.Key); diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Room/Components/ComponentFactory.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Room/Components/ComponentFactory.cs index fab33c27..16e8e641 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Room/Components/ComponentFactory.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Room/Components/ComponentFactory.cs @@ -35,7 +35,7 @@ namespace PepperDash.Essentials.Core.Room.Components public static class ComponentFactory { - public static ComponentFactory() + static ComponentFactory() { var assy = Assembly.GetExecutingAssembly(); PluginLoader.SetEssentialsAssembly(assy.GetName().Name, assy);