Extracts magic strings from Tag calls (#36305)
* Extracts magic strings from Tag calls When #36281 gets merged, the `TagSystem` methods will all give warnings. Let's fix those warnings before they even happen! * Adds missing libraries * Remove not yet implemented TagSystem changes * Fix tag spelling error Genuinely surprised there was only 1! * Styling and proper type changes * Styling Co-authored-by: Tayrtahn <tayrtahn@gmail.com> --------- Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
using System.Numerics;
|
||||
using Content.Shared.Procedural;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Shared.Collections;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.Procedural.DungeonJob;
|
||||
|
||||
@@ -12,13 +14,15 @@ public sealed partial class DungeonJob
|
||||
* Run after the main dungeon generation
|
||||
*/
|
||||
|
||||
private static readonly ProtoId<TagPrototype> WallTag = "Wall";
|
||||
|
||||
private bool HasWall(Vector2i tile)
|
||||
{
|
||||
var anchored = _maps.GetAnchoredEntitiesEnumerator(_gridUid, _grid, tile);
|
||||
|
||||
while (anchored.MoveNext(out var uid))
|
||||
{
|
||||
if (_tags.HasTag(uid.Value, "Wall"))
|
||||
if (_tags.HasTag(uid.Value, WallTag))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user