Make held entity nullable (#5923)

This commit is contained in:
wrexbe
2021-12-30 18:27:15 -08:00
committed by GitHub
parent 761dfb48af
commit abba1e1c2c
11 changed files with 68 additions and 86 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using Content.Server.NodeContainer;
@@ -48,7 +48,7 @@ namespace Content.Server.Power.EntitySystems
var held = hand.HeldEntity;
// Pulsing is hardcoded here because I don't think it needs to be more complex than that right now.
// Update if I'm wrong.
if ((held != null) && _toolSystem.HasQuality(held, "Pulsing"))
if (held != null && _toolSystem.HasQuality(held.Value, "Pulsing"))
{
args.PushMarkup(GenerateCableMarkup(uid));
// args.PushFancyUpdatingPowerGraphs(uid);