Some of prototypes don't specify their deconstructTarget node, which
made them show the deconstruct verb as deconstructTarget is set to
"start" node by default. This patch makes attempt to check if is it even
possible from current construction node to reach specified
deconstructTarget.
Fixes #27330
component.Node == component.DeconstructionNode)
return;
+ if (!_prototypeManager.TryIndex(component.Graph, out ConstructionGraphPrototype? graph))
+ return;
+
+ if (component.DeconstructionNode == null)
+ return;
+
+ if (GetCurrentNode(uid, component) is not {} currentNode)
+ return;
+
+ if (graph.Path(currentNode.Name, component.DeconstructionNode) is not {} path || path.Length == 0)
+ return;
+
Verb verb = new();
//verb.Category = VerbCategories.Construction;
//TODO VERBS add more construction verbs? Until then, removing construction category