Skip to content

Commit

Permalink
RW 1.3
Browse files Browse the repository at this point in the history
- Removed meaningless Harmony dependency
- Removed some old debug stuff
  • Loading branch information
DingoDjango committed Aug 2, 2022
1 parent e2a150d commit 789b6ed
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 75 deletions.
Binary file removed 1.0/Assemblies/0Harmony.dll
Binary file not shown.
Binary file removed 1.0/Assemblies/Grenade Fix Rearmed.dll
Binary file not shown.
Binary file removed 1.1/Assemblies/Grenade Fix Rearmed.dll
Binary file not shown.
37 changes: 0 additions & 37 deletions About/About.xml

This file was deleted.

Binary file removed Current/Assemblies/Grenade Fix Rearmed.dll
Binary file not shown.
29 changes: 8 additions & 21 deletions Grenade Fix Rearmed.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>embedded</DebugType>
<Optimize>false</Optimize>
<OutputPath>Current\Assemblies\</OutputPath>
<OutputPath>Grenade Fix Rearmed\Current\Assemblies\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -41,7 +41,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>Current\Assemblies\</OutputPath>
<OutputPath>Grenade Fix Rearmed\Current\Assemblies\</OutputPath>
<DefineConstants>
</DefineConstants>
<ErrorReport>prompt</ErrorReport>
Expand All @@ -52,10 +52,6 @@
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\Harmony\Current\Assemblies\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
Expand All @@ -80,12 +76,12 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="About\About.xml" />
<Content Include="About\Manifest.xml" />
<Content Include="About\ModSync.xml" />
<Content Include="Grenade Fix Rearmed\About\About.xml" />
<Content Include="Grenade Fix Rearmed\About\Manifest.xml" />
<Content Include="Grenade Fix Rearmed\About\ModSync.xml" />
</ItemGroup>
<ItemGroup>
<Content Include="LoadFolders.xml" />
<Content Include="Grenade Fix Rearmed\LoadFolders.xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
Expand All @@ -106,20 +102,11 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>SET MODDIR=C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\$(ProjectName)
SET ZIPFILE=D:\Downloads\$(ProjectName).zip
SET ZIPFILE=$(USERPROFILE)\Downloads\$(ProjectName).zip

mkdir "%25MODDIR%25"

xcopy "$(ProjectDir)1.0" "%25MODDIR%25\1.0" /i /e /r /y
xcopy "$(ProjectDir)1.1" "%25MODDIR%25\1.1" /i /e /r /y

xcopy "$(ProjectDir)About" "%25MODDIR%25\About" /i /e /r /y

xcopy "$(ProjectDir)Current" "%25MODDIR%25\Current" /i /e /r /y

xcopy "$(ProjectDir)LoadFolders.xml" "%25MODDIR%25" /r /y


xcopy "$(ProjectDir)$(ProjectName)\*" "%25MODDIR%25" /i /e /r /y

7z a -mx9 "%25ZIPFILE%25" "%25MODDIR%25"

Expand Down
20 changes: 20 additions & 0 deletions Grenade Fix Rearmed/About/About.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<ModMetaData>
<name>Grenade Fix - Rearmed</name>
<author>Dingo</author>
<packageId>Dingo.GrenadeFixRearmed</packageId>
<description>This mod dynamically injects a minimum range to any weapon with an explosive projectile.

Affects grenades, launchers, etc. including weapons added by mods.*

The minimum range is slightly larger than the weapon's explosion radius, ensuring that pawns won't explode themselves by accident.

*If the weapon already has a safe minimum range (e.g. mortars) it will not be affected.</description>
<url>https://ludeon.com/forums/index.php?topic=26077</url>
<supportedVersions>
<li>1.0</li>
<li>1.1</li>
<li>1.2</li>
<li>1.3</li>
</supportedVersions>
</ModMetaData>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
<identifier>GrenadeFixRearmed</identifier>
<version>1.2.7528.1</version>
<version>1.3.8194.1</version>
<manifestUri>https://raw.githubusercontent.com/DingoDjango/GrenadeFixRearmed/master/About/Manifest.xml</manifestUri>
<downloadUri>https://github.com/DingoDjango/GrenadeFixRearmed/releases/latest</downloadUri>
</Manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ModSyncNinjaData>
<ID>da171c68-9c33-4948-b0db-df88fb5030d4</ID>
<ModName>Grenade Fix: Rearmed</ModName>
<Version>1.2.7528.1</Version>
<Version>1.3.8194.1</Version>
<SaveBreaking>False</SaveBreaking>
<Host name="Github">
<Owner>DingoDjango</Owner>
Expand Down
File renamed without changes
File renamed without changes.
5 changes: 4 additions & 1 deletion LoadFolders.xml → Grenade Fix Rearmed/LoadFolders.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<li>1.1</li>
</v1.1>
<v1.2>
<li>Current</li>
<li>1.2</li>
</v1.2>
<v1.3>
<li>Current</li>
</v1.3>
</loadFolders>
12 changes: 0 additions & 12 deletions Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,10 @@ static Main()

foreach (ThingDef thing in explosives)
{
#if DEBUG
Log.Message($"GrenadeFixRearmed :: Working on '{thing.label}' (defName = '{thing.defName}')");
#endif

foreach (VerbProperties verb in thing.Verbs)
{
if (verb.CausesExplosion)
{
#if DEBUG
Log.Message($"GrenadeFixRearmed :: Injecting for '{verb.label}' with minRange {verb.minRange}");
#endif

verb.minRange = Mathf.Max(verb.minRange, verb.defaultProjectile.projectile.explosionRadius + 0.5f);

#if DEBUG
Expand All @@ -42,10 +34,6 @@ static Main()
}
}
}

#if DEBUG
Log.Message("GrenadeFixRearmed :: Finished injecting minimum safe ranges.");
#endif
}
}
}
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.2.7528.1")]
[assembly: AssemblyFileVersion("1.2.7528.1")]
[assembly: AssemblyVersion("1.3.8194.1")]
[assembly: AssemblyFileVersion("1.3.8194.1")]

0 comments on commit 789b6ed

Please sign in to comment.