Throw out throw helpers (#7195)

This commit is contained in:
Leon Friedrich
2022-03-24 02:33:01 +13:00
committed by GitHub
parent 74d4adfb96
commit de190e4e2f
8 changed files with 127 additions and 125 deletions

View File

@@ -1,5 +1,6 @@
using Content.Server.Throwing;
using Content.Shared.Acts;
using Content.Shared.Throwing;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Maths;
@@ -10,6 +11,8 @@ namespace Content.Server.Explosion.Components
public sealed class ExplosionLaunchedComponent : Component, IExAct
{
[Dependency] private readonly IEntityManager _entMan = default!;
[Dependency] private readonly IEntitySystemManager _sysMan = default!;
void IExAct.OnExplosion(ExplosionEventArgs eventArgs)
{
if (_entMan.Deleted(Owner))
@@ -34,7 +37,7 @@ namespace Content.Server.Explosion.Components
_ => 0,
};
Owner.TryThrow(direction, throwForce);
_sysMan.GetEntitySystem<ThrowingSystem>().TryThrow(Owner, direction, throwForce);
}
}
}