recipe values
Posted: Wed Jun 01, 2016 8:24 am
I have tried to make a function that set some default values for some recipes, but it doesn't work. My guess is im doing something wrong, or it's something that cant be done the way i think.
Hope someone in here can help me solve the problem, if there is a way to do it.
my function:
function recValues(recipename)
recipe[recipename].icon = "__MyMod__/graphics/icon/recycling-progress.png"
recipe[recipename].hidden = "true"
recipe[recipename].category = "smeltning",
recipe[recipename].energy_required = 5,
end
The recipe:
{
type = "recipe",
name = "rec-iron-chest",
ingredients = {{"iron-chest", 1}},
results =
{{"iron-plate", 4}},
recValues("rec-iron-chest"),
},
The idea is to make a function that fill in the spots that won't change for all the recipes, im gonna make, spare a lot of lines of code.
Hope someone in here can help me solve the problem, if there is a way to do it.
my function:
function recValues(recipename)
recipe[recipename].icon = "__MyMod__/graphics/icon/recycling-progress.png"
recipe[recipename].hidden = "true"
recipe[recipename].category = "smeltning",
recipe[recipename].energy_required = 5,
end
The recipe:
{
type = "recipe",
name = "rec-iron-chest",
ingredients = {{"iron-chest", 1}},
results =
{{"iron-plate", 4}},
recValues("rec-iron-chest"),
},
The idea is to make a function that fill in the spots that won't change for all the recipes, im gonna make, spare a lot of lines of code.