Enable nullability in Content.Shared (#3626)
* Enable nullability in Content.Shared * Fix null errors in server * aye github i swear on me mom
This commit is contained in:
@@ -165,7 +165,7 @@ namespace Content.Client.GameObjects.Components.Atmos
|
||||
TemperatureHelpers.KelvinToCelsius(state.Temperature))
|
||||
});
|
||||
// Return here cause all that stuff down there is gas stuff (so we don't get the seperators)
|
||||
if (state.Gases.Length == 0)
|
||||
if (state.Gases == null || state.Gases.Length == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -27,8 +27,13 @@ namespace Content.Client.GameObjects.Components.Construction
|
||||
|
||||
if (!_prototypeManager.TryIndex(Prototype.Graph, out ConstructionGraphPrototype? graph)) return;
|
||||
var startNode = graph.Nodes[Prototype.StartNode];
|
||||
var path = graph.Path(Prototype.StartNode, Prototype.TargetNode);
|
||||
var edge = startNode.GetEdge(path[0].Name);
|
||||
|
||||
if (!graph.TryPath(Prototype.StartNode, Prototype.TargetNode, out var path) ||
|
||||
!startNode.TryGetEdge(path[0].Name, out var edge))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
edge.Steps[0].DoExamine(message, inDetailsRange);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user