mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-14 21:16:48 +00:00
feat: move MC into Essentials
In order to solve some dependency issues that keep cropping up, MC should be moved back into the Essentials repo and loaded automatically on startup. This will allow for all plugins that use the MC Messengers library to use the same version without fear of overwriting a dll due to loading of plugin libraries.
This commit is contained in:
parent
3d91723ab0
commit
f6fdc14059
89 changed files with 15625 additions and 7 deletions
|
|
@ -261,6 +261,7 @@ namespace PepperDash.Essentials
|
|||
_ = new DeviceFactory();
|
||||
|
||||
_ = new ProcessorExtensionDeviceFactory();
|
||||
_ = new MobileControl.MobileControlFactory();
|
||||
|
||||
Debug.LogMessage(LogEventLevel.Information, "Starting Essentials load from configuration");
|
||||
|
||||
|
|
@ -469,26 +470,34 @@ namespace PepperDash.Essentials
|
|||
/// Reads all rooms from config and adds them to DeviceManager
|
||||
/// </summary>
|
||||
public void LoadRooms()
|
||||
{
|
||||
{
|
||||
if (ConfigReader.ConfigObject.Rooms == null)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Information, "Notice: Configuration contains no rooms - Is this intentional? This may be a valid configuration.");
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var roomConfig in ConfigReader.ConfigObject.Rooms)
|
||||
foreach (var roomConfig in ConfigReader.ConfigObject.Rooms)
|
||||
{
|
||||
var room = Core.DeviceFactory.GetDevice(roomConfig);
|
||||
|
||||
DeviceManager.AddDevice(room);
|
||||
if (room is ICustomMobileControl)
|
||||
try
|
||||
{
|
||||
continue;
|
||||
var room = Core.DeviceFactory.GetDevice(roomConfig);
|
||||
|
||||
DeviceManager.AddDevice(room);
|
||||
if (room is ICustomMobileControl)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
} catch (Exception ex)
|
||||
{
|
||||
Debug.LogMessage(ex, "Exception loading room {roomKey}:{roomType}", null, roomConfig.Key, roomConfig.Type);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Debug.LogMessage(LogEventLevel.Information, "All Rooms Loaded.");
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -54,5 +54,7 @@
|
|||
<ItemGroup>
|
||||
<ProjectReference Include="..\PepperDash.Essentials.Core\PepperDash.Essentials.Core.csproj" />
|
||||
<ProjectReference Include="..\PepperDash.Essentials.Devices.Common\PepperDash.Essentials.Devices.Common.csproj" />
|
||||
<ProjectReference Include="..\PepperDash.Essentials.MobileControl.Messengers\PepperDash.Essentials.MobileControl.Messengers.csproj" />
|
||||
<ProjectReference Include="..\PepperDash.Essentials.MobileControl\PepperDash.Essentials.MobileControl.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Loading…
Add table
Add a link
Reference in a new issue