Change a modded recipe with an another mod?

Place to get help with not working mods / modding interface.
Post Reply
nt1soc
Burner Inserter
Burner Inserter
Posts: 9
Joined: Wed May 27, 2020 4:54 pm
Contact:

Change a modded recipe with an another mod?

Post by nt1soc »

I am very new in modding and I want to make a mod which changes an another mod recipe if the mod is active.

Code: Select all

if (mods or script.active_mods)["LogisticTrainNetwork"] then
	{
	type = "recipe",
	name = "logistic-train-stop",
	enabled = true,
	ingredients ={},
	energy_required = 0.01,
	result = "logistic-train-stop",
	}
end
I came up with this, but it gives an error in line 2.
Can anyone help?

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Change a modded recipe with an another mod?

Post by DaveMcW »

Code: Select all

if (mods or script.active_mods)["LogisticTrainNetwork"] then
  data:extend{
    {
      type = "recipe",
      name = "logistic-train-stop",
      enabled = true,
      ingredients ={},
      energy_required = 0.01,
      result = "logistic-train-stop",
    }
  }
end


Post Reply

Return to “Modding help”