Inline GetComponent
This commit is contained in:
@@ -194,7 +194,7 @@ namespace Content.Server.Fluids.Components
|
||||
}
|
||||
|
||||
var puddleEnt = serverEntityManager.SpawnEntity(prototype, spillGridCoords);
|
||||
var newPuddleComponent = puddleEnt.GetComponent<PuddleComponent>();
|
||||
var newPuddleComponent = IoCManager.Resolve<IEntityManager>().GetComponent<PuddleComponent>(puddleEnt.Uid);
|
||||
|
||||
puddleSystem.TryAddSolution(newPuddleComponent.Owner.Uid, solution, sound);
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ namespace Content.Server.Fluids.Components
|
||||
}
|
||||
|
||||
// Add the solution to the vapor and actually send the thing
|
||||
var vaporComponent = vapor.GetComponent<VaporComponent>();
|
||||
var vaporComponent = IoCManager.Resolve<IEntityManager>().GetComponent<VaporComponent>(vapor.Uid);
|
||||
var vaporSystem = EntitySystem.Get<VaporSystem>();
|
||||
vaporSystem.TryAddSolution(vaporComponent, solution);
|
||||
|
||||
|
||||
@@ -329,9 +329,10 @@ namespace Content.Server.Fluids.EntitySystems
|
||||
}
|
||||
|
||||
puddle ??= () =>
|
||||
IoCManager.Resolve<IEntityManager>().SpawnEntity(IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(puddleComponent.Owner.Uid).EntityPrototype?.ID,
|
||||
mapGrid.DirectionToGrid(coords, direction))
|
||||
.GetComponent<PuddleComponent>();
|
||||
{
|
||||
return IoCManager.Resolve<IEntityManager>().GetComponent<PuddleComponent>(IoCManager.Resolve<IEntityManager>().SpawnEntity(IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(puddleComponent.Owner.Uid).EntityPrototype?.ID,
|
||||
mapGrid.DirectionToGrid(coords, direction)).Uid);
|
||||
};
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user