EuedeAdodooedoe Posted February 27, 2017 Share Posted February 27, 2017 I know that the variable that sets it to 3 is stored in preparedfoods.lua is "stacksize", which is set to 3, however the function that uses this to make it so that three jelly beans come out of crock pot when they finish cooking is something I can't find anywhere. To my knowledge, it wasn't in edible.lua or crockpot.lua. You do have a special function in preparedfoods.lua for the jellybeans stat table, which looks like this: if eater.components.debuffable ~= nil and not (eater.components.health ~= nil and eater.components.health:IsDead()) and not eater:HasTag("playerghost") then eater.components.debuffable:RemoveDebuff("healthregenbuff") eater.components.debuffable:AddDebuff("healthregenbuff", "healthregenbuff") end but it seems like it has more to do with the health healing of 2 per 2 seconds rather than providing 3 jelly beans in crock pot upon it finishing cooking. Link to comment Share on other sites More sharing options...
CarlZalph Posted February 27, 2017 Share Posted February 27, 2017 21 minutes ago, EuedeAdodooedoe said: I know that the variable that sets it to 3 is stored in preparedfoods.lua is "stacksize", which is set to 3, however the function that uses this to make it so that three jelly beans come out of crock pot when they finish cooking is something I can't find anywhere. To my knowledge, it wasn't in edible.lua or crockpot.lua data/scripts/components/stewer.lua:266-270:: local recipe = cooking.GetRecipe(self.inst.prefab, self.product) local stacksize = recipe and recipe.stacksize or 1 if stacksize > 1 then loot.components.stackable:SetStackSize(stacksize) end From: function Stewer:Harvest(harvester) Link to comment Share on other sites More sharing options...
EuedeAdodooedoe Posted February 28, 2017 Author Share Posted February 28, 2017 @CarlZalph any idea as to how I could make it so that this function works for other cooking recipes? For instance, I added this in a new file of my mod (and yes, I have declared in modmain.lua to import the file's code into it) for taffy: table.insert(recipes.taffy, stacksize) recipes.butterflymuffin.stacksize = 4 And I was hoping that when cooking up taffy, it would give me 4, but when I tested it, I only got 1 I assumed that that's all it would take to make it work for other recipes as well, since the code seems to be written for crockpot recipes in general and not just specifically for jelly beans, so I'm confused as to why this isn't working for taffy... Link to comment Share on other sites More sharing options...
Lumina Posted February 28, 2017 Share Posted February 28, 2017 table.insert(recipes.taffy, stacksize) recipes.butterflymuffin.stacksize = 4 Why this is for taffy first and butterflymuffin after ? Link to comment Share on other sites More sharing options...
EuedeAdodooedoe Posted February 28, 2017 Author Share Posted February 28, 2017 (edited) 1 hour ago, Lumina said: table.insert(recipes.taffy, stacksize) recipes.butterflymuffin.stacksize = 4 Why this is for taffy first and butterflymuffin after ? Oh... Dumb me XD, I had done the same thing for butter muffin, but since the priority was set to one for it at the time, the recipe I had given for butter muffins resulted in always being blocked by waffles 100%. I guess this answers my question, I'll fix it tomorrow and if it works, I'll let you know by lik ing yer post Edited February 28, 2017 by EuedeAdodooedoe Link to comment 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