Fix more errors

This commit is contained in:
DrSmugleaf
2021-12-06 00:52:58 +01:00
parent 2b1fecbe02
commit 215cae5655
55 changed files with 262 additions and 297 deletions

View File

@@ -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)