public static bool EverHasRecipes(this ThingDef thingDef) { return( (!thingDef.GetRecipesCurrent().NullOrEmpty()) || (!thingDef.GetRecipesUnlocked(ref nullDefs).NullOrEmpty()) ); }
public static bool EverHasRecipe(this ThingDef thingDef, RecipeDef recipeDef) { return( (thingDef.GetRecipesCurrent().Contains(recipeDef)) || (thingDef.GetRecipesUnlocked(ref nullDefs).Contains(recipeDef)) ); }
public static List <RecipeDef> GetRecipesAll(this ThingDef thingDef) { // Things it is locked on with research var recipeDefs = new List <RecipeDef>(); recipeDefs.AddRangeUnique(thingDef.GetRecipesCurrent()); recipeDefs.AddRangeUnique(thingDef.GetRecipesUnlocked(ref nullDefs)); return(recipeDefs); }
public static List <RecipeDef> GetRecipesAll(this ThingDef thingDef) { #if DEBUG CCL_Log.TraceMod( thingDef, Verbosity.Stack, "GetRecipesAll()" ); #endif // Things it is locked on with research var recipeDefs = new List <RecipeDef>(); recipeDefs.AddRangeUnique(thingDef.GetRecipesCurrent()); recipeDefs.AddRangeUnique(thingDef.GetRecipesUnlocked(ref nullDefs)); recipeDefs.AddRangeUnique(thingDef.GetRecipesLocked(ref nullDefs)); return(recipeDefs); }