Inline EntityManager

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 11:11:52 +01:00
parent bd18574412
commit 5e177ae734
108 changed files with 250 additions and 199 deletions

View File

@@ -5,6 +5,7 @@ using Content.Shared.Interaction.Events;
using Content.Shared.Random.Helpers;
using Content.Shared.Tag;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
namespace Content.Server.Botany.Components
{
@@ -22,7 +23,7 @@ namespace Content.Server.Botany.Components
{
for (var i = 0; i < 2; i++)
{
var plank = Owner.EntityManager.SpawnEntity("MaterialWoodPlank1", Owner.Transform.Coordinates);
var plank = IoCManager.Resolve<IEntityManager>().SpawnEntity("MaterialWoodPlank1", Owner.Transform.Coordinates);
plank.RandomOffset(0.25f);
}

View File

@@ -37,7 +37,7 @@ namespace Content.Server.Botany.Components
for (var i = 0; i < random; i++)
{
produce.Seed.SpawnSeedPacket(Owner.Transform.Coordinates, Owner.EntityManager);
produce.Seed.SpawnSeedPacket(Owner.Transform.Coordinates, IoCManager.Resolve<IEntityManager>());
}
return true;