Revenant 2: Electric Boogaloo (#11510)
* revenant 2: electric boogaloo * revevent * oversights * Update RevenantSystem.Abilities.cs * names * no shoote stouhg walls
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using Content.Server.Beam;
|
||||
using Content.Shared.Revenant.Components;
|
||||
using Content.Shared.Revenant.EntitySystems;
|
||||
|
||||
namespace Content.Server.Revenant.EntitySystems;
|
||||
|
||||
/// <summary>
|
||||
/// This handles...
|
||||
/// </summary>
|
||||
public sealed class RevenantOverloadedLightsSystem : SharedRevenantOverloadedLightsSystem
|
||||
{
|
||||
[Dependency] private readonly BeamSystem _beam = default!;
|
||||
|
||||
protected override void OnZap(RevenantOverloadedLightsComponent component)
|
||||
{
|
||||
if (component.Target == null)
|
||||
return;
|
||||
|
||||
var lxform = Transform(component.Owner);
|
||||
var txform = Transform(component.Target.Value);
|
||||
|
||||
if (!lxform.Coordinates.TryDistance(EntityManager, txform.Coordinates, out var distance))
|
||||
return;
|
||||
if (distance > component.ZapRange)
|
||||
return;
|
||||
|
||||
_beam.TryCreateBeam(component.Owner, component.Target.Value, component.ZapBeamEntityId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user