StackSystem uses EntityUid for Split and Spawn

This commit is contained in:
Vera Aguilera Puerto
2021-11-09 15:34:40 +01:00
parent 6f2cc733e7
commit 8b57bafcd1
13 changed files with 60 additions and 44 deletions

View File

@@ -171,10 +171,10 @@ namespace Content.Server.Construction
if (string.IsNullOrEmpty(materialStep.Store))
{
if (!container.Insert(splitStack))
if (!container.Insert(EntityManager.GetEntity(splitStack.Value)))
continue;
}
else if (!GetContainer(materialStep.Store).Insert(splitStack))
else if (!GetContainer(materialStep.Store).Insert(EntityManager.GetEntity(splitStack.Value)))
continue;
handled = true;
@@ -186,7 +186,7 @@ namespace Content.Server.Construction
case ArbitraryInsertConstructionGraphStep arbitraryStep:
foreach (var entity in EnumerateNearby(user))
{
if (!arbitraryStep.EntityValid(entity))
if (!arbitraryStep.EntityValid(entity.Uid, EntityManager))
continue;
if (string.IsNullOrEmpty(arbitraryStep.Store))
@@ -430,7 +430,7 @@ namespace Content.Server.Construction
switch (step)
{
case EntityInsertConstructionGraphStep entityInsert:
if (entityInsert.EntityValid(holding))
if (entityInsert.EntityValid(holding.Uid, EntityManager))
valid = true;
break;
case ToolConstructionGraphStep _: