Small changes for crit mobs to be able to gasp and dead mobs to show dead on examine (#5828)
* [ADD] changes to be able to identify living downed players * [FIX] format of tryGetComponent, fixed string * [CHANGE] PR mind component suggestions * [CHANGE] trycomp based on qa feedback * [CHANGE] Condensed mindcomponent as per feedback Co-authored-by: fishfish458 <fishfish458>
This commit is contained in:
@@ -38,7 +38,7 @@ public class LungSystem : EntitySystem
|
||||
LungComponent? lung=null,
|
||||
SharedMechanismComponent? mech=null)
|
||||
{
|
||||
if (!Resolve(uid, ref lung))
|
||||
if (!Resolve(uid, ref lung, ref mech))
|
||||
return;
|
||||
|
||||
if (_gameTiming.CurTime >= lung.LastGaspPopupTime + lung.GaspPopupCooldown)
|
||||
@@ -47,6 +47,9 @@ public class LungSystem : EntitySystem
|
||||
_popupSystem.PopupEntity(Loc.GetString("lung-behavior-gasp"), uid, Filter.Pvs(uid));
|
||||
}
|
||||
|
||||
if (mech.Body != null && TryComp((mech.Body).Owner, out MobStateComponent? mobState) && !mobState.IsAlive())
|
||||
return;
|
||||
|
||||
Inhale(uid, lung.CycleDelay);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user