mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-05-02 04:57:17 +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>
76 lines
2.6 KiB
C#
76 lines
2.6 KiB
C#
using Content.Server.Actions;
|
|
using Content.Server.DoAfter;
|
|
using Content.Server.Popups;
|
|
using Content.Shared._EE.Shadowling;
|
|
using Content.Shared._EE.Shadowling.Components;
|
|
using Content.Shared.Alert;
|
|
using Content.Shared.DoAfter;
|
|
using Content.Shared.Popups;
|
|
using Robust.Server.Audio;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.Player;
|
|
|
|
|
|
namespace Content.Server._EE.Shadowling;
|
|
|
|
|
|
/// <summary>
|
|
/// This handles the Nox Imperii system.
|
|
/// When used, the shadowling no longer becomes affected by lightning damage.
|
|
/// </summary>
|
|
public sealed class ShadowlingNoxImperiiSystem : EntitySystem
|
|
{
|
|
[Dependency] private readonly DoAfterSystem _doAfter = default!;
|
|
[Dependency] private readonly ActionsSystem _actions = default!;
|
|
[Dependency] private readonly AlertsSystem _alerts = default!;
|
|
[Dependency] private readonly PopupSystem _popups = default!;
|
|
[Dependency] private readonly AudioSystem _audio = default!;
|
|
/// <inheritdoc/>
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<ShadowlingNoxImperiiComponent, NoxImperiiEvent>(OnNoxImperii);
|
|
SubscribeLocalEvent<ShadowlingNoxImperiiComponent, NoxImperiiDoAfterEvent>(OnNoxImperiiDoAfter);
|
|
}
|
|
|
|
private void OnNoxImperii(EntityUid uid, ShadowlingNoxImperiiComponent component, NoxImperiiEvent args)
|
|
{
|
|
var doAfter = new DoAfterArgs(
|
|
EntityManager,
|
|
uid,
|
|
component.Duration,
|
|
new NoxImperiiDoAfterEvent(),
|
|
uid,
|
|
used: args.Action)
|
|
{
|
|
CancelDuplicate = true,
|
|
BreakOnDamage = true,
|
|
};
|
|
|
|
_doAfter.TryStartDoAfter(doAfter);
|
|
}
|
|
|
|
private void OnNoxImperiiDoAfter(EntityUid uid, ShadowlingNoxImperiiComponent component, NoxImperiiDoAfterEvent args)
|
|
{
|
|
if (!TryComp<ShadowlingComponent>(args.Args.User, out var sling))
|
|
return;
|
|
|
|
RemComp<ShadowlingNoxImperiiComponent>(uid);
|
|
RemComp<LightDetectionComponent>(uid);
|
|
RemComp<LightDetectionDamageModifierComponent>(uid);
|
|
|
|
_actions.RemoveAction(uid, args.Args.Used);
|
|
// Reduce heat damage from other sources
|
|
sling.HeatDamage.DamageDict["Heat"] = 10;
|
|
sling.HeatDamageProjectileModifier.DamageDict["Heat"] = 4;
|
|
|
|
_alerts.ClearAlert(uid, sling.AlertProto);
|
|
|
|
// Indicates that the crew should start caring more since the Shadowling is close to ascension
|
|
_audio.PlayGlobal(new SoundPathSpecifier("/Audio/Effects/ghost.ogg"), Filter.Broadcast(), false, AudioParams.Default.WithVolume(-2f));
|
|
|
|
_popups.PopupEntity(Loc.GetString("shadowling-nox-imperii-done"), uid, uid, PopupType.Medium);
|
|
}
|
|
}
|