Fix bad analysis with nullables in Rider.

This commit is contained in:
Pieter-Jan Briers
2021-12-30 16:28:52 +01:00
parent 9d70bdde9c
commit 992576509a

View File

@@ -108,11 +108,9 @@ namespace Content.Shared.Chemistry.Components
if (!IoCManager.Resolve<IPrototypeManager>().TryIndex(reagentId, out ReagentPrototype? proto))
proto = new ReagentPrototype();
if (temperature == null)
temperature = Temperature;
var actualTemp = temperature ?? Temperature;
var oldThermalEnergy = Temperature * GetHeatCapacity();
var addedThermalEnergy = (float) ((float) quantity * proto.SpecificHeat * temperature);
var addedThermalEnergy = (float) quantity * proto.SpecificHeat * actualTemp;
for (var i = 0; i < Contents.Count; i++)
{
var reagent = Contents[i];