Clean up all missing EntitySystem proxy method uses (#38353)
This commit is contained in:
@@ -24,7 +24,7 @@ namespace Content.Server.DeviceNetwork.Systems.Devices
|
||||
/// </summary>
|
||||
private void OnInteracted(EntityUid uid, ApcNetSwitchComponent component, InteractHandEvent args)
|
||||
{
|
||||
if (!EntityManager.TryGetComponent(uid, out DeviceNetworkComponent? networkComponent)) return;
|
||||
if (!TryComp(uid, out DeviceNetworkComponent? networkComponent)) return;
|
||||
|
||||
component.State = !component.State;
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Content.Server.DeviceNetwork.Systems.Devices
|
||||
/// </summary>
|
||||
private void OnPackedReceived(EntityUid uid, ApcNetSwitchComponent component, DeviceNetworkPacketEvent args)
|
||||
{
|
||||
if (!EntityManager.TryGetComponent(uid, out DeviceNetworkComponent? networkComponent) || args.SenderAddress == networkComponent.Address) return;
|
||||
if (!TryComp(uid, out DeviceNetworkComponent? networkComponent) || args.SenderAddress == networkComponent.Address) return;
|
||||
if (!args.Data.TryGetValue(DeviceNetworkConstants.Command, out string? command) || command != DeviceNetworkConstants.CmdSetState) return;
|
||||
if (!args.Data.TryGetValue(DeviceNetworkConstants.StateEnabled, out bool enabled)) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user