Jump to content

Portable Spicer crashes from mod food


Mobbstar
  • Fixed

The Portable Seasoning Station has no "failed" recipe like the Crockpot does, and the stewer component does not failsafe if there is no valid recipe. As such, trying to season a food which is not in the basegame preparedfoods.lua or preparedfoods_warly.lua, such as any mod cooking product, crashes the game.

[string "scripts/components/stewer.lua"]:137 in (method) StartCooking (Lua) <121-167>: attempt to index a nil value

 

(Other than that, the update seems stable to me. Well done!)


Steps to Reproduce
1) Spawn anything with the "preparedfood" tag that isn't in preparedfoods.lua, or give something the "preparedfood" tag. 2) Try to season it.
  • Like 1



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

I believe modders will have to code a dish with a one spice as different prefab, since that's what devs did too. (meatballs_spice_garlic etc. )

Edited by __IvoCZE__

Share this comment


Link to comment
Share on other sites

2 hours ago, __IvoCZE__ said:

I believe modders will have to code a dish with a one spice as different prefab, since that's what devs did too. (meatballs_spice_garlic etc. )

That's acceptable, considering we can make use of the spice plate animation rather easily (just override the "swap_food" symbol). The real problem I'm having here is that outdated mods entirely crash the game. A simple if-check to fail the whole process safely would make a good difference.

EDIT: Though, regarding what you said, it would be a great help if GenerateSpicedFoods were accessible to mods.

Edited by Mobbstar

Share this comment


Link to comment
Share on other sites

Changed Status to Fixed

Foods missing spiced versions will just end up as seasoned wetgoop instead of crashing.

I've also changed the GenerateSpicedFoods function in spicedfoods.lua to be global

Sorry, GenerateSpicedFoods will be global after the next hotfix.

GenerateSpicedFoods is global now. (Hotfix 356019)

Edited by V2C
  • Like 1
  • Thanks 2

Share this comment


Link to comment
Share on other sites



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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...