Fix cryopod debug assert (#24830)
This commit is contained in:
@@ -181,6 +181,9 @@ public sealed partial class CryoPodSystem : SharedCryoPodSystem
|
||||
|
||||
private void OnActivateUI(Entity<CryoPodComponent> entity, ref AfterActivatableUIOpenEvent args)
|
||||
{
|
||||
if (!entity.Comp.BodyContainer.ContainedEntity.HasValue)
|
||||
return;
|
||||
|
||||
TryComp<TemperatureComponent>(entity.Comp.BodyContainer.ContainedEntity, out var temp);
|
||||
TryComp<BloodstreamComponent>(entity.Comp.BodyContainer.ContainedEntity, out var bloodstream);
|
||||
|
||||
@@ -189,7 +192,8 @@ public sealed partial class CryoPodSystem : SharedCryoPodSystem
|
||||
HealthAnalyzerUiKey.Key,
|
||||
new HealthAnalyzerScannedUserMessage(GetNetEntity(entity.Comp.BodyContainer.ContainedEntity),
|
||||
temp?.CurrentTemperature ?? 0,
|
||||
(bloodstream != null && _solutionContainerSystem.ResolveSolution(entity.Owner, bloodstream.BloodSolutionName, ref bloodstream.BloodSolution, out var bloodSolution))
|
||||
(bloodstream != null && _solutionContainerSystem.ResolveSolution(entity.Comp.BodyContainer.ContainedEntity.Value,
|
||||
bloodstream.BloodSolutionName, ref bloodstream.BloodSolution, out var bloodSolution))
|
||||
? bloodSolution.FillFraction
|
||||
: 0
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user