Knockdown (#535)
* - add: Better knockdown. * - add: Some stuff. * - add: Ghetto alert.
This commit is contained in:
@@ -153,7 +153,7 @@ namespace Content.Server.Explosion.EntitySystems
|
||||
private void HandleFlashTrigger(EntityUid uid, FlashOnTriggerComponent component, TriggerEvent args)
|
||||
{
|
||||
// TODO Make flash durations sane ffs.
|
||||
_flashSystem.FlashArea(uid, args.User, component.Range, component.Duration * 1000f, probability: component.Probability, forceStun: component.ForceStun); // WD edit
|
||||
_flashSystem.FlashArea(uid, args.User, component.Range, component.Duration * 1000f, probability: component.Probability, stunTime: component.StunTime, knockdownTime: component.KnockdownTime); // WD edit
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ namespace Content.Server.Flash
|
||||
}
|
||||
|
||||
// WD edit
|
||||
public void FlashArea(Entity<FlashComponent?> source, EntityUid? user, float range, float duration, float slowTo = 0.8f, bool displayPopup = false, float probability = 1f, SoundSpecifier? sound = null, bool forceStun = false)
|
||||
public void FlashArea(Entity<FlashComponent?> source, EntityUid? user, float range, float duration, float slowTo = 0.8f, bool displayPopup = false, float probability = 1f, SoundSpecifier? sound = null, float stunTime = 0f, float knockdownTime = 0f)
|
||||
{
|
||||
var transform = Transform(source);
|
||||
var mapPosition = _transform.GetMapCoordinates(transform);
|
||||
@@ -202,8 +202,8 @@ namespace Content.Server.Flash
|
||||
|
||||
var distance = (mapPosition.Position - _transform.GetMapCoordinates(entity).Position).Length();
|
||||
|
||||
if (forceStun) // WD
|
||||
_flashSoundSuppressionSystem.Stun(entity, duration, distance, range);
|
||||
if (stunTime > 0f || knockdownTime > 0f) // WD
|
||||
_flashSoundSuppressionSystem.Stun(entity, stunTime, knockdownTime, distance, range);
|
||||
}
|
||||
|
||||
_audio.PlayPvs(sound, source, AudioParams.Default.WithVolume(1f).WithMaxDistance(3f));
|
||||
|
||||
Reference in New Issue
Block a user