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,14 +1,10 @@
using System;
using Content.Server.Explosion.Components;
using Content.Server.Flash.Components;
using Content.Server.Throwing;
using Content.Shared.Explosion;
using Content.Shared.Interaction;
using Content.Shared.Interaction.Events;
using Content.Shared.Throwing;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Maths;
using Robust.Shared.Random;
namespace Content.Server.Explosion.EntitySystems;
@@ -18,6 +14,7 @@ public sealed class ClusterGrenadeSystem : EntitySystem
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly SharedContainerSystem _container = default!;
[Dependency] private readonly TriggerSystem _trigger = default!;
[Dependency] private readonly ThrowingSystem _throwingSystem = default!;
public override void Initialize()
{
@@ -83,7 +80,7 @@ public sealed class ClusterGrenadeSystem : EntitySystem
thrownCount++;
// TODO: Suss out throw strength
grenade.TryThrow(angle.ToVec().Normalized * component.ThrowDistance);
_throwingSystem.TryThrow(grenade, angle.ToVec().Normalized * component.ThrowDistance);
grenade.SpawnTimer(delay, () =>
{