Fix chem guide data build fail (#23289)

This commit is contained in:
Nemanja
2023-12-31 12:11:29 -05:00
committed by GitHub
parent 3d80e39f3e
commit a425bc78c5
2 changed files with 17 additions and 1 deletions

View File

@@ -158,6 +158,18 @@ public abstract partial class SharedSolutionContainerSystem : EntitySystem
return true;
}
/// <summary>
/// Version of TryGetSolution that doesn't take or return an entity.
/// Used for prototypes and with old code parity.
public bool TryGetSolution(SolutionContainerManagerComponent container, string name, [NotNullWhen(true)] out Solution? solution)
{
solution = null;
if (container.Solutions == null)
return false;
return container.Solutions.TryGetValue(name, out solution);
}
public IEnumerable<(string? Name, Entity<SolutionComponent> Solution)> EnumerateSolutions(Entity<SolutionContainerManagerComponent?> container, bool includeSelf = true)
{
if (includeSelf && TryComp(container, out SolutionComponent? solutionComp))