Skip to content

Commit

Permalink
made runAndGun compatible with A18
Browse files Browse the repository at this point in the history
  • Loading branch information
rheirman committed Oct 25, 2017
1 parent 371234a commit 42586f6
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ModMetaData>
<name>RunAndGun</name>
<author>Roolo</author>
<targetVersion>0.17.0</targetVersion>
<targetVersion>0.18.0</targetVersion>
<description> Your colonists can never be a true Rambo if they cannot gun while they are running. Therefore, this mod adds a mode that, when enabled, allows drafted colonists to shoot
while moving at the cost of an accuracy and movement penalty.These penalties can be modified in the mod settings of this mod.
Some things to take into account:
Expand Down
Binary file modified Assemblies/RunAndGun.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions Source/RunAndGun/Harmony/JobDriver_SetupToils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ static void checkForAutoAttack(JobDriver_Goto __instance)
if (verb != null && !verb.verbProps.MeleeRange)
{
TargetScanFlags targetScanFlags = TargetScanFlags.NeedLOSToPawns | TargetScanFlags.NeedLOSToNonPawns | TargetScanFlags.NeedThreat;
if (verb.verbProps.ai_IsIncendiary)
if (verb.IsIncendiary())
{
targetScanFlags |= TargetScanFlags.NeedNonBurning;
}
Thing thing = (Thing)AttackTargetFinder.BestShootTargetFromCurrentPosition(__instance.pawn, null, verb.verbProps.range, verb.verbProps.minRange, targetScanFlags);
if (thing != null)
{
__instance.pawn.equipment.TryStartAttack(thing);
__instance.pawn.TryStartAttack(thing);
return;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/RunAndGun/Harmony/Verb_TryCastNextBurstShot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static bool Prefix(Verb __instance)
else
{
__instance.state = VerbState.Idle;
__instance.CasterPawn.stances.SetStance(new Stance_RunAndGun_Cooldown(__instance.verbProps.AdjustedCooldownTicks(__instance.ownerEquipment), currentTarget, __instance));
__instance.CasterPawn.stances.SetStance(new Stance_RunAndGun_Cooldown(__instance.verbProps.AdjustedCooldownTicks(__instance, __instance.CasterPawn, __instance.ownerEquipment), currentTarget, __instance));
if (__instance.castCompleteCallback != null)
{
__instance.castCompleteCallback();
Expand Down
Binary file modified Source/RunAndGun/obj/Debug/RunAndGun.dll
Binary file not shown.

0 comments on commit 42586f6

Please sign in to comment.