Page 1 of 1

Item that can only be smelted in specific furnace

Posted: Sat Apr 02, 2016 10:15 pm
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?

Re: Item that can only be smelted in specific furnace

Posted: Sun Apr 03, 2016 12:27 am
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.

Re: Item that can only be smelted in specific furnace

Posted: Sun Apr 03, 2016 7:36 am
by SpecialS
Thanks. That was all I needed to know ;)