Energy Shield (#16996)
* energy shield * description edits * shields protect * small correction * say no to asteroid bees * fix * BlockModifier * fix * tweak * tweak * ops * fix * Update RobustToolbox * Revert "Update RobustToolbox" This reverts commit 55be82fe537490367e0afaf86365b0e274e6597e. * formatting
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Server.Weapons.Melee.EnergySword;
|
||||
using Content.Server.Weapons.Melee.ItemToggle;
|
||||
using Content.Shared.Weapons.Reflect;
|
||||
|
||||
namespace Content.Server.Weapons.Reflect;
|
||||
@@ -10,6 +11,8 @@ public sealed class ReflectSystem : SharedReflectSystem
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<ReflectComponent, EnergySwordActivatedEvent>(EnableReflect);
|
||||
SubscribeLocalEvent<ReflectComponent, EnergySwordDeactivatedEvent>(DisableReflect);
|
||||
SubscribeLocalEvent<ReflectComponent, ItemToggleActivatedEvent>(ShieldEnableReflect);
|
||||
SubscribeLocalEvent<ReflectComponent, ItemToggleDeactivatedEvent>(ShieldDisableReflect);
|
||||
}
|
||||
|
||||
private void EnableReflect(EntityUid uid, ReflectComponent comp, ref EnergySwordActivatedEvent args)
|
||||
@@ -23,4 +26,16 @@ public sealed class ReflectSystem : SharedReflectSystem
|
||||
comp.Enabled = false;
|
||||
Dirty(comp);
|
||||
}
|
||||
}
|
||||
|
||||
private void ShieldEnableReflect(EntityUid uid, ReflectComponent comp, ref ItemToggleActivatedEvent args)
|
||||
{
|
||||
comp.Enabled = true;
|
||||
Dirty(comp);
|
||||
}
|
||||
|
||||
private void ShieldDisableReflect(EntityUid uid, ReflectComponent comp, ref ItemToggleDeactivatedEvent args)
|
||||
{
|
||||
comp.Enabled = false;
|
||||
Dirty(comp);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user