Status effects fix. Refresh the status effect cooldown. (#5708)
This commit is contained in:
@@ -37,12 +37,12 @@ namespace Content.Server.Stunnable
|
||||
// Let the actual methods log errors for these.
|
||||
Resolve(otherUid, ref alerts, ref standingState, ref appearance, false);
|
||||
|
||||
_stunSystem.TryStun(otherUid, TimeSpan.FromSeconds(component.StunAmount), status, alerts);
|
||||
_stunSystem.TryStun(otherUid, TimeSpan.FromSeconds(component.StunAmount), true, status, alerts);
|
||||
|
||||
_stunSystem.TryKnockdown(otherUid, TimeSpan.FromSeconds(component.KnockdownAmount),
|
||||
_stunSystem.TryKnockdown(otherUid, TimeSpan.FromSeconds(component.KnockdownAmount), true,
|
||||
status, alerts);
|
||||
|
||||
_stunSystem.TrySlowdown(otherUid, TimeSpan.FromSeconds(component.SlowdownAmount),
|
||||
_stunSystem.TrySlowdown(otherUid, TimeSpan.FromSeconds(component.SlowdownAmount), true,
|
||||
component.WalkSpeedMultiplier, component.RunSpeedMultiplier, status, alerts);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Content.Server.Stunnable
|
||||
if (args.Handled || !_random.Prob(args.PushProbability))
|
||||
return;
|
||||
|
||||
if (!TryParalyze(uid, TimeSpan.FromSeconds(4f), status))
|
||||
if (!TryParalyze(uid, TimeSpan.FromSeconds(4f), true, status))
|
||||
return;
|
||||
|
||||
var source = args.Source;
|
||||
|
||||
@@ -129,21 +129,21 @@ namespace Content.Server.Stunnable
|
||||
if (!EntityManager.HasComponent<SlowedDownComponent>(entity.Uid))
|
||||
{
|
||||
if (_robustRandom.Prob(comp.ParalyzeChanceNoSlowdown))
|
||||
_stunSystem.TryParalyze(entity.Uid, TimeSpan.FromSeconds(comp.ParalyzeTime), status);
|
||||
_stunSystem.TryParalyze(entity.Uid, TimeSpan.FromSeconds(comp.ParalyzeTime), true, status);
|
||||
else
|
||||
_stunSystem.TrySlowdown(entity.Uid, TimeSpan.FromSeconds(comp.SlowdownTime), 0.5f, 0.5f, status);
|
||||
_stunSystem.TrySlowdown(entity.Uid, TimeSpan.FromSeconds(comp.SlowdownTime), true, 0.5f, 0.5f, status);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_robustRandom.Prob(comp.ParalyzeChanceWithSlowdown))
|
||||
_stunSystem.TryParalyze(entity.Uid, TimeSpan.FromSeconds(comp.ParalyzeTime), status);
|
||||
_stunSystem.TryParalyze(entity.Uid, TimeSpan.FromSeconds(comp.ParalyzeTime), true, status);
|
||||
else
|
||||
_stunSystem.TrySlowdown(entity.Uid, TimeSpan.FromSeconds(comp.SlowdownTime), 0.5f, 0.5f, status);
|
||||
_stunSystem.TrySlowdown(entity.Uid, TimeSpan.FromSeconds(comp.SlowdownTime), true, 0.5f, 0.5f, status);
|
||||
}
|
||||
|
||||
var slowdownTime = TimeSpan.FromSeconds(comp.SlowdownTime);
|
||||
_jitterSystem.DoJitter(entity.Uid, slowdownTime, status:status);
|
||||
_stutteringSystem.DoStutter(entity.Uid, slowdownTime, status);
|
||||
_jitterSystem.DoJitter(entity.Uid, slowdownTime, true, status:status);
|
||||
_stutteringSystem.DoStutter(entity.Uid, slowdownTime, true, status);
|
||||
|
||||
if (!comp.Owner.TryGetComponent<PowerCellSlotComponent>(out var slot) || slot.Cell == null || !(slot.Cell.CurrentCharge < comp.EnergyPerUse))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user