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:
@@ -3,7 +3,6 @@ using Content.Server.Drone.Components;
|
||||
using Content.Server.Ghost.Components;
|
||||
using Content.Server.Ghost.Roles.Components;
|
||||
using Content.Server.Mind.Components;
|
||||
using Content.Server.MobState;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Tools.Innate;
|
||||
using Content.Server.UserInterface;
|
||||
@@ -15,8 +14,9 @@ using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Interaction.Components;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Item;
|
||||
using Content.Shared.MobState;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Content.Shared.Mobs;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Tag;
|
||||
using Content.Shared.Throwing;
|
||||
@@ -82,7 +82,7 @@ namespace Content.Server.Drone
|
||||
|
||||
private void OnMobStateChanged(EntityUid uid, DroneComponent drone, MobStateChangedEvent args)
|
||||
{
|
||||
if (args.CurrentMobState == DamageState.Dead)
|
||||
if (args.NewMobState == MobState.Dead)
|
||||
{
|
||||
if (TryComp<InnateToolComponent>(uid, out var innate))
|
||||
_innateToolSystem.Cleanup(uid, innate);
|
||||
|
||||
Reference in New Issue
Block a user