Pettable Animals (#6530)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: mirrorcult <lunarautomaton6@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using Content.Shared.Maps;
|
||||
using Content.Shared.Window;
|
||||
using Content.Shared.Tag;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -15,9 +15,10 @@ namespace Content.Shared.Construction.Conditions
|
||||
{
|
||||
public bool Condition(EntityUid user, EntityCoordinates location, Direction direction)
|
||||
{
|
||||
var tagSystem = EntitySystem.Get<TagSystem>();
|
||||
foreach (var entity in location.GetEntitiesInTile(LookupFlags.Approximate | LookupFlags.IncludeAnchored))
|
||||
{
|
||||
if (IoCManager.Resolve<IEntityManager>().HasComponent<SharedWindowComponent>(entity))
|
||||
if (tagSystem.HasTag(entity, "Window"))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user