Removed lifetime handling from ImmovableRod and added TimedDespawnComponent to the prototype instead (#9870)

This commit is contained in:
Andreas Kämper
2022-07-19 09:08:47 +02:00
committed by GitHub
parent 9257c0788b
commit 209212d87d
3 changed files with 4 additions and 19 deletions

View File

@@ -1,4 +1,4 @@
using Content.Server.Body.Components;
using Content.Server.Body.Components;
using Content.Server.Popups;
using Content.Shared.Examine;
using Content.Shared.Popups;
@@ -23,14 +23,6 @@ public sealed class ImmovableRodSystem : EntitySystem
// we are deliberately including paused entities. rod hungers for all
foreach (var (rod, trans) in EntityManager.EntityQuery<ImmovableRodComponent, TransformComponent>(true))
{
rod.Accumulator += frameTime;
if (rod.Accumulator > rod.Lifetime.TotalSeconds)
{
QueueDel(rod.Owner);
return;
}
if (!rod.DestroyTiles)
continue;
if (!_map.TryGetGrid(trans.GridID, out var grid))