Skip to content

Commit

Permalink
Merge pull request #12 from zhqu1148980644/patch-2
Browse files Browse the repository at this point in the history
Auto-activate ActivableEffect weapon when defend
  • Loading branch information
jecrell authored Mar 30, 2020
2 parents 2f16692 + 8b212e4 commit 9b06965
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ public static bool TryStartCastOnPrefix(ref bool __result, Verb __instance)
{
}

if (compActivatableEffect.CurrentState == CompActivatableEffect.State.Activated) return true;

if (compActivatableEffect.CurrentState == CompActivatableEffect.State.Activated)
return true;
else if (compActivatableEffect.TryActivate())
return true;
if (Find.TickManager.TicksGame % 250 == 0)
Messages.Message("DeactivatedWarning".Translate(pawn.Label),
MessageTypeDefOf.RejectInput);
Expand Down Expand Up @@ -300,4 +302,4 @@ public static void GetGizmosPrefix(Pawn __instance, ref IEnumerable<Gizmo> __res
}
}
}
}
}

0 comments on commit 9b06965

Please sign in to comment.