Pepper makes you cough (#36358)
This commit is contained in:
@@ -173,6 +173,20 @@ public sealed class RespiratorSystem : EntitySystem
|
||||
_atmosSys.Merge(ev.Gas, outGas);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the entity is above their SuffocationThreshold and alive.
|
||||
/// </summary>
|
||||
public bool IsBreathing(Entity<RespiratorComponent?> ent)
|
||||
{
|
||||
if (_mobState.IsIncapacitated(ent))
|
||||
return false;
|
||||
|
||||
if (!Resolve(ent, ref ent.Comp))
|
||||
return false;
|
||||
|
||||
return (ent.Comp.Saturation > ent.Comp.SuffocationThreshold);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check whether or not an entity can metabolize inhaled air without suffocating or taking damage (i.e., no toxic
|
||||
/// gasses).
|
||||
|
||||
Reference in New Issue
Block a user