Remove 700 usages of Component.Owner (#21100)
This commit is contained in:
@@ -3,7 +3,6 @@ using Content.Server.Kitchen.Components;
|
||||
using Content.Shared.Hands.EntitySystems;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Random;
|
||||
using Content.Shared.Random.Helpers;
|
||||
using Robust.Shared.Containers;
|
||||
|
||||
namespace Content.Server.Botany.Systems;
|
||||
@@ -39,7 +38,7 @@ public sealed class LogSystem : EntitySystem
|
||||
else
|
||||
{
|
||||
var xform = Transform(plank);
|
||||
_containerSystem.AttachParentToContainerOrGrid(xform);
|
||||
_containerSystem.AttachParentToContainerOrGrid((plank, xform));
|
||||
xform.LocalRotation = 0;
|
||||
_randomHelper.RandomOffset(plank, 0.25f);
|
||||
}
|
||||
|
||||
@@ -58,13 +58,14 @@ public sealed class PlantHolderSystem : EntitySystem
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
foreach (var plantHolder in EntityQuery<PlantHolderComponent>())
|
||||
var query = EntityQueryEnumerator<PlantHolderComponent>();
|
||||
while (query.MoveNext(out var uid, out var plantHolder))
|
||||
{
|
||||
if (plantHolder.NextUpdate > _gameTiming.CurTime)
|
||||
continue;
|
||||
plantHolder.NextUpdate = _gameTiming.CurTime + plantHolder.UpdateDelay;
|
||||
|
||||
Update(plantHolder.Owner, plantHolder);
|
||||
Update(uid, plantHolder);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user