Cleans up tag system (#28272)
* Updated tag system * Added params methods * Fixed tag integration tests * Fixed params methods recursion * Revert has All/Any tag one argument realisation * Updated tag integration tests * Shit happens * Added individual List/HashSet methods, docs, tests
This commit is contained in:
@@ -13,6 +13,7 @@ using Robust.Shared.Collections;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -24,13 +25,15 @@ public sealed partial class DungeonJob
|
||||
* Run after the main dungeon generation
|
||||
*/
|
||||
|
||||
private static readonly ProtoId<TagPrototype> WallTag = "Wall";
|
||||
|
||||
private bool HasWall(MapGridComponent grid, Vector2i tile)
|
||||
{
|
||||
var anchored = _maps.GetAnchoredEntitiesEnumerator(_gridUid, _grid, tile);
|
||||
|
||||
while (anchored.MoveNext(out var uid))
|
||||
{
|
||||
if (_tagQuery.TryGetComponent(uid, out var tagComp) && tagComp.Tags.Contains("Wall"))
|
||||
if (_tag.HasTag(uid.Value, WallTag))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user