Remove obsolete code from Food, Drink and Respirator systems. (#30560)

* Remove obsolete code from Food, Drink and Respirator systems

* remove obsolete comment
This commit is contained in:
Mervill
2024-08-02 00:30:45 -07:00
committed by GitHub
parent ac4086f984
commit af75258601
4 changed files with 34 additions and 63 deletions

View File

@@ -287,10 +287,10 @@ public sealed class RespiratorSystem : EntitySystem
if (ent.Comp.SuffocationCycles >= ent.Comp.SuffocationCycleThreshold)
{
// TODO: This is not going work with multiple different lungs, if that ever becomes a possibility
var organs = _bodySystem.GetBodyOrganComponents<LungComponent>(ent);
foreach (var (comp, _) in organs)
var organs = _bodySystem.GetBodyOrganEntityComps<LungComponent>((ent, null));
foreach (var entity in organs)
{
_alertsSystem.ShowAlert(ent, comp.Alert);
_alertsSystem.ShowAlert(entity.Owner, entity.Comp1.Alert);
}
}
@@ -303,10 +303,10 @@ public sealed class RespiratorSystem : EntitySystem
_adminLogger.Add(LogType.Asphyxiation, $"{ToPrettyString(ent):entity} stopped suffocating");
// TODO: This is not going work with multiple different lungs, if that ever becomes a possibility
var organs = _bodySystem.GetBodyOrganComponents<LungComponent>(ent);
foreach (var (comp, _) in organs)
var organs = _bodySystem.GetBodyOrganEntityComps<LungComponent>((ent, null));
foreach (var entity in organs)
{
_alertsSystem.ClearAlert(ent, comp.Alert);
_alertsSystem.ClearAlert(entity.Owner, entity.Comp1.Alert);
}
_damageableSys.TryChangeDamage(ent, ent.Comp.DamageRecovery);