mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
Moves IBridge condition to the top of the list to allow plugin bridges to override existing ones.
This commit is contained in:
@@ -78,7 +78,12 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
|
|
||||||
if (device != null)
|
if (device != null)
|
||||||
{
|
{
|
||||||
if (device is PepperDash.Essentials.Core.Monitoring.SystemMonitorController)
|
if (device is IBridge) // Check for this first to allow bridges in plugins to override existing bridges that apply to the same type.
|
||||||
|
{
|
||||||
|
(device as IBridge).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if (device is PepperDash.Essentials.Core.Monitoring.SystemMonitorController)
|
||||||
{
|
{
|
||||||
(device as PepperDash.Essentials.Core.Monitoring.SystemMonitorController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
(device as PepperDash.Essentials.Core.Monitoring.SystemMonitorController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||||
continue;
|
continue;
|
||||||
@@ -138,11 +143,6 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
(device as AppleTV).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
(device as AppleTV).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (device is IBridge)
|
|
||||||
{
|
|
||||||
(device as IBridge).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else if (device is HdMdxxxCEController)
|
else if (device is HdMdxxxCEController)
|
||||||
{
|
{
|
||||||
(device as HdMdxxxCEController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
(device as HdMdxxxCEController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||||
|
|||||||
Reference in New Issue
Block a user