mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
<!-- 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>
64 lines
2.1 KiB
C#
64 lines
2.1 KiB
C#
using Content.Server.Actions;
|
|
using Content.Shared._EE.Shadowling;
|
|
using Content.Shared._EE.Shadowling.Components;
|
|
using Content.Shared.Actions;
|
|
using Content.Shared.Alert;
|
|
|
|
|
|
namespace Content.Server._EE.Shadowling;
|
|
|
|
|
|
/// <summary>
|
|
/// This handles logic for Lesser Shadowlings.
|
|
/// Just upgrades the guise ability into Shadow Walk
|
|
/// </summary>
|
|
public sealed class LesserShadowlingSystem : EntitySystem
|
|
{
|
|
[Dependency] private readonly ActionsSystem _actions = default!;
|
|
[Dependency] private readonly AlertsSystem _alerts = default!;
|
|
/// <inheritdoc/>
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<LesserShadowlingComponent, ComponentRemove>(OnRemove);
|
|
SubscribeLocalEvent<LesserShadowlingComponent, ComponentStartup>(OnStartup);
|
|
}
|
|
|
|
private void OnStartup(EntityUid uid, LesserShadowlingComponent component, ComponentStartup args)
|
|
{
|
|
if (!TryComp<ThrallComponent>(uid, out var thrall))
|
|
return;
|
|
if (!TryComp<ActionsComponent>(uid, out var actions))
|
|
return;
|
|
|
|
AddLesserActions(uid, component, thrall, actions);
|
|
}
|
|
|
|
private void AddLesserActions(EntityUid uid, LesserShadowlingComponent component, ThrallComponent thrall, ActionsComponent comp)
|
|
{
|
|
_actions.RemoveAction(thrall.ActionGuiseEntity);
|
|
|
|
_actions.AddAction(uid, ref component.ShadowWalkActionId, component.ShadowWalkAction, component: comp);
|
|
EnsureComp<ShadowlingShadowWalkComponent>(uid);
|
|
|
|
EnsureComp<LightDetectionComponent>(uid);
|
|
var lightMod = EnsureComp<LightDetectionDamageModifierComponent>(uid);
|
|
|
|
lightMod.DetectionValueMax = 10;
|
|
}
|
|
|
|
private void OnRemove(EntityUid uid, LesserShadowlingComponent component, ComponentRemove args)
|
|
{
|
|
if (!TryComp(uid, out ActionsComponent? comp))
|
|
return;
|
|
|
|
_actions.RemoveAction(uid, component.ShadowWalkActionId, comp);
|
|
RemComp<ShadowlingShadowWalkComponent>(uid);
|
|
RemComp<LightDetectionComponent>(uid);
|
|
RemComp<LightDetectionDamageModifierComponent>(uid);
|
|
|
|
_alerts.ClearAlert(uid, component.AlertProto);
|
|
}
|
|
}
|