Skip to content

Commit

Permalink
v1.3 supports RimWorld 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
pardeike committed Mar 13, 2024
1 parent bcbb00f commit 89254d1
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 71 deletions.
Binary file removed 0Harmony.dll
Binary file not shown.
Binary file added 1.5/Assemblies/CrossPromotion.dll
Binary file not shown.
Binary file added 1.5/Assemblies/VisualExceptions.dll
Binary file not shown.
Binary file added 1.5/Assemblies/com.rlabrecque.steamworks.net.dll
Binary file not shown.
55 changes: 29 additions & 26 deletions About/About.xml
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<ModMetaData>
<name>Visual Exceptions</name>
<author>Andreas Pardeike</author>
<supportedVersions>
<li>1.2</li>
<li>1.3</li>
<li>1.4</li>
</supportedVersions>
<modDependencies>
<li>
<packageId>brrainz.harmony</packageId>
<displayName>Harmony</displayName>
<steamWorkshopUrl>steam://url/CommunityFilePage/2009463077</steamWorkshopUrl>
<downloadUrl>https://github.com/pardeike/HarmonyRimWorld/releases/latest</downloadUrl>
</li>
</modDependencies>
<loadBefore>
<li>Ludeon.RimWorld</li>
</loadBefore>
<loadAfter>
<li>brrainz.harmony</li>
</loadAfter>
<packageId>brrainz.visualexceptions</packageId>
<url>https://github.com/pardeike/VisualExceptions</url>
<description>A tool to display exceptions in a graphical way with all involved mods visualized</description>
</ModMetaData>
<name>Visual Exceptions</name>
<author>Andreas Pardeike</author>
<supportedVersions>
<li>1.2</li>
<li>1.3</li>
<li>1.4</li>
<li>1.5</li>
</supportedVersions>
<modDependencies>
<li>
<packageId>brrainz.harmony</packageId>
<displayName>Harmony</displayName>
<steamWorkshopUrl>steam://url/CommunityFilePage/2009463077</steamWorkshopUrl>
<downloadUrl>https://github.com/pardeike/HarmonyRimWorld/releases/latest</downloadUrl>
</li>
</modDependencies>
<loadBefore>
<li>Ludeon.RimWorld</li>
</loadBefore>
<loadAfter>
<li>brrainz.harmony</li>
</loadAfter>
<packageId>brrainz.visualexceptions</packageId>
<modVersion>1.3.0.0</modVersion>
<steamAppId>2538411704</steamAppId>
<url>https://github.com/pardeike/VisualExceptions</url>
<description>A tool to display exceptions in a graphical way with all involved mods visualized</description>
</ModMetaData>
3 changes: 2 additions & 1 deletion About/Manifest.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
<identifier>net.pardeike.rimworld.mod.visualexceptions</identifier>
<version>1.2.1.0</version>
<version>1.3.0.0</version>
<targetVersions>
<li>1.2.0</li>
<li>1.3.0</li>
<li>1.4.0</li>
<li>1.5.0</li>
</targetVersions>
<dependencies>
</dependencies>
Expand Down
11 changes: 11 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project>

<PropertyGroup>
<ModName>Visual Exceptions</ModName>
<ModFileName>VisualExceptions</ModFileName>
<Repository>https://github.com/pardeike/VisualExceptions</Repository>
<ModVersion>1.3.0.0</ModVersion>
<ProjectGuid>{B0D46BB5-08FF-4E04-9EFD-3E32E38A9CC2}</ProjectGuid>
</PropertyGroup>

