mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
Fix guide generator
This commit is contained in:
parent
a81a423d45
commit
a703df116a
2 changed files with 4 additions and 2 deletions
|
|
@ -3,6 +3,7 @@ using Robust.Shared.Prototypes;
|
|||
using Content.Shared.Construction;
|
||||
using Content.Shared.Construction.Prototypes;
|
||||
using Content.Shared.Construction.Steps;
|
||||
using Robust.Server.GameObjects;
|
||||
|
||||
namespace Content.Server.GuideGenerator;
|
||||
|
||||
|
|
@ -65,7 +66,7 @@ public sealed class HeatableRecipeEntry
|
|||
{
|
||||
var nodeStep = (TemperatureConstructionGraphStep)nodeStepRaw;
|
||||
graphID = nodeEdge.Target; // required to check when we need to leave second loop; this is the best solution, because nodeEdge.Target is marked as required datafield and cannot be null
|
||||
EntityManager em = new();
|
||||
ServerEntityManager em = new();
|
||||
MinTemp = nodeStep.MinTemperature.HasValue ? nodeStep.MinTemperature.Value : 0;
|
||||
Result = nodeStep.MinTemperature.HasValue ? constructionProto.Nodes[nodeEdge.Target].Entity.GetId(null, null, new GraphNodeEntityArgs(em)) : null;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using Robust.Shared.Prototypes;
|
|||
using Content.Shared.Construction;
|
||||
using Content.Shared.Construction.Prototypes;
|
||||
using Content.Shared.Construction.Steps;
|
||||
using Robust.Server.GameObjects;
|
||||
|
||||
namespace Content.Server.GuideGenerator;
|
||||
|
||||
|
|
@ -68,7 +69,7 @@ public sealed class ToolRecipeEntry // because of https://github.com/space-wizar
|
|||
{
|
||||
var nodeStep = (ToolConstructionGraphStep)nodeStepRaw;
|
||||
graphID = nodeEdge.Target; // required to check when we need to leave second loop; this is the best solution, because nodeEdge.Target is marked as required datafield and cannot be null
|
||||
EntityManager em = new();
|
||||
ServerEntityManager em = new();
|
||||
Tool = nodeStep.Tool;
|
||||
Result = constructionProto.Nodes[nodeEdge.Target].Entity.GetId(null, null, new GraphNodeEntityArgs(em));
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue