199 lines
7.0 KiB
C#
199 lines
7.0 KiB
C#
using Robust.Shared.GameStates;
|
|
using Content.Shared.StatusIcon;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Audio;
|
|
using Content.Shared._DV.CosmicCult.Prototypes;
|
|
using Content.Shared.Damage;
|
|
using Content.Shared.Damage.Prototypes;
|
|
using Content.Shared.Alert;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared._DV.CosmicCult.Components;
|
|
|
|
/// <summary>
|
|
/// Added to entities to tag that they are a cosmic cultist. Holds nearly all cultist-relevant data! Removal of this component is used to call for a deconversion
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent]
|
|
[AutoGenerateComponentState]
|
|
public sealed partial class CosmicCultComponent : Component
|
|
{
|
|
#region Housekeeping
|
|
|
|
/// <summary>
|
|
/// The status icon prototype displayed for cosmic cultists.
|
|
/// </summary>
|
|
[DataField]
|
|
public ProtoId<FactionIconPrototype> StatusIcon = "CosmicCultIcon";
|
|
#endregion
|
|
|
|
#region Ability Data
|
|
[DataField]
|
|
[AutoNetworkedField]
|
|
public HashSet<ProtoId<InfluencePrototype>> UnlockedInfluences =
|
|
[
|
|
"InfluenceAberrantLapse",
|
|
"InfluenceNullGlare",
|
|
"InfluenceEschewMetabolism",
|
|
];
|
|
|
|
[DataField]
|
|
[AutoNetworkedField]
|
|
public HashSet<EntProtoId> CosmicCultActions =
|
|
[
|
|
"ActionCosmicSiphon",
|
|
"ActionCosmicBlank",
|
|
];
|
|
|
|
[DataField]
|
|
public EntProtoId CosmicFragmentationAction = "ActionCosmicFragmentation";
|
|
|
|
public HashSet<EntityUid?> ActionEntities = [];
|
|
|
|
[DataField]
|
|
[AutoNetworkedField]
|
|
public HashSet<ProtoId<InfluencePrototype>> OwnedInfluences = [];
|
|
|
|
/// <summary>
|
|
/// The duration of the doAfter for Siphon Entropy
|
|
/// </summary>
|
|
[DataField] public TimeSpan CosmicSiphonDelay = TimeSpan.FromSeconds(2);
|
|
public static readonly TimeSpan DefaultCosmicSiphonDelay = TimeSpan.FromSeconds(2);
|
|
|
|
/// <summary>
|
|
/// The duration of the doAfter for Shunt Subjectivity
|
|
/// </summary>
|
|
[DataField] public TimeSpan CosmicBlankDelay = TimeSpan.FromSeconds(0.6f);
|
|
public static readonly TimeSpan DefaultCosmicBlankDelay = TimeSpan.FromSeconds(0.6f);
|
|
|
|
/// <summary>
|
|
/// The duration of Shunt Subjectivity's trip to the cosmic void
|
|
/// </summary>
|
|
[DataField] public TimeSpan CosmicBlankDuration = TimeSpan.FromSeconds(9);
|
|
public static readonly TimeSpan DefaultCosmicBlankDuration = TimeSpan.FromSeconds(9);
|
|
|
|
/// <summary>
|
|
/// The duration of Vacuous Imposition's shield.
|
|
/// </summary>
|
|
[DataField] public TimeSpan CosmicImpositionDuration = TimeSpan.FromSeconds(5.9);
|
|
public static readonly TimeSpan DefaultCosmicImpositionDuration = TimeSpan.FromSeconds(5.9);
|
|
|
|
/// <summary>
|
|
/// The duration of Null Glare's flash/disorientation.
|
|
/// </summary>
|
|
[DataField] public TimeSpan CosmicGlareDuration = TimeSpan.FromSeconds(5);
|
|
public static readonly TimeSpan DefaultCosmicGlareDuration = TimeSpan.FromSeconds(5);
|
|
|
|
/// <summary>
|
|
/// The range of Null Glare.
|
|
/// </summary>
|
|
[DataField] public int CosmicGlareRange = 8;
|
|
public static readonly int DefaultCosmicGlareRange = 8;
|
|
|
|
/// <summary>
|
|
/// The movement speed penalty inflicted by Null Glare.
|
|
/// </summary>
|
|
[DataField] public float CosmicGlarePenalty = 0.3f;
|
|
public static readonly float DefaultCosmicGlarePenalty = 0.3f;
|
|
|
|
/// <summary>
|
|
/// The stun duration inflicted by Null Glare.
|
|
/// </summary>
|
|
[DataField] public TimeSpan CosmicGlareStun = TimeSpan.FromSeconds(0);
|
|
public static readonly TimeSpan DefaultCosmicGlareStun = TimeSpan.FromSeconds(0);
|
|
|
|
|
|
/// <summary>
|
|
/// The amount of Entropy generated by Siphon Entropy
|
|
/// </summary>
|
|
[DataField] public int CosmicSiphonQuantity = 1;
|
|
public static readonly int DefaultCosmicSiphonQuantity = 1;
|
|
|
|
/// <summary>
|
|
/// The amount of Entropy generated by Siphon Entropy when used on a person in critical condition
|
|
/// </summary>
|
|
[DataField] public int SiphonQuantityCrit = 6;
|
|
|
|
/// <summary>
|
|
/// The amount of Entropy generated by Siphon Entropy when used on a mindshielded person in critical condition
|
|
/// </summary>
|
|
[DataField] public int SiphonQuantityCritMindshield = 10;
|
|
|
|
/// <summary>
|
|
/// The amount of damage dealt by Siphon Entropy when used on a person in critical condition
|
|
/// </summary>
|
|
[DataField] public DamageSpecifier SiphonCritDamage = new() {
|
|
DamageDict = new() {
|
|
{ "Cold", 200 }
|
|
}
|
|
};
|
|
#endregion
|
|
|
|
#region Misc Data
|
|
/// <summary>
|
|
/// The amount of Entropy the user is allowed to spend at The Monument.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField] public int EntropyBudget;
|
|
|
|
/// <summary>
|
|
/// The amount of Entropy the user is currently holding on to.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField] public int EntropyStored;
|
|
|
|
/// <summary>
|
|
/// The maximum amount of Entropy the user can have at once.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField] public int EntropyStoredCap = 14;
|
|
|
|
/// <summary>
|
|
/// Wether or not this cultist has been empowered by a Malign Rift.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField] public bool CosmicEmpowered;
|
|
|
|
/// <summary>
|
|
/// Wether or not this cultist needs to respirate.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField] public bool Respiration = true;
|
|
|
|
/// <summary>
|
|
/// A string for storing what damage container this cultist had upon conversion.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField] public ProtoId<DamageContainerPrototype> StoredDamageContainer = "Biological";
|
|
|
|
/// <summary>
|
|
/// The alert for displaying the cultist's currently held Entropy.
|
|
/// </summary>
|
|
[DataField]
|
|
public ProtoId<AlertPrototype> EntropyAlert = "CosmicEntropy";
|
|
|
|
[DataField]
|
|
public EntityUid? CosmicFragmentationActionEntity;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// The gamerule that this cultist is associated with
|
|
/// </summary>
|
|
[DataField(serverOnly: true)]
|
|
public EntityUid CultGamerule;
|
|
|
|
#region VFX & SFX
|
|
[DataField] public EntProtoId SpawnWisp = "MobCosmicWisp";
|
|
[DataField] public EntProtoId LapseVFX = "CosmicLapseAbilityVFX";
|
|
[DataField] public EntProtoId BlankVFX = "CosmicBlankAbilityVFX";
|
|
[DataField] public EntProtoId GlareVFX = "CosmicGlareAbilityVFX";
|
|
[DataField] public EntProtoId AbsorbVFX = "CosmicGenericVFX";
|
|
[DataField] public EntProtoId ImpositionVFX = "CosmicImpositionAbilityVFX";
|
|
[DataField] public SoundSpecifier BlankSFX = new SoundPathSpecifier("/Audio/_DV/CosmicCult/ability_blank.ogg");
|
|
[DataField] public SoundSpecifier IngressSFX = new SoundPathSpecifier("/Audio/_DV/CosmicCult/ability_ingress.ogg");
|
|
[DataField] public SoundSpecifier GlareSFX = new SoundPathSpecifier("/Audio/_DV/CosmicCult/ability_glare.ogg");
|
|
[DataField] public SoundSpecifier NovaCastSFX = new SoundPathSpecifier("/Audio/_DV/CosmicCult/ability_nova_cast.ogg");
|
|
[DataField] public SoundSpecifier ImpositionSFX = new SoundPathSpecifier("/Audio/_DV/CosmicCult/ability_imposition.ogg");
|
|
#endregion
|
|
}
|
|
|
|
[NetSerializable, Serializable]
|
|
public enum CultAlertVisualLayers : byte
|
|
{
|
|
Counter,
|
|
}
|