mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-01 16:47:26 +00:00
* 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>
34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
using Content.Shared._DV.CosmicCult.Components;
|
|
using Content.Shared.Examine;
|
|
using Robust.Shared.Timing;
|
|
|
|
namespace Content.Shared._DV.CosmicCult;
|
|
|
|
public abstract class SharedCosmicGlyphSystem : EntitySystem
|
|
{
|
|
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
|
[Dependency] private readonly SharedCosmicCultSystem _cosmicCult = default!;
|
|
[Dependency] private readonly IGameTiming _timing = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
SubscribeLocalEvent<CosmicGlyphComponent, ExaminedEvent>(OnExamine);
|
|
}
|
|
|
|
private void OnExamine(Entity<CosmicGlyphComponent> uid, ref ExaminedEvent args)
|
|
{
|
|
if (_cosmicCult.EntityIsCultist(args.Examiner))
|
|
{
|
|
args.PushMarkup(Loc.GetString("cosmic-examine-glyph-cultcount", ("COUNT", uid.Comp.RequiredCultists)));
|
|
}
|
|
}
|
|
|
|
public void EraseGlyph(EntityUid ent)
|
|
{
|
|
if (!TryComp<CosmicGlyphComponent>(ent, out var comp)) return;
|
|
_appearance.SetData(ent, GlyphVisuals.Status, GlyphStatus.Despawning);
|
|
comp.State = GlyphStatus.Despawning;
|
|
comp.Timer = _timing.CurTime + comp.DespawnTime;
|
|
}
|
|
}
|