Exemplo n.º 1
0
        public static void Postfix(TooltipPrefab_Equipment __instance, object data)
        {
            try
            {
                if (data == null)
                {
                    return;
                }

                var panel = panelReference.Target as MechLabPanel;
                if (panel == null)
                {
                    return;
                }

                var mechComponentDef = (MechComponentDef)data;
                EngineTooltip.AdjustTooltip(__instance, panel, mechComponentDef);
                EndoSteel.AdjustTooltip(__instance, panel, mechComponentDef);
                FerrosFibrous.AdjustTooltip(__instance, panel, mechComponentDef);
            }
            catch (Exception e)
            {
                Control.mod.Logger.LogError(e);
            }
        }
Exemplo n.º 2
0
        internal static float AdditionalTonnage(MechDef mechDef)
        {
            float tonnage = 0;

            tonnage += Engine.AdditionalHeatSinkTonnage(mechDef);
            tonnage -= EndoSteel.WeightSavings(mechDef);
            tonnage -= FerrosFibrous.WeightSavings(mechDef);
            return(tonnage);
        }
Exemplo n.º 3
0
 // invalidate mech loadouts that have more than 0 endo-steel critical slots but not exactly 14
 // invalidate mech loadouts that have more than 0 ff critical slots but not exactly 14
 public static void Postfix(MechDef mechDef, ref Dictionary <MechValidationType, List <string> > errorMessages)
 {
     try
     {
         EndoSteel.ValidationRulesCheck(mechDef, ref errorMessages);
         FerrosFibrous.ValidationRulesCheck(mechDef, ref errorMessages);
         EngineHeat.ValidationRulesCheck(mechDef, ref errorMessages);
         Engine.ValidationRulesCheck(mechDef, ref errorMessages);
         Gyro.ValidationRulesCheck(mechDef, ref errorMessages);
         Cockpit.ValidationRulesCheck(mechDef, ref errorMessages);
     }
     catch (Exception e)
     {
         Control.mod.Logger.LogError(e);
     }
 }