Fix more errors
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
using System;
|
||||
using Content.Server.RCD.Components;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Hands.Components;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Localization;
|
||||
using System;
|
||||
|
||||
namespace Content.Server.RCD.Systems
|
||||
{
|
||||
@@ -29,7 +28,8 @@ namespace Content.Server.RCD.Systems
|
||||
if (args.Handled || !args.CanReach)
|
||||
return;
|
||||
|
||||
if (args.Target == null || !EntityManager.TryGetComponent(args.Target, out RCDComponent? rcdComponent))
|
||||
if (args.Target is not {Valid: true} target ||
|
||||
!EntityManager.TryGetComponent(target, out RCDComponent? rcdComponent))
|
||||
return;
|
||||
|
||||
if (rcdComponent.MaxAmmo - rcdComponent.CurrentAmmo < component.RefillAmmo)
|
||||
|
||||
Reference in New Issue
Block a user