diff --git a/build.ps1 b/build.ps1 index 6413e02..fcd88cb 100644 --- a/build.ps1 +++ b/build.ps1 @@ -100,6 +100,10 @@ function updateToGameVersion function copyDependencies { $thirdpartyDir = "$PSScriptRoot\ThirdParty" + if (Test-Path "$thirdpartyDir\*.dll") + { + return + } if (!$installDir) { @@ -112,12 +116,8 @@ function copyDependencies $depsDir = "$installDir\RimWorldWin64_Data\Managed" Write-Host "Copying dependencies from installation directory" if (!(Test-Path $thirdpartyDir)) { mkdir $thirdpartyDir | Out-Null } - - & robocopy /mir $depsDir $thirdpartyDir "Unity*.dll" "Assembly-CSharp.dll" - if ($LASTEXITCODE -gt 4) - { - throw "Sync of RimWorld DLLs failed" - } + Copy-Item -Force "$depsDir\Unity*.dll" "$thirdpartyDir\" + Copy-Item -Force "$depsDir\Assembly-CSharp.dll" "$thirdpartyDir\" } function doPreBuild @@ -135,14 +135,19 @@ function doPostBuild $targetDir = "$(getProjectDir)\bin\Release" $targetPath = "$targetDir\$targetName.dll" - $gameVersion = - - $distAssemblyDir = "$distTargetDir\v$(getGameVersion)\Assemblies" + $distAssemblyDir = "$distTargetDir\$(getGameVersion)\Assemblies" mkdir $distAssemblyDir | Out-Null Copy-Item -Recurse -Force "$PSScriptRoot\mod-structure\*" $distTargetDir Copy-Item -Force $targetPath $distAssemblyDir + $modStructureAssemblyLocation = "$PSScriptRoot\mod-structure\$(getGameVersion)\Assemblies" + if (!(Test-Path $modStructureAssemblyLocation)) + { + mkdir $modStructureAssemblyLocation | Out-Null + } + Copy-Item -Force $targetPath $modStructureAssemblyLocation + Write-Host "Creating distro package" $content = Get-Content -Raw $assemblyInfoFile if (!($content -match '"(\d+\.\d+\.\d+\.\d+)"')) diff --git a/mod-structure/.gitignore b/mod-structure/.gitignore new file mode 100644 index 0000000..984791f --- /dev/null +++ b/mod-structure/.gitignore @@ -0,0 +1 @@ +!*.dll diff --git a/mod-structure/v1.1/Assemblies/AvoidFriendlyFire.dll b/mod-structure/1.1/Assemblies/AvoidFriendlyFire.dll similarity index 100% rename from mod-structure/v1.1/Assemblies/AvoidFriendlyFire.dll rename to mod-structure/1.1/Assemblies/AvoidFriendlyFire.dll diff --git a/mod-structure/1.2/Assemblies/AvoidFriendlyFire.dll b/mod-structure/1.2/Assemblies/AvoidFriendlyFire.dll new file mode 100644 index 0000000..d680724 Binary files /dev/null and b/mod-structure/1.2/Assemblies/AvoidFriendlyFire.dll differ diff --git a/mod-structure/1.3/Assemblies/AvoidFriendlyFire.dll b/mod-structure/1.3/Assemblies/AvoidFriendlyFire.dll new file mode 100644 index 0000000..46bbe40 Binary files /dev/null and b/mod-structure/1.3/Assemblies/AvoidFriendlyFire.dll differ diff --git a/mod-structure/About/About.xml b/mod-structure/About/About.xml index 3308b42..36cc6c0 100644 --- a/mod-structure/About/About.xml +++ b/mod-structure/About/About.xml @@ -9,6 +9,7 @@
  • 1.0
  • 1.1
  • 1.2
  • +
  • 1.3
  • diff --git a/mod-structure/LoadFolders.xml b/mod-structure/LoadFolders.xml deleted file mode 100644 index c7322f2..0000000 --- a/mod-structure/LoadFolders.xml +++ /dev/null @@ -1,6 +0,0 @@ - - -
  • /
  • -
  • v1.1
  • -
    -
    \ No newline at end of file diff --git a/src/AvoidFriendlyFire/AvoidFriendlyFire.csproj b/src/AvoidFriendlyFire/AvoidFriendlyFire.csproj index ced6f06..9317c0d 100644 --- a/src/AvoidFriendlyFire/AvoidFriendlyFire.csproj +++ b/src/AvoidFriendlyFire/AvoidFriendlyFire.csproj @@ -23,15 +23,15 @@ false - - ..\packages\Lib.Harmony.2.0.2\lib\net472\0Harmony.dll + + ..\packages\Lib.Harmony.2.1.1\lib\net472\0Harmony.dll False ..\..\ThirdParty\Assembly-CSharp.dll - ..\packages\UnlimitedHugs.Rimworld.HugsLib.8.0.0\lib\net472\HugsLib.dll + ..\packages\UnlimitedHugs.Rimworld.HugsLib.9.0.0\lib\net472\HugsLib.dll diff --git a/src/AvoidFriendlyFire/FireProperties.cs b/src/AvoidFriendlyFire/FireProperties.cs index 1aa3126..f76bfda 100644 --- a/src/AvoidFriendlyFire/FireProperties.cs +++ b/src/AvoidFriendlyFire/FireProperties.cs @@ -24,7 +24,7 @@ public class FireProperties public IntVec3 Origin; - public float ForcedMissRadius => _weaponVerb.verbProps.forcedMissRadius; + public float ForcedMissRadius => _weaponVerb.verbProps.ForcedMissRadius; public int OriginIndex => CasterMap.cellIndices.CellToIndex(Origin); diff --git a/src/AvoidFriendlyFire/Properties/AssemblyInfo.cs b/src/AvoidFriendlyFire/Properties/AssemblyInfo.cs index e1401d7..0746758 100644 --- a/src/AvoidFriendlyFire/Properties/AssemblyInfo.cs +++ b/src/AvoidFriendlyFire/Properties/AssemblyInfo.cs @@ -31,8 +31,8 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.10.0")] -[assembly: AssemblyFileVersion("1.2.10.0")] +[assembly: AssemblyVersion("1.3.11.0")] +[assembly: AssemblyFileVersion("1.3.11.0")] diff --git a/src/AvoidFriendlyFire/packages.config b/src/AvoidFriendlyFire/packages.config index 7be0c0c..f6700a4 100644 --- a/src/AvoidFriendlyFire/packages.config +++ b/src/AvoidFriendlyFire/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file