Item that can only be smelted in specific furnace

Place to get help with not working mods / modding interface.
SpecialS
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon May 04, 2015 9:36 am
Contact:

Item that can only be smelted in specific furnace

Post by SpecialS »

I want to make an item that can be smelted in a furnace but I also want to add a furnace that are the only furnace that can amekt that item. Any tips?
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Item that can only be smelted in specific furnace

Post by Adil »

Check the "chemical-plant" definition in data/base/prototypes/entity/entities.lua. It belongs to the type same as assemblers do, but has completely different set of recipes available due to:

Code: Select all

crafting_categories = {"chemistry"},
If you check the furnace definition in the same file, you'll see that furnaces support this field as well.
You'd just need to add your own recipe category

Code: Select all

{
    type = "recipe-category",
    name = "only_my_furnace_category"
  },
  
and put your recipe into it

Code: Select all

 {
    type = "recipe",
    name = "my_special_recipe",
    category = "only_my_furnace_category",
   ...
 
Since no other furnace has this category in their definition, your will be the only one capable of working on the recipe.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
SpecialS
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon May 04, 2015 9:36 am
Contact:

Re: Item that can only be smelted in specific furnace

Post by SpecialS »

Thanks. That was all I needed to know ;)
Post Reply

Return to “Modding help”