air alarm signal ports and other stuff (#18642)
Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -30,15 +30,11 @@ public sealed class SignalSwitchSystem : EntitySystem
|
||||
|
||||
comp.State = !comp.State;
|
||||
_deviceLink.InvokePort(uid, comp.State ? comp.OnPort : comp.OffPort);
|
||||
var data = new NetworkPayload
|
||||
{
|
||||
[DeviceNetworkConstants.LogicState] = comp.State ? SignalState.High : SignalState.Low
|
||||
};
|
||||
|
||||
// only send status if it's a toggle switch and not a button
|
||||
if (comp.OnPort != comp.OffPort)
|
||||
{
|
||||
_deviceLink.InvokePort(uid, comp.StatusPort, data);
|
||||
_deviceLink.SendSignal(uid, comp.StatusPort, comp.State);
|
||||
}
|
||||
|
||||
_audio.PlayPvs(comp.ClickSound, uid, AudioParams.Default.WithVariation(0.125f).WithVolume(8f));
|
||||
|
||||
Reference in New Issue
Block a user