Skip to content

Commit

Permalink
shadowling veil toggles unpoweredflashlight
Browse files Browse the repository at this point in the history
  • Loading branch information
pheenty committed Oct 25, 2024
1 parent 5f57a9c commit 557f73a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Content.Server/Stories/Shadowling/ShadowlingSystem.Actions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ private void OnVeilEvent(EntityUid uid, ShadowlingComponent component, Shadowlin
{
if (HasComp<PoweredLightComponent>(ent))
_poweredLight.TryDestroyBulb(ent);
else if (TryComp<HandheldLightComponent>(ent, out var comp))
_handheldLight.TurnOff((ent, comp));
else if (TryComp<HandheldLightComponent>(ent, out var HandheldLight))
_handheldLight.TurnOff((ent, HandheldLight));
else if (TryComp<UnpoweredFlashlightComponent>(ent, out var UnpoweredFlashlight))
_unpoweredFlashlight.SetLight(ent, false, ent, true);
}

args.Handled = true;
Expand Down
2 changes: 2 additions & 0 deletions Content.Server/Stories/Shadowling/ShadowlingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using Content.Server.Stunnable;
using Content.Shared.Damage;
using Content.Shared.Damage.Systems;
using Content.Shared.Light.EntitySystems;
using Content.Shared.Mobs.Systems;
using Content.Shared.Stories.Shadowling;
using Content.Shared.Weapons.Ranged.Events;
Expand All @@ -36,6 +37,7 @@ public sealed partial class ShadowlingSystem : EntitySystem
[Dependency] private readonly SmokeSystem _smoke = default!;
[Dependency] private readonly StandingStateSystem _standing = default!;
[Dependency] private readonly HandheldLightSystem _handheldLight = default!;
[Dependency] private readonly UnpoweredFlashlightSystem _unpoweredFlashlight = default!;
[Dependency] private readonly DoAfterSystem _doAfter = default!;
[Dependency] private readonly AudioSystem _audio = default!;
[Dependency] private readonly RoundEndSystem _roundEnd = default!;
Expand Down

0 comments on commit 557f73a

Please sign in to comment.