static void Postfix(PlacementMode __instance) { Mod.helper.Log("test"); if (__instance.IsPlacing()) { Mod.dLog("placing"); bool dragging = (bool)typeof(PlacementMode) .GetField("attemptedDrag", BindingFlags.NonPublic | BindingFlags.Instance) .GetValue(__instance); if (!dragging) { Building b = __instance.GetHoverBuilding(); Cell cell = World.inst.GetCellData(b.transform.position); if (cell != null) { Cell other = FindClosestGroundTile(cell); if (other != null) { DebugExt.dLog("found close ground-level tile", false, other.Center); } } } } }