public static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "IndirectFireCapable").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(DoAnyMovesYieldLOFToAnyHostileNode_Tick), nameof(IndirectFireCapable)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
public static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "IndirectFireCapable").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(HighestPriorityMoveCandidateIsAttackNode_Tick), nameof(IndirectFireCapable)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "IndirectFireCapable").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(ToHit_GetAllModifiersDescription), nameof(IndirectFireCapable)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
private static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var markerMethod = AccessTools.Property(typeof(Rand), nameof(Rand.Value)).GetGetMethod(); var sneakyMethod = AccessTools.Method(typeof(Patch_MakeNewToils), nameof(Patch_MakeNewToils.PatchedRandValue)); return(Transpilers.MethodReplacer(instructions, markerMethod, sneakyMethod)); }
public static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var page_CreateWorldParams_ctor = AccessTools.Constructor(typeof(Page_CreateWorldParams)); var planets_CreateWorldParams_ctor = AccessTools.Constructor(typeof(Planets_CreateWorldParams)); return(Transpilers.MethodReplacer(instructions, from: page_CreateWorldParams_ctor, to: planets_CreateWorldParams_ctor)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "AmmoCategory").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(PoorlyMaintainedEffect_ApplyEffectsToVehicle), nameof(AmmoCategory)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "IndirectFireCapable").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(LOFCache_UnitHasLOFToTarget), nameof(IndirectFireCapable)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
private static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { MethodInfo from = AccessTools.Method(typeof(ThreeDaysOfNight), "IsActive"); MethodInfo to = AccessTools.Method(typeof(Patches), "IsActive"); return(Transpilers.MethodReplacer(instructions, from, to)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "IndirectFireCapable").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(AbstractActor_GetLongestRangeWeapon), nameof(IndirectFireCapable)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
//public void DoPlaySettingsGlobalControls(WidgetRow row, bool worldView) public static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { MethodInfo ToggleableIconInfo = AccessTools.Method(typeof(WidgetRow), nameof(WidgetRow.ToggleableIcon)); MethodInfo ToggleableIconReplacement = AccessTools.Method(typeof(RemoveUnusedToggles), nameof(ToggleableIconFiltered)); return(Transpilers.MethodReplacer(instructions, ToggleableIconInfo, ToggleableIconReplacement)); }
public static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var from = AccessTools.PropertyGetter(typeof(SteamManager), nameof(SteamManager.Initialized)); var to = SymbolExtensions.GetMethodInfo(() => TrueReturner()); return(Transpilers.MethodReplacer(instructions, from, to)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "IndirectFireCapable").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(AIRoleAssignment_EvaluateSniper), nameof(IndirectFireCapable)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "IndirectFireCapable").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(PreferNotLethalPositionFactor_expectedDamageForShooting), nameof(IndirectFireCapable)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "IndirectFireCapable").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(CombatHUDWeaponTickMarks_GetValidSlots), nameof(IndirectFireCapable)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "IndirectFireCapable").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(PreferFiringSolutionWhenExposedAllyPositionalFactor_EvaluateInfluenceMapFactorAtPosition), nameof(IndirectFireCapable)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "IndirectFireCapable").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(PreferExposedAlonePositionalFactor_InitEvaluationForPhaseForUnit), nameof(IndirectFireCapable)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "IndirectFireCapable").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(MultiAttack_ValidateMultiAttackOrder), nameof(IndirectFireCapable)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "AmmoCategory").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(Weapon_HasAmmo), nameof(AmmoCategory)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
private static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var markerMethod = AccessTools.Method(typeof(Messages), nameof(Messages.Message), new Type[] { typeof(string), typeof(LookTargets), typeof(MessageTypeDef), typeof(bool) }); var sneakyMethod = AccessTools.Method(typeof(Patch_FailConstruction), nameof(Patch_FailConstruction.ConditionalMessage)); return(Transpilers.MethodReplacer(instructions, markerMethod, sneakyMethod)); }
public static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { MethodInfo DestroyInfo = AccessTools.Method(typeof(Thing), nameof(Thing.Destroy)); MethodInfo DestroyReplaceInfo = AccessTools.Method(typeof(RebuildTransportPod), nameof(DestroyReplace)); return(Transpilers.MethodReplacer(instructions, DestroyInfo, DestroyReplaceInfo)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var from = AccessTools.Constructor(typeof(DamageFlasher), new Type[] { typeof(Pawn) }); var to = AccessTools.Constructor(typeof(ZombieDamageFlasher), new Type[] { typeof(Pawn) }); return(Transpilers.MethodReplacer(instructions, from, to)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "Category").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(AIUtil_ExpectedDamageForMeleeAttackUsingUnitsBVs), nameof(Category)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "Category").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(AttackEvaluator_MakeAttackOrderForTarget_AP), nameof(Category)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "Category").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(MoveTowardsHighestPriorityMoveCandidateNode_Tick), nameof(Category)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "Category").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(CombatTestFire_MeleeAttackSequence), nameof(Category)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "Category").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(MechRepresentation_PlayImpactAnim), nameof(Category)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "Category").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(SelectionStateMove_ProjectedHeatForState), nameof(Category)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "ShotsWhenFired").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(ClusteredShotRandomCacheEnabler), nameof(ShotsWhenFiredRandomizerOverider)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { var targetPropertyGetter = AccessTools.Property(typeof(Weapon), "ShotsWhenFired").GetGetMethod(); var replacementMethod = AccessTools.Method(typeof(CombatHUDWeaponSlot_RefreshDisplayedWeapon1), nameof(ShotsWhenFiredDisplayOverider)); return(Transpilers.MethodReplacer(instructions, targetPropertyGetter, replacementMethod)); }
//GenClosest::ClosestThingReachable //protected Job ResourceDeliverJobFor(Pawn pawn, IConstructible c, bool canRemoveExistingFloorUnderNearbyNeeders = true) public static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions) { instructions = Transpilers.MethodReplacer(instructions, AccessTools.Method(typeof(GenClosest), nameof(GenClosest.ClosestThingReachable)), AccessTools.Method(typeof(UseInventory), nameof(OrUseInventory))); return(Transpilers.MethodReplacer(instructions, AccessTools.Method(typeof(ItemAvailability), nameof(ItemAvailability.ThingsAvailableAnywhere)), AccessTools.Method(typeof(UseInventory), nameof(OrInInventory)))); }