Example #1
0
 // get heat dissipation rate of the engine by inventory and rating
 public static void Postfix(Mech __instance, ref float __result)
 {
     try
     {
         __result += EngineHeat.GetEngineHeatDissipation(__instance.MechDef);
     }
     catch (Exception e)
     {
         Control.mod.Logger.LogError(e);
     }
 }
Example #2
0
        public static float OverrideDissipationCapacity(this HeatSinkDef @this)
        {
            try
            {
                if (def != null && @this.Is <EngineCoreDef>())
                {
                    return(EngineHeat.GetEngineHeatDissipation(def.Inventory));
                }
            }
            catch (Exception e)
            {
                Control.mod.Logger.LogError(e);
            }

            return(@this.DissipationCapacity);
        }