Remove ignore-inside-blocker (#6692)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -1,13 +1,29 @@
|
||||
using System;
|
||||
using Robust.Shared.GameObjects;
|
||||
using System.Linq;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Serialization;
|
||||
using static Content.Shared.Interaction.SharedInteractionSystem;
|
||||
|
||||
namespace Content.Shared.Construction
|
||||
{
|
||||
public abstract class SharedConstructionSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Get predicate for construction obstruction checks.
|
||||
/// </summary>
|
||||
public Ignored? GetPredicate(bool canBuildInImpassable, MapCoordinates coords)
|
||||
{
|
||||
if (!canBuildInImpassable)
|
||||
return null;
|
||||
|
||||
if (!_mapManager.TryFindGridAt(coords, out var grid))
|
||||
return null;
|
||||
|
||||
var ignored = grid.GetAnchoredEntities(coords).ToHashSet();
|
||||
return e => ignored.Contains(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sent client -> server to to tell the server that we started building
|
||||
/// a structure-construction.
|
||||
|
||||
Reference in New Issue
Block a user