Maris Posted January 26, 2015 Share Posted January 26, 2015 If you have your own ingredients for Crock Pot or if you change existing ingredients, you can improve compatibility with other mods. Just use my AddIngredient function instead of AddIngredientValues:local cooking = require("cooking")local ingredients = cooking.ingredients--Accurate adding of ingredients. No breaking other scales.local AddIngredient = function(names, tags, cancook, candry) for _,name in pairs(names) do if not ingredients[name] then --No breaking! ingredients[name] = { tags= {}} end if cancook and not ingredients[name.."_cooked"] then --No breaking! ingredients[name.."_cooked"] = {tags={}} end if candry and not ingredients[name.."_dried"] then --No breaking! ingredients[name.."_dried"] = {tags={}} end for k,v in pairs(tags) do ingredients[name].tags[k] = v if cancook then ingredients[name.."_cooked"].tags.precook = 1 ingredients[name.."_cooked"].tags[k] = v end if candry then ingredients[name.."_dried"].tags.dried = 1 ingredients[name.."_dried"].tags[k] = v end end endendIt would be nice if Klei implement it in game code. Link to comment https://forums.kleientertainment.com/forums/topic/49753-more-accurate-function-addingredientvalues/ Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now