Remove most IEntity usages from explosions (#5240)
* Remove most IEntity usages from Destructible and Explosions * Perform a minute amount of cleanup * Fix build
This commit is contained in:
committed by
GitHub
parent
3a4186f6f6
commit
42aaba9a5d
@@ -8,7 +8,7 @@ using Content.Server.Chemistry.EntitySystems;
|
||||
using Content.Server.Configurable;
|
||||
using Content.Server.Disposal.Tube.Components;
|
||||
using Content.Server.EUI;
|
||||
using Content.Server.Explosion;
|
||||
using Content.Server.Explosion.EntitySystems;
|
||||
using Content.Server.Ghost.Roles;
|
||||
using Content.Server.Inventory.Components;
|
||||
using Content.Server.Mind.Commands;
|
||||
@@ -40,6 +40,7 @@ namespace Content.Server.Administration
|
||||
[Dependency] private readonly IAdminManager _adminManager = default!;
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly EuiManager _euiManager = default!;
|
||||
[Dependency] private readonly ExplosionSystem _explosions = default!;
|
||||
[Dependency] private readonly GhostRoleSystem _ghostRoleSystem = default!;
|
||||
|
||||
private readonly Dictionary<IPlayerSession, EditSolutionsEui> _openSolutionUis = new();
|
||||
@@ -118,7 +119,7 @@ namespace Content.Server.Administration
|
||||
verb.Act = () =>
|
||||
{
|
||||
var coords = args.Target.Transform.Coordinates;
|
||||
Timer.Spawn(_gameTiming.TickPeriod, () => ExplosionHelper.SpawnExplosion(coords, 0, 1, 2, 1), CancellationToken.None);
|
||||
Timer.Spawn(_gameTiming.TickPeriod, () => _explosions.SpawnExplosion(coords, 0, 1, 2, 1), CancellationToken.None);
|
||||
if (args.Target.TryGetComponent(out SharedBodyComponent? body))
|
||||
{
|
||||
body.Gib();
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using Content.Server.Explosion;
|
||||
using Content.Server.Explosion.EntitySystems;
|
||||
using Content.Shared.Administration;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
|
||||
namespace Content.Server.Administration.Commands
|
||||
{
|
||||
[AdminCommand(AdminFlags.Fun)]
|
||||
@@ -35,7 +35,7 @@ namespace Content.Server.Administration.Commands
|
||||
var mapTransform = player.AttachedEntity.Transform.GetMapTransform();
|
||||
var coords = new EntityCoordinates(mapTransform.Owner.Uid, x, y);
|
||||
|
||||
ExplosionHelper.SpawnExplosion(coords, dev, hvy, lgh, fla);
|
||||
EntitySystem.Get<ExplosionSystem>().SpawnExplosion(coords, dev, hvy, lgh, fla);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user