public bool IsLinkAllowed(MapEntityPrefab target) { if (target == null) { return(false); } return(AllowedLinks.Contains(target.Identifier) || target.AllowedLinks.Contains(identifier) || target.Tags.Any(t => AllowedLinks.Contains(t)) || Tags.Any(t => target.AllowedLinks.Contains(t))); }
public bool IsLinkAllowed(MapEntityPrefab target) { if (target == null) { return(false); } if (target is StructurePrefab && AllowedLinks.Contains("structure")) { return(true); } if (target is ItemPrefab && AllowedLinks.Contains("item")) { return(true); } return(AllowedLinks.Contains(target.Identifier) || target.AllowedLinks.Contains(identifier) || target.Tags.Any(t => AllowedLinks.Contains(t)) || Tags.Any(t => target.AllowedLinks.Contains(t))); }