</Project>
4 changes: 4 additions & 0 deletions LoadFolders.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@
<li>/</li>
<li>1.4</li>
</v1.4>
<v1.5>
<li>/</li>
<li>1.5</li>
</v1.5>
</loadFolders>
2 changes: 1 addition & 1 deletion Source/Assets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static Texture2D LoadTexture(string name, bool makeReadonly = true)
var data = File.ReadAllBytes(fullPath);
if (data == null || data.Length == 0) return new Texture2D(1, 1);
var tex = new Texture2D(2, 2, TextureFormat.RGBA32, false, true);
if (tex.LoadImage(data) == false) return new Texture2D(1, 1);
tex.LoadRawTextureData(data);
tex.Compress(true);
tex.wrapMode = TextureWrapMode.Clamp;
tex.filterMode = FilterMode.Trilinear;
Expand Down
144 changes: 101 additions & 43 deletions Source/VisualExceptions.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<ProjectGuid>{B0D46BB5-08FF-4E04-9EFD-3E32E38A9CC2}</ProjectGuid>
<RootNamespace>VisualExceptions</RootNamespace>
<AssemblyName>VisualExceptions</AssemblyName>
<RootNamespace>$(ModFileName)</RootNamespace>
<AssemblyName>$(ModFileName)</AssemblyName>
<TargetFramework>net472</TargetFramework>
<LangVersion>8.0</LangVersion>
<LangVersion>latest</LangVersion>
<PlatformTarget>x64</PlatformTarget>
<OutputPath>..\1.4\Assemblies\</OutputPath>
<OutputPath>..\1.5\Assemblies\</OutputPath>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<Version>1.2.1.0</Version>
<Version>$(ModVersion)</Version>
<AssemblyVersion>$(ModVersion)</AssemblyVersion>
<FileVersion>$(ModVersion)</FileVersion>
<PackageVersion>$(ModVersion)</PackageVersion>
<InformationalVersion>$(ModVersion)</InformationalVersion>
<Company>Brrainz</Company>
<Authors>Andreas Pardeike</Authors>
<Copyright>Copyright Andreas Pardeike</Copyright>
<PackageProjectUrl>$(Repository)</PackageProjectUrl>
<RepositoryUrl>$(Repository)</RepositoryUrl>
<Product>$(ModName)</Product>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand All @@ -30,14 +38,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Brrainz.RimWorld.CrossPromotion" Version="1.0.0" />
<PackageReference Include="Krafs.Rimworld.Ref" Version="1.4.3641" GeneratePathProperty="true" />
<PackageReference Include="Lib.Harmony" Version="2.2.2">
<ExcludeAssets>runtime</ExcludeAssets>
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.0" />
<Content Include="..\Directory.Build.props">
<Link>%(Filename)%(Extension)</Link>
</Content>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Brrainz.RimWorld.CrossPromotion" Version="1.1.1" />
<PackageReference Include="Lib.Harmony" Version="2.3.1.1" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.4" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net472" Version="1.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -46,16 +55,47 @@
</ItemGroup>

<ItemGroup>
<Reference Include="0Harmony">
<HintPath>..\0Harmony.dll</HintPath>
<Private>true</Private>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\_publicized\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>..\..\_publicized\Assembly-CSharp-firstpass.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="com.rlabrecque.steamworks.net">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\com.rlabrecque.steamworks.net.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\..\_publicized\UnityEngine\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.AudioModule">
<HintPath>..\..\_publicized\UnityEngine\UnityEngine.AudioModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>..\..\_publicized\UnityEngine\UnityEngine.IMGUIModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.JSONSerializeModule">
<HintPath>..\..\_publicized\UnityEngine\UnityEngine.JSONSerializeModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.InputLegacyModule">
<HintPath>..\..\_publicized\UnityEngine\UnityEngine.InputLegacyModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule">
<HintPath>..\..\_publicized\UnityEngine\UnityEngine.TextRenderingModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>

<Target Name="MyCode" BeforeTargets="UpdateReferences">
<!--<Target Name="MyCode" BeforeTargets="UpdateReferences">
<PropertyGroup>
<AssemblyCSharp>$(PkgKrafs_Rimworld_Ref)\ref\net472\Assembly-CSharp.dll</AssemblyCSharp>
<PubliciseOutputPath>$(PkgKrafs_Rimworld_Ref)\ref\net472\</PubliciseOutputPath>
<AssemblyCSharp>C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</AssemblyCSharp>
<PubliciseOutputPath>C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Publicized\</PubliciseOutputPath>
<AssemblyCSharp_Publicised>$(PubliciseOutputPath)Assembly-CSharp_publicised.dll</AssemblyCSharp_Publicised>
</PropertyGroup>
<Message Importance="High" Text="Publicising Rimworld Assembly ..." />
Expand All @@ -69,33 +109,51 @@
<Private>false</Private>
</Reference>
</ItemGroup>
</Target>
</Target>-->

<Target Name="UpdateReferences" AfterTargets="ResolveLockFileReferences">
<!--<Target Name="UpdateReferences" AfterTargets="ResolveLockFileReferences">
<Message Importance="High" Text="Remove References ..." />
<ItemGroup>
<Reference Remove="$(PkgKrafs_Rimworld_Ref)\ref\net472\Assembly-CSharp.dll" />
<Reference Remove="C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll" />
</ItemGroup>
</Target>-->

<Target Name="PostBuildAction" AfterTargets="Build">
<XmlPoke XmlInputPath="$(MSBuildProjectDirectory)\..\About\About.xml" Query="//ModMetaData/modVersion" Value="$(ModVersion)" />
<XmlPoke XmlInputPath="$(MSBuildProjectDirectory)\..\About\Manifest.xml" Query="//Manifest/version" Value="$(ModVersion)" />
</Target>

