Skip to content

Commit

Permalink
Fix for entities with no power receiver
Browse files Browse the repository at this point in the history
  • Loading branch information
DexlerXD committed Nov 2, 2023
1 parent 7604370 commit c1d92d1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private void OnSignalReceived(EntityUid uid, DoorSignalControlComponent componen
return;

//SS220-doors-logic-signals-fix
if (!TryComp<ApcPowerReceiverComponent>(uid, out var receiverComp) || !receiverComp.Powered)
if (TryComp<ApcPowerReceiverComponent>(uid, out var receiverComp) && !receiverComp.Powered)
return;

var state = SignalState.Momentary;
Expand Down Expand Up @@ -91,7 +91,7 @@ private void OnSignalReceived(EntityUid uid, DoorSignalControlComponent componen
private void OnStateChanged(EntityUid uid, DoorSignalControlComponent door, DoorStateChangedEvent args)
{
//SS220-doors-logic-signals-fix
if (!TryComp<ApcPowerReceiverComponent>(uid, out var receiverComp) || !receiverComp.Powered)
if (TryComp<ApcPowerReceiverComponent>(uid, out var receiverComp) && !receiverComp.Powered)
return;

var data = new NetworkPayload()
Expand Down

0 comments on commit c1d92d1

Please sign in to comment.