diff --git a/Content.Server/GameObjects/Components/Fluids/SprayComponent.cs b/Content.Server/GameObjects/Components/Fluids/SprayComponent.cs index b6d526cb91..230af1776a 100644 --- a/Content.Server/GameObjects/Components/Fluids/SprayComponent.cs +++ b/Content.Server/GameObjects/Components/Fluids/SprayComponent.cs @@ -15,6 +15,7 @@ using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Maths; +using Robust.Shared.Physics; using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Player; using Robust.Shared.Timing; @@ -52,6 +53,8 @@ namespace Content.Server.GameObjects.Components.Fluids private bool _hasSafety; [DataField("safety")] private bool _safety = true; + [DataField("impulse")] + private float _impulse = 0f; /// /// The amount of solution to be sprayer from this solution when using it @@ -159,6 +162,11 @@ namespace Content.Server.GameObjects.Components.Fluids vaporComponent.TryAddSolution(solution); vaporComponent.Start(rotation.ToVec(), _sprayVelocity, target, _sprayAliveTime); + + if (_impulse > 0f && eventArgs.User.TryGetComponent(out IPhysBody? body)) + { + body.ApplyLinearImpulse(-direction * _impulse); + } } //Play sound diff --git a/Resources/Prototypes/Entities/Objects/Misc/fire_extinguisher.yml b/Resources/Prototypes/Entities/Objects/Misc/fire_extinguisher.yml index 396cdb1a6f..644971d9d3 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/fire_extinguisher.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/fire_extinguisher.yml @@ -29,6 +29,7 @@ sprayVelocity: 2.0 sprayTimeAlive: 1.5 transferAmount: 5 + impulse: 50.0 - type: FireExtinguisher - type: Appearance visuals: