コード例 #1
0
 // Simply displays a message in the log.  Useful for testing?
 public static bool TestChanger(List <Thing> products, ModExtension_ModifyProduct modifyYieldExt,
                                IBillGiver billGiver, Thing productMaker,
                                RecipeDef recipeDef, Pawn worker, List <Thing> ingredients,
                                Thing dominantIngredient)
 {
     products.Add(ThingMaker.MakeThing(ThingDefOf.MealNutrientPaste));
     return(true);
 }
コード例 #2
0
        // You definitely want to use this only when usin billBonusYieldList
        public static bool TryGetRecipeBonusYield(List <Thing> products, ModExtension_ModifyProduct modifyYieldExt,
                                                  IBillGiver billGiver, Thing productMaker,
                                                  RecipeDef recipeDef, Pawn worker, List <Thing> ingredients,
                                                  Thing dominantIngredient
                                                  )
        {
            Thing t = modifyYieldExt.RecipeBonusThing(recipeDef);

            if (t != null)
            {
                if (modifyYieldExt.replaceOrigProduct)
                {
                    products.Clear();
                }
                products.Add(t);
                return(true);
            }
            return(false);
        }