mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
26 lines
No EOL
787 B
C#
26 lines
No EOL
787 B
C#
using Content.Server.Weapons.Melee.EnergySword;
|
|
using Content.Shared.Weapons.Reflect;
|
|
|
|
namespace Content.Server.Weapons.Reflect;
|
|
|
|
public sealed class ReflectSystem : SharedReflectSystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<ReflectComponent, EnergySwordActivatedEvent>(EnableReflect);
|
|
SubscribeLocalEvent<ReflectComponent, EnergySwordDeactivatedEvent>(DisableReflect);
|
|
}
|
|
|
|
private void EnableReflect(EntityUid uid, ReflectComponent comp, ref EnergySwordActivatedEvent args)
|
|
{
|
|
comp.Enabled = true;
|
|
Dirty(comp);
|
|
}
|
|
|
|
private void DisableReflect(EntityUid uid, ReflectComponent comp, ref EnergySwordDeactivatedEvent args)
|
|
{
|
|
comp.Enabled = false;
|
|
Dirty(comp);
|
|
}
|
|
} |