Skip to content

Commit

Permalink
Update PlaceWorker_OnTopOfWalls to consider smoothed buildings as wal…
Browse files Browse the repository at this point in the history
…ls (parity with DoorsExpanded)
  • Loading branch information
lbmaian committed Oct 23, 2022
1 parent 6c7b3a0 commit 86f01cd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public override AcceptanceReport AllowsPlacing(BuildableDef checkingDef, IntVec3

static bool IsWall(Thing thing)
{
// In RW 1.3+, it seems like BuildingProperties.isPlaceOverableWall indicates whether something is a "wall".
if (thing.def.building?.isPlaceOverableWall ?? false)
// In RW 1.3+, it seems like BuildingProperties.isPlaceOverableWall or ThingDef.IsSmoothed indicates whether something is a "wall".
if (thing.def is { building: { isPlaceOverableWall: true } } or { IsSmoothed: true })
return true;
// Legacy heuristic for mods that don't use isPlaceOverableWall.
if (thing.def.defName.Contains("Wall"))
Expand Down

0 comments on commit 86f01cd

Please sign in to comment.