Skip to content

Commit

Permalink
Merge pull request #28 from lbmaian/master
Browse files Browse the repository at this point in the history
Avoid hardcoding Version.txt folder, parity with DoorsExpanded
  • Loading branch information
jecrell authored Oct 23, 2022
2 parents 43bfb56 + 8f5386b commit eb608a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Source/AllModdingComponents/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<Project>
<PropertyGroup>
<Configurations>RW1.4;RW1.4Unstable</Configurations>
<Configuration Condition=" '$(Configuration)' == '' ">RW1.4Unstable</Configuration>
<Configuration Condition=" '$(Configuration)' == '' Or '$(Configuration)' == 'Debug' ">RW1.4Unstable</Configuration>
<TargetFramework>net472</TargetFramework>
<NoStdLib>true</NoStdLib>
<LangVersion>10.0</LangVersion>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<Version>$([System.IO.File]::ReadAllText("C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Workspace\JecsTools\About\Version.txt"))</Version>
<Version>$([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)\..\..\..\About\Version.txt"))</Version>
<!--
For some reason, although SDK projects should default Deterministic to true, when importing this props file,
builds become non-deterministic unless Deterministic is explicitly set to true here.
Expand Down
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 eb608a7

Please sign in to comment.