mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* may god have mercy upon my soul
* stuff
* Revert "Always raise MobStateChanged on client (#45103)"
This reverts commit 1951b00875.
* keep the cleanup
* fuck you though
* review
* Update Content.Shared/DamageOverlay/SharedDamageOverlaySystem.cs
Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>
* deltas
* queries
---------
Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>
31 lines
1 KiB
C#
31 lines
1 KiB
C#
using Content.Shared.Damage.Components;
|
|
using Content.Shared.Mobs.Systems;
|
|
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.Mobs.Components;
|
|
|
|
/// <summary>
|
|
/// When attached to an <see cref="DamageableComponent"/>,
|
|
/// this component will handle critical and death behaviors for mobs.
|
|
/// Additionally, it handles sending effects to clients
|
|
/// (such as blur effect for unconsciousness) and managing the health HUD.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent]
|
|
[AutoGenerateComponentState]
|
|
[Access(typeof(MobStateSystem), typeof(MobThresholdSystem))]
|
|
public sealed partial class MobStateComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The current mob state the entity is in.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public MobState CurrentState = MobState.Alive; //default mobstate is always the lowest state level
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public HashSet<MobState> AllowedStates = new()
|
|
{
|
|
MobState.Alive,
|
|
MobState.Critical,
|
|
MobState.Dead
|
|
};
|
|
}
|