CatStation/Content.Shared/Damage/Components/InjurableComponent.cs
SlamBamActionman 19bc31aef7
Add "new player label" over the head of players joining the game for the first time (#44709)
* Initial commit

* RMC? I 'ardly know 'er

* Sprout

* Rework it to use job icons

* Revert the one change

* Always the one yaml

* Easy review changes

* We do a little salami

* Review changes

* NIGHTMARE NIGHTMARE NIGHTMARE

* Update to use StatusIconPrototype only

* Remove async

* Aaaand remove the comment, bah

* Review fixes

* Update master

* Add the ability for ghosts to see

* Byte backing

* Review fix + comment

* Update to 90 min

* Add todo message
2026-09-24 15:34:37 +00:00

41 lines
1.6 KiB
C#

using Content.Shared.Damage.Prototypes;
using Content.Shared.Mobs;
using Content.Shared.StatusIcon;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Damage.Components;
/// <summary>
/// Manages the damage of a <see cref="DamageableComponent" /> with a 'simple damage' model
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class InjurableComponent : Component
{
/// <summary>
/// This <see cref="DamageContainerPrototype"/> specifies what damage types are supported by this component.
/// If null, all damage types will be supported.
/// </summary>
[DataField, AutoNetworkedField]
// ReSharper disable once InconsistentNaming - This is wrong but fixing it is potentially annoying for downstreams.
public ProtoId<DamageContainerPrototype>? DamageContainer;
/// <summary>
/// Group types that affect the pain overlay.
/// </summary>
/// TODO: Add support for adding damage types specifically rather than whole damage groups
[DataField]
// ReSharper disable once UseCollectionExpression - Cannot refactor this as it's a potential sandbox volation.
public List<ProtoId<DamageGroupPrototype>> PainDamageGroups = new() { "Brute", "Burn" };
[DataField]
public Dictionary<MobState, ProtoId<StatusIconPrototype>> HealthIcons = new()
{
{ MobState.Alive, "HealthIconFine" },
{ MobState.Critical, "HealthIconCritical" },
{ MobState.Dead, "HealthIconDead" },
};
[DataField]
public ProtoId<StatusIconPrototype> RottingIcon = "HealthIconRotting";
}