Adding new recipe category

Place to get help with not working mods / modding interface.
Post Reply
MathieuG89
Burner Inserter
Burner Inserter
Posts: 12
Joined: Mon Apr 27, 2020 7:02 pm
Contact:

Adding new recipe category

Post by MathieuG89 »

Why isn't this working ?

Code: Select all

table.insert(data.raw["recipe-category"], {type = "recipe-category", name = "test"})

User avatar
ickputzdirwech
Filter Inserter
Filter Inserter
Posts: 768
Joined: Sun May 07, 2017 10:16 am
Contact:

Re: Adding new recipe category

Post by ickputzdirwech »

You have to use data:extend if you want to create a knew prototype. Try the following:

Code: Select all

data:extend({{type = "recipe-category", name = "test"}})
Mods: Shortcuts for 1.1, ick's Sea Block, ick's vanilla tweaks
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write

MathieuG89
Burner Inserter
Burner Inserter
Posts: 12
Joined: Mon Apr 27, 2020 7:02 pm
Contact:

Re: Adding new recipe category

Post by MathieuG89 »

Obviously ...

I don't know what I was thinking :lol:

Thanks a lot for pointing it out !

Post Reply

Return to “Modding help”