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

@@ -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);