public static bool IsCrossAssemblyExcluded(this MechDef d)
        {
            if (!Settings.UseOnlyCCAssemblyOptions)
            {
                if (Settings.CrossAssemblyExcludedMechs.Contains(d.Description.Id))
                {
                    return(true);
                }
                if (d.Chassis.ChassisTags.Contains("chassis_ExcludeCrossAssembly"))
                {
                    return(true);
                }
            }
            if (d.IsVehicle())
            {
                VehicleChassisDef vd = d.Chassis.GetVehicleChassisDefFromFakeVehicle();
                if (vd == null)
                {
                    return(false);
                }
                IVAssemblyVariant vv = CCIntegration.GetCCVehicleAssemblyVariant(vd);
                if (vv == null)
                {
                    return(false);
                }
                return(vv.Exclude);
            }
            IAssemblyVariant v = CCIntegration.GetCCAssemblyVariant(d.Chassis);

            if (v != null)
            {
                return(v.Exclude);
            }
            return(false);
        }
Пример #2
0
 public static string GetVariant(this ChassisDef d)
 {
     if (d.IsVehicle())
     {
         VehicleChassisDef vd = d.GetVehicleChassisDefFromFakeVehicle();
         if (vd == null)
         {
             return(d.Description.Id);
         }
         IVAssemblyVariant iVAssemblyVariant = GetCCVehicleAssemblyVariant(vd);
         //FileLog.Log($"vehicle {d.Description.Id} -> {iVAssemblyVariant?.PrefabID ?? d.Description.Id} null:{iVAssemblyVariant==null}");
         return(iVAssemblyVariant?.PrefabID ?? d.Description.Id);
     }
     return(GetCCAssemblyVariant(d)?.PrefabID ?? d.Description.UIName);
 }