Skip to content

Commit

Permalink
Update to 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Falconne committed Aug 8, 2021
1 parent 82acc84 commit e504bd8
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 23 deletions.
23 changes: 14 additions & 9 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ function updateToGameVersion
function copyDependencies
{
$thirdpartyDir = "$PSScriptRoot\ThirdParty"
if (Test-Path "$thirdpartyDir\*.dll")
{
return
}

if (!$installDir)
{
Expand All @@ -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
Expand All @@ -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+)"'))
Expand Down
1 change: 1 addition & 0 deletions mod-structure/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!*.dll
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions mod-structure/About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<li>1.0</li>
<li>1.1</li>
<li>1.2</li>
<li>1.3</li>
</supportedVersions>

<modDependencies>
Expand Down
6 changes: 0 additions & 6 deletions mod-structure/LoadFolders.xml

This file was deleted.

6 changes: 3 additions & 3 deletions src/AvoidFriendlyFire/AvoidFriendlyFire.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony, Version=2.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Lib.Harmony.2.0.2\lib\net472\0Harmony.dll</HintPath>
<Reference Include="0Harmony, Version=2.1.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Lib.Harmony.2.1.1\lib\net472\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp, Version=0.19.6814.14609, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\ThirdParty\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="HugsLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UnlimitedHugs.Rimworld.HugsLib.8.0.0\lib\net472\HugsLib.dll</HintPath>
<HintPath>..\packages\UnlimitedHugs.Rimworld.HugsLib.9.0.0\lib\net472\HugsLib.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
2 changes: 1 addition & 1 deletion src/AvoidFriendlyFire/FireProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/AvoidFriendlyFire/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]



4 changes: 2 additions & 2 deletions src/AvoidFriendlyFire/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Lib.Harmony" version="2.0.2" targetFramework="net472" />
<package id="UnlimitedHugs.Rimworld.HugsLib" version="8.0.0" targetFramework="net472" />
<package id="Lib.Harmony" version="2.1.1" targetFramework="net472" />
<package id="UnlimitedHugs.Rimworld.HugsLib" version="9.0.0" targetFramework="net472" />
</packages>

0 comments on commit e504bd8

Please sign in to comment.