public override AcceptanceReport AllowsPlacing(BuildableDef checkingDef, IntVec3 loc, Rot4 rot, Map map, Thing thingToIgnore = null, Thing thing = null) { if (loc.GetRoof(map) != null) { if (AvaliUtility.BuildingInPosition(map, loc, checkingDef) != null) { return(new AcceptanceReport("SpaceAlreadyOccupied".Translate())); } else { return(true); } } return(new AcceptanceReport("MustPlaceUnderRoof".Translate())); }
public override AcceptanceReport AllowsPlacing(BuildableDef def, IntVec3 center, Rot4 rot, Map map, Thing thingToIgnore = null) { if (rot == Rot4.West || rot == Rot4.East) { c1 = center + new IntVec3(1, 0, 0); c2 = center - new IntVec3(1, 0, 0); } else { c1 = center + new IntVec3(0, 0, 1); c2 = center - new IntVec3(0, 0, 1); } if (AvaliUtility.BuildingInPosition(map, c1, def) != null) { if (AvaliUtility.BuildingInPosition(map, c2, def) != null) { return(true); } } return(true); }