Skip to content

Commit

Permalink
Auto-activate ActivableEffect weapon when defend
Browse files Browse the repository at this point in the history
  • Loading branch information
zhqu1148980644 authored Mar 29, 2020
1 parent 2f16692 commit 8b212e4
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 8b212e4

Please sign in to comment.