using Content.Shared.Damage; using Content.Shared.Damage.Prototypes; using Content.Shared.FixedPoint; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; namespace Content.Shared.GhostTypes; /// /// Added to the Mind of an entity by the StoreDamageTakenOnMindSystem, allowing storage of the damage values their body had. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] public sealed partial class LastBodyDamageComponent : Component { /// /// Dictionary DamageGroupPrototype proto ids to how much damage was received from that damage type. /// [DataField, AutoNetworkedField] public Dictionary, FixedPoint2>? DamagePerGroup; /// /// Collection of possible damage types, stored by the StoreDamageTakenOnMind. /// [DataField, AutoNetworkedField] public DamageSpecifier? Damage; /// /// Special death cause that's saved after an event related to it is triggered /// For example, a BeforeExplodeEvent will save "Explosion" as the special cause of death /// [DataField, AutoNetworkedField] public ProtoId? SpecialCauseOfDeath = null; } /// /// Prototype for special causes of death (such as "Explosion") /// [Prototype] public sealed partial class SpecialCauseOfDeathPrototype : IPrototype { [ViewVariables, IdDataField] public string ID { get; private set; } = string.Empty; // Specifies the amount of possible sprites for a special cause of death // These values are set up in the special_cause_of_death_types.yml file [DataField] public int NumOfStates; }