<PropertyGroup>
<PostBuildEvent>
echo Postprocessing
where ModBuilder 2&gt; nul | find /i "ModBuilder.exe"
if not errorlevel 1 (
ModBuilder AssemblyVersion -file "$(MSBuildProjectDirectory)\$(OutputPath)$(AssemblyName).dll" -save "$(MSBuildProjectName)-version"
ModBuilder XMLPut -file "$(MSBuildProjectDirectory)\..\About\Manifest.xml" -xpath /Manifest/version -value "{{$(MSBuildProjectName)-version}}"
)
if defined INSTALL_MOD (
"%INSTALL_MOD%" "$(Configuration)" "$(MSBuildProjectDirectory)\..\" "$(MSBuildProjectName)" "About 1.2 1.3 1.4 Sounds Textures" "LoadFolders.xml"
)
</PostBuildEvent>
<Company>Brrainz</Company>
<Authors>Andreas Pardeike</Authors>
<Description></Description>
<PackageProjectUrl>https://github.com/pardeike/VisualExceptions</PackageProjectUrl>
<RepositoryUrl>https://github.com/pardeike/VisualExceptions</RepositoryUrl>
<Product>Visual Exceptions</Product>
</PropertyGroup>
<Target Name="CopyToRimworld" AfterTargets="PostBuildAction" Condition="'$(RIMWORLD_MOD_DIR)' != ''">
<Delete Files="..\1.5\Assemblies\0Harmony.dll" />
<RemoveDir Directories="$(RIMWORLD_MOD_DIR)\$(ModFileName)" />
<ItemGroup>
<Copy_11 Include="..\1.1\**" />
<Copy_12 Include="..\1.2\**" />
<Copy_13 Include="..\1.3\**" />
<Copy_14 Include="..\1.4\**" />
<Copy_15 Include="..\1.5\**" />
<CopyAbout Include="..\About\**" />
<CopySounds Include="..\Sounds\**" />
<CopyTextures Include="..\Textures\**" />
<CopyLicense Include="..\LICENSE" />
<CopyLoadFolders Include="..\LoadFolders.xml" />
<CopyReadme Include="..\README.md" />
</ItemGroup>
<Copy SourceFiles="@(Copy_11)" DestinationFolder="$(RIMWORLD_MOD_DIR)\$(ModFileName)\1.1\%(RecursiveDir)" />
<Copy SourceFiles="@(Copy_12)" DestinationFolder="$(RIMWORLD_MOD_DIR)\$(ModFileName)\1.2\%(RecursiveDir)" />
<Copy SourceFiles="@(Copy_13)" DestinationFolder="$(RIMWORLD_MOD_DIR)\$(ModFileName)\1.3\%(RecursiveDir)" />
<Copy SourceFiles="@(Copy_14)" DestinationFolder="$(RIMWORLD_MOD_DIR)\$(ModFileName)\1.4\%(RecursiveDir)" />
<Copy SourceFiles="@(Copy_15)" DestinationFolder="$(RIMWORLD_MOD_DIR)\$(ModFileName)\1.5\%(RecursiveDir)" />
<Copy SourceFiles="@(CopyAbout)" DestinationFolder="$(RIMWORLD_MOD_DIR)\$(ModFileName)\About\%(RecursiveDir)" />
<Copy SourceFiles="@(CopySounds)" DestinationFolder="$(RIMWORLD_MOD_DIR)\$(ModFileName)\Sounds\%(RecursiveDir)" />
<Copy SourceFiles="@(CopyTextures)" DestinationFolder="$(RIMWORLD_MOD_DIR)\$(ModFileName)\Textures\%(RecursiveDir)" />
<Copy SourceFiles="@(CopyLicense)" DestinationFolder="$(RIMWORLD_MOD_DIR)\$(ModFileName)" />
<Copy SourceFiles="@(CopyLoadFolders)" DestinationFolder="$(RIMWORLD_MOD_DIR)\$(ModFileName)" />
<Copy SourceFiles="@(CopyReadme)" DestinationFolder="$(RIMWORLD_MOD_DIR)\$(ModFileName)" />
</Target>

<Target Name="ZipMod" AfterTargets="CopyToRimworld" Condition="'$(RIMWORLD_MOD_DIR)' != ''">
<ZipDirectory SourceDirectory="$(RIMWORLD_MOD_DIR)\$(ModFileName)" DestinationFile="$(RIMWORLD_MOD_DIR)\$(ModFileName).zip" Overwrite="true" />
</Target>

</Project>
</Project>

0 comments on commit 89254d1

Please sign in to comment.