Inline UID
This commit is contained in:
@@ -14,8 +14,8 @@ namespace Content.Server.Containers
|
||||
{
|
||||
foreach (var entity in container.ContainedEntities)
|
||||
{
|
||||
if (IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(entity.Uid).EntityPrototype?.ID == prototypeId) total++;
|
||||
if(!IoCManager.Resolve<IEntityManager>().TryGetComponent<ContainerManagerComponent?>(entity.Uid, out var component)) continue;
|
||||
if (IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(entity).EntityPrototype?.ID == prototypeId) total++;
|
||||
if(!IoCManager.Resolve<IEntityManager>().TryGetComponent<ContainerManagerComponent?>(entity, out var component)) continue;
|
||||
total += component.CountPrototypeOccurencesRecursive(prototypeId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Content.Server.Containers
|
||||
{
|
||||
if (!EntityManager.TryGetComponent<IContainerManager>(uid, out var mComp))
|
||||
return;
|
||||
var baseCoords = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(component.Owner.Uid).Coordinates;
|
||||
var baseCoords = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(component.Owner).Coordinates;
|
||||
foreach (var v in component.Containers)
|
||||
{
|
||||
if (mComp.TryGetContainer(v, out var container))
|
||||
|
||||
Reference in New Issue
Block a user