Skip to content

Commit

Permalink
git commit from PowerShell in C#JecsTools Added a try and catch to th…
Browse files Browse the repository at this point in the history
…e ProjectileExtension Harmony patch for CanHitCellFromCellIgnoringRange. This should allow for proper ability casting again.
  • Loading branch information
jecrell committed Oct 19, 2018
1 parent d98435d commit b44537e
Show file tree
Hide file tree
Showing 23 changed files with 66 additions and 50 deletions.
6 changes: 5 additions & 1 deletion About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<author>jecrell</author>
<url>https://discord.gg/AaVFA7V</url>
<targetVersion>1.0.2059</targetVersion>
<description>1.1.0.8 (10-18-2018)
<description>1.1.0.9 (10-19-2018)

Adds modding components to RimWorld: vehicles, spell casting, weapon slots, oversized weapons, and more!

Expand Down Expand Up @@ -63,6 +63,10 @@ Lumberjack, Shibby Says, TheJagermeister, Cory Bonifay, Kiya Nicoll, Matt Harris
========================
Changelog
========================
1.1.0.9 (10-19-2018)
========================
Added a try and catch to the ProjectileExtension Harmony patch for CanHitCellFromCellIgnoringRange. This should allow for proper ability casting again.

1.1.0.8 (10-18-2018)
========================
Changed very few issues to allow for the update for RimWorld 1.0.
Expand Down
4 changes: 4 additions & 0 deletions About/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.1.0.9 (10-19-2018)
========================
Added a try and catch to the ProjectileExtension Harmony patch for CanHitCellFromCellIgnoringRange. This should allow for proper ability casting again.

1.1.0.8 (10-18-2018)
========================
Changed very few issues to allow for the update for RimWorld 1.0.
Expand Down
66 changes: 33 additions & 33 deletions About/Manifest.xml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
<identifier>JecsTools</identifier>
<version>1.1.0.7</version>
<dependencies />
<incompatibleWith />
<loadBefore>
<li>DoorsExpanded</li>
<li>CoC-Factions</li>
<li>CoC-Cults</li>
<li>CoC-ElderThings</li>
<li>HPLovecraftStoryteller</li>
<li>IA-ObjectsAndFurniture</li>
<li>IA-SteamCorp</li>
<li>LotR-Dwarves</li>
<li>LotR-Elves</li>
<li>LotR-Hobbits</li>
<li>LotR-MenAndBeasts</li>
<li>LotR-OrcsAndGoblins</li>
<li>LotR-TheThirdAge</li>
<li>RoM-Arachnophobia</li>
<li>RoM-Vampires</li>
<li>RoM-Werewolves</li>
<li>RimQuest</li>
<li>RimWriter</li>
<li>SW-Factions</li>
<li>SW-Lightsabers</li>
<li>SW-TheForce</li>
</loadBefore>
<loadAfter>
<li>HugsLib</li>
</loadAfter>
<manifestUri>https://raw.githubusercontent.com/jecrell/JecsTools/master/About/Manifest.xml</manifestUri>
<downloadUri>https://github.com/jecrell/JecsTools/releases</downloadUri>
<identifier>JecsTools</identifier>
<version>1.1.0.9</version>
<dependencies />
<incompatibleWith />
<loadBefore>
<li>DoorsExpanded</li>
<li>CoC-Factions</li>
<li>CoC-Cults</li>
<li>CoC-ElderThings</li>
<li>HPLovecraftStoryteller</li>
<li>IA-ObjectsAndFurniture</li>
<li>IA-SteamCorp</li>
<li>LotR-Dwarves</li>
<li>LotR-Elves</li>
<li>LotR-Hobbits</li>
<li>LotR-MenAndBeasts</li>
<li>LotR-OrcsAndGoblins</li>
<li>LotR-TheThirdAge</li>
<li>RoM-Arachnophobia</li>
<li>RoM-Vampires</li>
<li>RoM-Werewolves</li>
<li>RimQuest</li>
<li>RimWriter</li>
<li>SW-Factions</li>
<li>SW-Lightsabers</li>
<li>SW-TheForce</li>
</loadBefore>
<loadAfter>
<li>HugsLib</li>
</loadAfter>
<manifestUri>https://raw.githubusercontent.com/jecrell/JecsTools/master/About/Manifest.xml</manifestUri>
<downloadUri>https://github.com/jecrell/JecsTools/releases</downloadUri>
</Manifest>
2 changes: 1 addition & 1 deletion About/Version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0.8
1.1.0.9
Binary file modified Assemblies/0JecsTools.dll
Binary file not shown.
Binary file modified Assemblies/AbilityUser.dll
Binary file not shown.
Binary file modified Assemblies/AbilityUserAI.dll
Binary file not shown.
Binary file modified Assemblies/CompActivatableEffect.dll
Binary file not shown.
Binary file modified Assemblies/CompAnimated.dll
Binary file not shown.
Binary file modified Assemblies/CompBalloon.dll
Binary file not shown.
Binary file modified Assemblies/CompDelayedSpawner.dll
Binary file not shown.
Binary file modified Assemblies/CompExtraSounds.dll
Binary file not shown.
Binary file modified Assemblies/CompInstalledPart.dll
Binary file not shown.
Binary file modified Assemblies/CompLumbering.dll
Binary file not shown.
Binary file modified Assemblies/CompOverlays.dll
Binary file not shown.
Binary file modified Assemblies/CompOversizedWeapon.dll
Binary file not shown.
Binary file modified Assemblies/CompSlotLoadable.dll
Binary file not shown.
Binary file modified Assemblies/CompToggleDef.dll
Binary file not shown.
Binary file modified Assemblies/PawnShields.dll
Binary file not shown.
Binary file modified Source/.vs/JecsTools/v15/.suo
Binary file not shown.
Binary file modified Source/.vs/JecsTools/v15/Server/sqlite3/storage.ide-shm
Binary file not shown.
20 changes: 14 additions & 6 deletions Source/AllModdingComponents/JecsTools/HarmonyPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,23 @@ static HarmonyPatches()
//Allows a bullet to pass through walls when fired.
public static bool CanHitCellFromCellIgnoringRange_Prefix(Verb __instance, IntVec3 sourceSq, IntVec3 targetLoc, bool includeCorners, ref bool __result)
{
if (__instance?.EquipmentCompSource?.PrimaryVerb?.verbProps?.defaultProjectile is ThingDef proj &&
proj?.HasModExtension<ProjectileExtension>() == true &&
proj.GetModExtension<ProjectileExtension>() is ProjectileExtension ext)
try
{
if (ext.passesWalls)
__result = true;
return false;

if (__instance?.EquipmentCompSource?.PrimaryVerb?.verbProps?.defaultProjectile is ThingDef proj &&
proj?.HasModExtension<ProjectileExtension>() == true &&
proj?.GetModExtension<ProjectileExtension>() is ProjectileExtension ext)
{
if (ext.passesWalls)
__result = true;
return false;
}

}
catch (Exception e)
{

}
return true;
}

