using Content.Shared.Anomaly.Effects;
using Content.Shared.Body.Prototypes;
using Content.Shared.Humanoid.Prototypes;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
namespace Content.Shared.Anomaly.Components;
///
/// An anomaly within the body of a living being. Controls the ability to return to the standard state.
///
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true), Access(typeof(SharedInnerBodyAnomalySystem))]
public sealed partial class InnerBodyAnomalyComponent : Component
{
[DataField]
public bool Injected;
///
/// A prototype of an entity whose components will be added to the anomaly host **AND** then removed at the right time
///
[DataField(required: true)]
public EntProtoId? InjectionProto;
///
/// Duration of stun from the effect of the anomaly
///
[DataField]
public float StunDuration = 4f;
///
/// A message sent in chat to a player who has become infected by an anomaly
///
[DataField]
public LocId? StartMessage = null;
///
/// A message sent in chat to a player who has cleared an anomaly
///
[DataField]
public LocId? EndMessage = "inner-anomaly-end-message";
///
/// Sound, playing on becoming anomaly
///
[DataField]
public SoundSpecifier? StartSound = new SoundPathSpecifier("/Audio/Effects/inneranomaly.ogg");
///
/// Used to display messages to the player about their level of disease progression
///
[DataField]
public float LastSeverityInformed = 0f;
///
/// The fallback sprite to be added on the original entity. Allows you to visually identify the feature and type of anomaly to other players
///
[DataField, AutoNetworkedField]
public SpriteSpecifier? FallbackSprite = null;
///
/// Ability to use unique sprites for different body types
///
[DataField, AutoNetworkedField]
public Dictionary, SpriteSpecifier> SpeciesSprites = new();
///
/// The key of the entity layer into which the sprite will be inserted
///
[DataField]
public string LayerMap = "inner_anomaly_layer";
}
///
/// Event broadcast when an anomaly is being removed because the host is dying.
/// Raised directed at the host entity with the anomaly.
/// Cancel this if you want to prevent the host from losing their anomaly on death.
///
[ByRefEvent]
public record struct BeforeRemoveAnomalyOnDeathEvent(bool Cancelled = false);