Skip to content

Commit

Permalink
changed run and gun comp access
Browse files Browse the repository at this point in the history
  • Loading branch information
rheirman committed May 2, 2020
1 parent c730067 commit 1961ce6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file modified 1.1/Assemblies/DualWield.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions 1.1/Source/DualWield/Harmony/Pawn_StanceTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ private static bool RunAndGunEnabled(Pawn pawn)
bool runAndGunEnabled = false;
if (pawn.AllComps.FirstOrDefault((ThingComp tc) => tc.GetType().Name == "CompRunAndGun") is ThingComp comp)
{
if (comp.CompInspectStringExtra() != "")//Try to get value of isEnabled by abusing compInspectString. Only works with newer versions of RunAndGun.
if (comp.GetDescriptionPart() != "")//Try to get value of isEnabled by abusing compInspectString. Only works with newer versions of RunAndGun.
{
runAndGunEnabled = Convert.ToBoolean(comp.CompInspectStringExtra());
runAndGunEnabled = Convert.ToBoolean(comp.GetDescriptionPart());
}
else //Otherwise use reflections, which is much more expensive in terms of execution time.
{
Expand Down

0 comments on commit 1961ce6

Please sign in to comment.