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:
@@ -9,7 +9,7 @@ using Content.Shared.DragDrop;
|
||||
using Content.Shared.Hands.Components;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Pulling.Components;
|
||||
using Content.Shared.Stunnable;
|
||||
using Content.Shared.Vehicle.Components;
|
||||
@@ -360,8 +360,10 @@ public sealed partial class BuckleSystem
|
||||
_standing.Stand(buckleId);
|
||||
}
|
||||
|
||||
_mobState.EnterState(mobState, mobState?.CurrentState);
|
||||
|
||||
if (_mobState.IsIncapacitated(buckleId, mobState))
|
||||
{
|
||||
_standing.Down(buckleId);
|
||||
}
|
||||
// Sync StrapComponent data
|
||||
_appearance.SetData(oldBuckledTo.Owner, StrapVisuals.State, false);
|
||||
if (oldBuckledTo.BuckledEntities.Remove(buckleId))
|
||||
|
||||
@@ -4,7 +4,7 @@ using Content.Server.Pulling;
|
||||
using Content.Shared.ActionBlocker;
|
||||
using Content.Shared.Alert;
|
||||
using Content.Shared.Buckle;
|
||||
using Content.Shared.MobState.EntitySystems;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.Containers;
|
||||
using Robust.Server.GameObjects;
|
||||
@@ -23,7 +23,7 @@ public sealed partial class BuckleSystem : SharedBuckleSystem
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
[Dependency] private readonly ContainerSystem _containers = default!;
|
||||
[Dependency] private readonly InteractionSystem _interactions = default!;
|
||||
[Dependency] private readonly SharedMobStateSystem _mobState = default!;
|
||||
[Dependency] private readonly MobStateSystem _mobState = default!;
|
||||
[Dependency] private readonly PopupSystem _popups = default!;
|
||||
[Dependency] private readonly PullingSystem _pulling = default!;
|
||||
[Dependency] private readonly Shared.Standing.StandingStateSystem _standing = default!;
|
||||
|
||||
Reference in New Issue
Block a user