Exemple #1
0
 public static DefModExtension_PawnColumnDefs Ext(this PawnColumnDef def)
 {
     if (!def.HasModExtension <DefModExtension_PawnColumnDefs>())
     {
         Log.Error("Numbers expected DefModExtension PawnColumnDefs, got null");
         return(null);
     }
     return(def.GetModExtension <DefModExtension_PawnColumnDefs>());
 }
Exemple #2
0
        public static DefModExtension_PawnColumnDefs Ext(this PawnColumnDef def, bool logError = true)
        {
            var ext = def.GetModExtension <DefModExtension_PawnColumnDefs>();

            if (logError && ext == null)
            {
                Log.Error($"Numbers expected DefModExtension PawnColumnDefs, got null for def {def.defName}");
            }

            return(ext);
        }