Files
wwdpublic/Content.Client/_EE/Shadowling/EnthrallSystem.cs
Lumminal 16ea61f52f Shadowling Antagonist (SS13 Port and Remake) (#2207)
<!--
Explain this PR in as much detail as applicable

Some example prompts to consider:
How might this affect the game? The codebase?
What might be some alternatives to this?
How/Who does this benefit/hurt [the game/codebase]?
-->

Ports Shadowlings from SS13 to SS14 with a remake to make them fun to
play.

Minimal Design Doc (not up-to-date, read comments in this repo for
updates):

https://github.com/Lumminal/SS14-Design-Docs-Lumminal/blob/main/Shadowling.md

---

- Abilities
  - [X] Hatch
  - [x] Glare
  - [X] Enthrall
  - [x] Veil
  - [x] Shadow Walk
  - [x] Icy Veins
  - [x] Collective Mind
  - [x] Rapid Re-Hatch
  - [x] Destroy Engines
  - [x] Sonic Screech
  - [x] Blindness Smoke
  - [x] Null Charge
  - [x] Black Recuperation
  - [x] Empowered Enthrall
  - [x] Nox Imperii
  - [x] Ascension
  - [x] Annihilate
  - [x] Hypnosis
  - [x] Plane-Shift
  - [x] Lighting Storm
  - [x] Ascendant Broadcast
- Antags
  - [X] Thrall
      - [x] Guise
      - [x] Thrall Darksight
  - [x] Lesser Shadowling
- Passive
  - [x] Light Resistance Scaling
  - [x] Shadowmind
  - [x] Damage on Light
- Other
  - [x] Sounds
  - [x] Sprites
  - [x] Psionic Interactions
  - [x] Handle Edge Cases
---

<details><summary><h1>Media</h1></summary>
<p>

https://www.youtube.com/watch?v=H-Ee5wuRINc

</p>
</details>

---

🆑
- add: The shadows have awakened, and their ascendance is soon to
follow. Do not enter maints.

---------

Signed-off-by: Lumminal <81829924+Lumminal@users.noreply.github.com>
2025-07-20 12:05:11 +10:00

54 lines
1.6 KiB
C#

using Content.Client.Flash;
using Content.Shared._EE.Shadowling;
using Content.Shared._EE.Shadowling.Components;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.GameStates;
using Robust.Shared.Player;
using Robust.Shared.Timing;
namespace Content.Client._EE.Shadowling;
public sealed class EnthrallSystem : SharedEnthrallSystem
{
private EnthrallOverlay _overlay = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IOverlayManager _overlayManager = default!;
/// <inheritdoc/>
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<ThrallComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<ThrallComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<ThrallComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);
_overlay = new();
}
private void OnPlayerAttached(EntityUid uid, ThrallComponent component, LocalPlayerAttachedEvent args)
{
_overlayManager.AddOverlay(_overlay);
}
private void OnPlayerDetached(EntityUid uid, ThrallComponent component, LocalPlayerDetachedEvent args)
{
_overlayManager.RemoveOverlay(_overlay);
}
private void OnInit(EntityUid uid, ThrallComponent component, ComponentInit init)
{
if (_playerManager.LocalEntity == uid)
{
if (EntityManager.HasComponent<LesserShadowlingComponent>(uid))
return;
_overlay.ReceiveEnthrall(5f);
_overlayManager.AddOverlay(_overlay);
}
}
}