Jump to content

Add Recipes via LUA on the fly


Giuliano

Recommended Posts

It's possible add Recipes on the fly?

 

I have the next code for iterate Recipes:

local recipes = ScriptManager.instance:getAllRecipes()
for i = 0, recipes:size() - 1 do
	local recipe = recipes:get(i)
end

 

But i notice that type(recipes) result is userdata, and according to https://www.lua.org/pil/28.1.html it data can't be changed.

So is there a way to add recipes after some event like OnGameBoot or OnGameStart?

 

Thanks :)

Edited by Giuliano
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...