9 public override int DecaySpeedChild
19 public virtual string idMsg
29 public virtual TraitBrewery.Type type
39 public virtual bool IsFood
48 public override bool CanChildDecay(
Card c)
51 return !(
id ==
"48") && !(
id ==
"cheese") && !(
id ==
"jerky") && (c.trait is
TraitDrinkMilk || c.material.id == 94);
55 public override bool OnChildDecay(
Card c)
57 TraitBrewery.Type type = this.type;
70 if (c.category.IsChildOf(
"meal"))
75 string productID = this.GetProductID(c);
76 if (productID ==
null)
80 Thing thing = c.Duplicate(c.Num);
84 c =
CraftUtil.MixIngredients(productID,
new List<Thing>
87 },
CraftUtil.MixType.Food, 0).SetNum(thing.Num);
91 c =
ThingGen.Create(productID, -1, -1).SetNum(thing.Num);
95 c.MakeFoodRef(thing,
null);
99 c.c_priceAdd = thing.GetValue(
false) * 125 / 100;
102 this.owner.AddThing(c.Thing,
false, -1, -1);
103 this.owner.GetRootCard().Say(this.idMsg, thing, c,
null,
null);
108 public virtual string GetProductID(
Card c)
111 if (
id ==
"crim" ||
id ==
"drug_crim")
115 if (c.category.IsChildOf(
"mushroom") || c.category.IsChildOf(
"nuts"))
123 public virtual void OnProduce(
Card c)