NPCs no longer consider anchored pipes as weapons (#30061)

* Anchored pipes are no longer considered weapons

* Switch to overload utilizing a TransformQuery
This commit is contained in:
osjarw
2024-08-09 17:53:18 +01:00
committed by deltanedas
parent 396e0ed171
commit 44e292798d
3 changed files with 32 additions and 0 deletions
@@ -499,6 +499,26 @@ public sealed class NPCUtilitySystem : EntitySystem
break;
}
case RemoveAnchoredFilter:
{
_entityList.Clear();
foreach (var ent in entities)
{
if (!TryComp(ent, out TransformComponent? xform))
continue;
if (xform.Anchored)
_entityList.Add(ent);
}
foreach (var ent in _entityList)
{
entities.Remove(ent);
}
break;
}
case PuddleFilter:
{
_entityList.Clear();