private static void PodContentsPossibleDefs() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendLine("ThingDefs that can go in the resource pod crash incident."); foreach (ThingDef current in ThingSetMaker_ResourcePod.PossiblePodContentsDefs()) { stringBuilder.AppendLine(current.defName); } Log.Message(stringBuilder.ToString(), false); }
private static ThingDef RandomPodContentsDef() { int numMeats = (from x in ThingSetMaker_ResourcePod.PossiblePodContentsDefs() where x.IsMeat select x).Count <ThingDef>(); int numLeathers = (from x in ThingSetMaker_ResourcePod.PossiblePodContentsDefs() where x.IsLeather select x).Count <ThingDef>(); return(ThingSetMaker_ResourcePod.PossiblePodContentsDefs().RandomElementByWeight((ThingDef d) => ThingSetMakerUtility.AdjustedBigCategoriesSelectionWeight(d, numMeats, numLeathers))); }
protected override IEnumerable <ThingDef> AllGeneratableThingsDebugSub(ThingSetMakerParams parms) { return(ThingSetMaker_ResourcePod.PossiblePodContentsDefs()); }