Files
Delta-v/Content.Shared/_DV/CosmicCult/Components/CosmicGlyphComponent.cs
T
No Elkaandpre-commit-ci[bot] a021394ebe Cosmic glyph rework: activation time and animations. (#4147)
* Refactoring in progress

* Refactoring completed, proceeding to animate a ton

* Don't commit that idiot

* Ballin

* Actually use the animations I made

* More sprites

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Change a lot of stuff

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Hopefuly finish changing stuff

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Prototype

* Change sprites

* Fix test fail

* Cessation sprites

* warding

* Add sounds

* Typo

* Projection

* Truth

* Knowledge

* Fix being able to convert SSD peeps

* Add interaction outline because why the hell not

* Change stuff

* Surely this won't explode

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-20 10:18:42 +00:00

70 lines
2.3 KiB
C#

using Content.Shared.Damage;
using Robust.Shared.GameStates;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared._DV.CosmicCult.Components;
[RegisterComponent, NetworkedComponent]
[AutoGenerateComponentPause]
public sealed partial class CosmicGlyphComponent : Component
{
[DataField] public int RequiredCultists = 1;
[DataField] public float ActivationRange = 1.55f;
/// <summary>
/// Damage dealt on glyph activation.
/// </summary>
[DataField] public DamageSpecifier ActivationDamage = new();
[DataField] public bool CanBeErased = true;
[DataField] public bool EraseOnUse = false;
[DataField] public EntProtoId GlyphVFX = "CosmicGenericVFX";
[DataField] public SoundSpecifier TriggerSFX = new SoundPathSpecifier("/Audio/_DV/CosmicCult/glyph_trigger.ogg");
[DataField] public SoundSpecifier ChargeSFX = new SoundPathSpecifier("/Audio/_DV/CosmicCult/glyph_charge.ogg");
[DataField] public SoundSpecifier FailSFX = new SoundPathSpecifier("/Audio/_DV/CosmicCult/glyph_fail.ogg");
[DataField] public GlyphStatus State = GlyphStatus.Spawning;
[DataField] public EntityUid? User = null;
[DataField] public TimeSpan SpawnTime = TimeSpan.FromSeconds(1.2);
[DataField] public TimeSpan DespawnTime = TimeSpan.FromSeconds(0.6);
[DataField] public TimeSpan ActivationTime = TimeSpan.FromSeconds(0);
[DataField] public TimeSpan CooldownTime = TimeSpan.FromSeconds(3.0);
[AutoPausedField, DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
public TimeSpan Timer = default!;
}
[ByRefEvent]
public record struct TryActivateGlyphEvent(EntityUid User, HashSet<Entity<CosmicCultComponent>> Cultists, bool Cancelled = false)
{
public void Cancel()
{
Cancelled = true;
}
}
[ByRefEvent]
public record struct CheckGlyphConditionsEvent(EntityUid User, HashSet<Entity<CosmicCultComponent>> Cultists, bool Cancelled = false)
{
public void Cancel()
{
Cancelled = true;
}
}
[Serializable, NetSerializable]
public enum GlyphVisuals : byte
{
Status,
}
[Serializable, NetSerializable]
public enum GlyphStatus : byte
{
Spawning,
Despawning,
Ready,
Active,
Cooldown
}