// RimWorld.Targeter public void BeginTargetingWithVerb(Verb_UseAbility verbToAdd, TargetingParameters targetParams, Action <LocalTargetInfo> action, Pawn caster = null, Action actionWhenFinished = null, Texture2D mouseAttachment = null) { verbToAdd.timeSavingActionVariable = this.action; Find.Targeter.targetingVerb = verbToAdd; Find.Targeter.targetingVerbAdditionalPawns = null; AccessTools.Field(typeof(Targeter), "action").SetValue(Find.Targeter, action); AccessTools.Field(typeof(Targeter), "targetParams").SetValue(Find.Targeter, targetParams); AccessTools.Field(typeof(Targeter), "caster").SetValue(Find.Targeter, caster); AccessTools.Field(typeof(Targeter), "actionWhenFinished").SetValue(Find.Targeter, actionWhenFinished); AccessTools.Field(typeof(Targeter), "mouseAttachment").SetValue(Find.Targeter, mouseAttachment); }
public virtual bool CanCastPowerCheck(Verb_UseAbility verbAbility, out string reason) { reason = ""; return(true); }