public List <ElementPriorityPair <Entity> > GetAreaTriggerBuildingsInRangeOf(int x, int z) { Board <Entity> board = Service.Get <BoardController>().Board; board.MakeCoordinatesAbsolute(ref x, ref z); if (this.IsPositionInvalid(x, z)) { return(null); } SpatialIndex spatialIndex = this.EnsureSpatialIndex(x, z); if (!spatialIndex.AlreadyScannedAreaTriggerBuildingsInRange) { this.SetAreaTriggerBuildingsInRangeOf(x, z, spatialIndex); } return(spatialIndex.GetArareaTriggerBuildingsInRange()); }