fixes a bunch of warnings

This commit is contained in:
Paul
2021-12-20 13:58:30 +01:00
parent 21174366b7
commit d4d85b663f
68 changed files with 113 additions and 168 deletions

View File

@@ -650,7 +650,7 @@ namespace Content.Shared.Interaction
/// <param name="used"></param>
public void TryUseInteraction(EntityUid user, EntityUid used, bool altInteract = false)
{
if (user != null && used != null && _actionBlockerSystem.CanUse(user))
if (user.Valid && used.Valid && _actionBlockerSystem.CanUse(user))
{
if (altInteract)
AltInteract(user, used);
@@ -820,7 +820,7 @@ namespace Content.Shared.Interaction
/// </summary>
public bool TryDroppedInteraction(EntityUid user, EntityUid item)
{
if (user == null || item == null || !_actionBlockerSystem.CanDrop(user)) return false;
if (!user.Valid || !item.Valid || !_actionBlockerSystem.CanDrop(user)) return false;
DroppedInteraction(user, item);
return true;