コード例 #1
0
 private static void BeforeMove_GetPause(UIStateVehicleSelected __instance, ref bool __state)
 {
     try {
         __state = getContext(__instance).Level.Timing.Paused;
         //Verbo( "New travel site. Paused = {0}", __state );
     } catch (Exception ex) { Error(ex); }
 }
コード例 #2
0
 private static void AfterContextMove_RestorePause(UIStateVehicleSelected __instance, GeoAbility ability, ref bool __state)
 {
     try {
         if (!(ability is MoveVehicleAbility))
         {
             return;
         }
         AfterAddTravelSite_RestorePause(__instance, ref __state);
     } catch (Exception ex) { Error(ex); }
 }
コード例 #3
0
 private static void AfterAddTravelSite_RestorePause(UIStateVehicleSelected __instance, ref bool __state)
 {
     try {
         var craft_count = GameUtl.CurrentLevel().GetComponent <GeoLevelController>().ViewerFaction.Vehicles.Count();
         //Verbo( "Craft count = {0}", craft_count );
         if ((craft_count <= 1 && Mod.Config.Auto_Unpause_Single) || (craft_count > 1 && Mod.Config.Auto_Unpause_Multiple))
         {
             return;
         }
         Verbo("New vehicle travel plan. Setting time to {0}.", __state ? "Paused" : "Running");
         getContext(__instance).Level.Timing.Paused = __state;
     } catch (Exception ex) { Error(ex); }
 }
コード例 #4
0
 private static GeoscapeViewContext getContext(UIStateVehicleSelected __instance) => (GeoscapeViewContext)ContextGetter.GetValue(__instance);