public static void Postfix(AITeam __instance, ref InvocationMessage __result) { if (__result == null || _injectedThisCall) { _injectedThisCall = false; return; } // the ai has decided to do something, if we're pausing the AI, // we want to skip this invocation and inject it on the next think // after we hit the key shortcut var skipThisInvocation = AIPause.OnAIInvocation(__instance, __result); if (skipThisInvocation) { __result = null; } }
public static bool Prefix(AITeam __instance, ref InvocationMessage __result, ref float ___planningStartTime) { // if shouldPauseAI is on at all, we should never fail to get invocation because of time if (Main.Settings.ShouldPauseAI) { ___planningStartTime = __instance.Combat.BattleTechGame.Time; } var inject = AIPause.TryGetMessageInject(); if (inject == null) { return(true); } // abort the call and force the return to be the previously skipped // invocation message that we got in the postfix __result = inject; _injectedThisCall = true; return(false); }
public static bool Prefix(AITeam __instance) { return(!AIPause.OnAIThink(__instance)); }
internal static void OnCombatInit() { ReloadResources(); AIPause.DestroyUI(); }