Missing nullables (#8634)
This commit is contained in:
@@ -115,7 +115,7 @@ namespace Content.Server.Chemistry.Components
|
||||
//Special case for reagent tanks, because normally clicking another container will give solution, not take it.
|
||||
if (CanReceive && !_entities.HasComponent<RefillableSolutionComponent>(target) // target must not be refillable (e.g. Reagent Tanks)
|
||||
&& solutionsSys.TryGetDrainableSolution(target, out var targetDrain) // target must be drainable
|
||||
&& _entities.TryGetComponent(Owner, out RefillableSolutionComponent refillComp)
|
||||
&& _entities.TryGetComponent(Owner, out RefillableSolutionComponent? refillComp)
|
||||
&& solutionsSys.TryGetRefillableSolution(Owner, out var ownerRefill, refillable: refillComp))
|
||||
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Content.Server.Temperature.Components;
|
||||
using Content.Server.Temperature.Components;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
|
||||
namespace Content.Server.Chemistry.ReagentEffectConditions
|
||||
@@ -16,7 +16,7 @@ namespace Content.Server.Chemistry.ReagentEffectConditions
|
||||
public float Max = float.MaxValue;
|
||||
public override bool Condition(ReagentEffectArgs args)
|
||||
{
|
||||
if (args.EntityManager.TryGetComponent(args.SolutionEntity, out TemperatureComponent temp))
|
||||
if (args.EntityManager.TryGetComponent(args.SolutionEntity, out TemperatureComponent? temp))
|
||||
{
|
||||
if (temp.CurrentTemperature > Min && temp.CurrentTemperature < Max)
|
||||
return true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.FixedPoint;
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Content.Server.Chemistry.ReagentEffectConditions
|
||||
|
||||
public override bool Condition(ReagentEffectArgs args)
|
||||
{
|
||||
if (args.EntityManager.TryGetComponent(args.SolutionEntity, out DamageableComponent damage))
|
||||
if (args.EntityManager.TryGetComponent(args.SolutionEntity, out DamageableComponent? damage))
|
||||
{
|
||||
var total = damage.TotalDamage;
|
||||
if (total > Min && total < Max)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Content.Server.Temperature.Components;
|
||||
using Content.Server.Temperature.Components;
|
||||
using Content.Server.Temperature.Systems;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Content.Server.Chemistry.ReagentEffects
|
||||
|
||||
public override void Effect(ReagentEffectArgs args)
|
||||
{
|
||||
if (args.EntityManager.TryGetComponent(args.SolutionEntity, out TemperatureComponent temp))
|
||||
if (args.EntityManager.TryGetComponent(args.SolutionEntity, out TemperatureComponent? temp))
|
||||
{
|
||||
var sys = args.EntityManager.EntitySysManager.GetEntitySystem<TemperatureSystem>();
|
||||
sys.ChangeHeat(args.SolutionEntity, Amount, true, temp);
|
||||
|
||||
Reference in New Issue
Block a user