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:
Jezithyr
2023-01-13 16:57:10 -08:00
committed by GitHub
parent 97e4c477bd
commit eeb5b17b34
148 changed files with 1517 additions and 1290 deletions

View File

@@ -17,7 +17,6 @@ using Content.Server.Hands.Components;
using Content.Server.Mind.Commands;
using Content.Server.Temperature.Components;
using Content.Shared.Movement.Components;
using Content.Shared.MobState;
using Robust.Shared.Prototypes;
using Content.Shared.Roles;
using Content.Server.Traitor;
@@ -27,6 +26,7 @@ using Content.Server.Atmos.Miasma;
using Content.Server.Humanoid;
using Content.Server.IdentityManagement;
using Content.Shared.Humanoid;
using Content.Shared.Mobs;
using Content.Shared.Movement.Systems;
using Content.Shared.Weapons.Melee;
using Robust.Shared.Audio;
@@ -64,8 +64,8 @@ namespace Content.Server.Zombies
/// </summary>
private void OnDamageChanged(EntityUid uid, ZombifyOnDeathComponent component, MobStateChangedEvent args)
{
if (args.CurrentMobState == DamageState.Dead ||
args.CurrentMobState == DamageState.Critical)
if (args.NewMobState == MobState.Dead ||
args.NewMobState == MobState.Critical)
{
ZombifyEntity(uid);
}