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-07-21 10:28:37 +03:00
committed by GitHub
parent c7ff647cb3
commit 644736b382
3 changed files with 32 additions and 0 deletions

View File

@@ -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();