Expand Down
18 changes: 9 additions & 9 deletions updateinfo
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
==============================

JecsTools Update
v1.1.0.8 (10-18-2018)
====================
Version: 1.1.0.7
Updated: 10-02-2018
Description: The wall placeworker now also allows other types of walls.
====================

Changed very few issues to allow for the update for RimWorld 1.0.
--------------------

Download now on...
- Patreon: https://www.patreon.com/posts/jecstools-for-0-21059900
- Patreon: https://www.patreon.com/posts/22139730
- GitHub: https://github.com/jecrell/JecsTools
- Steam: https://steamcommunity.com/sharedfiles/filedetails/?id=932008009
Discuss the mod on...
Expand All @@ -25,12 +25,12 @@ Discuss the mod on...
[img width=260]https://raw.githubusercontent.com/jecrell/JecsTools/master/About/Preview.png[/img]
[hr]
[b]JecsTools
Version: 1.1.0.7
Updated: 10-02-2018
Description: [color=orange]The wall placeworker now also allows other types of walls.[/color]
Version: 1.1.0.8
Updated: 10-18-2018
Description: [color=orange]Changed very few issues to allow for the update for RimWorld 1.0.[/color]
[hr]
[b]Download now on...[/b]
[url=https://www.patreon.com/posts/jecstools-for-0-21059900]Patreon[/url]
[url=https://www.patreon.com/posts/22139730]Patreon[/url]
[url=https://github.com/jecrell/JecsTools]GitHub[/url]
[url=https://steamcommunity.com/sharedfiles/filedetails/?id=932008009]Steam[/url]
[b]Discuss the mod on...[/b]
Expand Down

0 comments on commit b44537e

Please sign in to comment.