Adds tag support to construction (#3386)

This commit is contained in:
Vera Aguilera Puerto
2021-02-24 16:26:56 +01:00
committed by GitHub
parent 2ec0304072
commit 436d406585
11 changed files with 110 additions and 62 deletions

View File

@@ -185,46 +185,24 @@ namespace Content.Server.GameObjects.EntitySystems
break;
case ComponentConstructionGraphStep componentStep:
case ArbitraryInsertConstructionGraphStep arbitraryStep:
foreach (var entity in EnumerateNearby(user))
{
if (!componentStep.EntityValid(entity))
if (!arbitraryStep.EntityValid(entity))
continue;
if (string.IsNullOrEmpty(componentStep.Store))
if (string.IsNullOrEmpty(arbitraryStep.Store))
{
if (!container.Insert(entity))
continue;
}
else if (!GetContainer(componentStep.Store).Insert(entity))
else if (!GetContainer(arbitraryStep.Store).Insert(entity))
continue;
handled = true;
break;
}
break;
case PrototypeConstructionGraphStep prototypeStep:
foreach (var entity in EnumerateNearby(user))
{
if (!prototypeStep.EntityValid(entity))
continue;
if (string.IsNullOrEmpty(prototypeStep.Store))
{
if (!container.Insert(entity))
continue;
}
else if (!GetContainer(prototypeStep.Store).Insert(entity))
{
continue;
}
handled = true;
break;
}
break;
}