Disarm 1984 (#8872)
This commit is contained in:
@@ -5,6 +5,7 @@ using Content.Shared.Light;
|
||||
using Content.Shared.Light.Component;
|
||||
using Content.Shared.Toggleable;
|
||||
using Content.Shared.Tools.Components;
|
||||
using Content.Server.CombatMode.Disarm;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Random;
|
||||
@@ -68,6 +69,11 @@ namespace Content.Server.Weapon.Melee.EnergySword
|
||||
item.Size = 5;
|
||||
}
|
||||
|
||||
if (TryComp<DisarmMalusComponent>(comp.Owner, out var malus))
|
||||
{
|
||||
malus.Malus -= comp.litDisarmMalus;
|
||||
}
|
||||
|
||||
SoundSystem.Play(comp.DeActivateSound.GetSound(), Filter.Pvs(comp.Owner, entityManager: EntityManager), comp.Owner);
|
||||
|
||||
comp.Activated = false;
|
||||
@@ -85,6 +91,11 @@ namespace Content.Server.Weapon.Melee.EnergySword
|
||||
|
||||
SoundSystem.Play(comp.ActivateSound.GetSound(), Filter.Pvs(comp.Owner, entityManager: EntityManager), comp.Owner);
|
||||
|
||||
if (TryComp<DisarmMalusComponent>(comp.Owner, out var malus))
|
||||
{
|
||||
malus.Malus += comp.litDisarmMalus;
|
||||
}
|
||||
|
||||
comp.Activated = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user