Mobstate Refactor (#13389)
Refactors mobstate and moves mob health thresholds to their own component Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.DoAfter;
|
||||
using Content.Shared.MobState;
|
||||
using Content.Shared.Mobs;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Content.Server.DoAfter
|
||||
|
||||
private void OnStateChanged(EntityUid uid, DoAfterComponent component, MobStateChangedEvent args)
|
||||
{
|
||||
if (!args.CurrentMobState.IsIncapacitated())
|
||||
if (args.NewMobState == MobState.Alive)
|
||||
return;
|
||||
|
||||
foreach (var (doAfter, _) in component.DoAfters)
|
||||
|
||||
Reference in New Issue
Block a user