//Here is the main change: when the temperature is reached the item is "Ruined", and
//this code will spawn a new item with the same stackCount, the same ingredients list
//(if any) and destroy the original item
Thing newItem = ThingMaker.MakeThing(ThingDef.Named(Props.thingToTransformInto));
newItem.stackCount = this.parent.stackCount;
newItem.TryGetComp<CompIngredients>().ingredients = this.parent.TryGetComp<CompIngredients>().ingredients;
Does not actually check "if any", should be:
if( newItem.TryGetComp<CompIngredients>()?.ingredients != null )
newItem.TryGetComp<CompIngredients>().ingredients = this.parent.TryGetComp<CompIngredients>()?.ingredients;
Does not actually check "if any", should be: