I'm trying to disable the electric mining drill recipe in the prototyping stage by:
Code: Select all
data.raw["recipe"]["electric-mining-drill"].enabled = false
Greetings,
lovely_santa
Code: Select all
data.raw["recipe"]["electric-mining-drill"].enabled = false
Code: Select all
-- thanks to Bilka
local function disable_recipe(recipe)
if not data.raw.recipe[recipe] then return end
if data.raw.recipe[recipe].normal then
data.raw.recipe[recipe].normal.enabled = false
data.raw.recipe[recipe].expensive.enabled = false
else
data.raw.recipe[recipe].enabled = false
end
end