Beispiel #1
0
 private static void AfterNav_Restore(VehicleFactionController __instance, float?__state)
 {
     if (__state != null)
     {
         __instance.ControllerDef.FactionInWarWeightMultiplier = __state.Value;
     }
 }
Beispiel #2
0
 private static void BeforeNav_Drop_Attack(VehicleFactionController __instance, ref float?__state)
 {
     try {
         if (ShouldStopFight(__instance.Vehicle?.GeoLevel, __instance.Vehicle?.Owner))
         {
             Verbo("Discouraging {0} from faction war.", __instance.Vehicle.Name);
             __state = __instance.ControllerDef.FactionInWarWeightMultiplier;
             __instance.ControllerDef.FactionInWarWeightMultiplier = -2f;
         }
         else
         {
             __state = null;
         }
     } catch (Exception ex) { Error(ex); }
 }