Page 1 of 1
Adding new recipe category
Posted: Sun Feb 07, 2021 3:35 am
by MathieuG89
Why isn't this working ?
Code: Select all
table.insert(data.raw["recipe-category"], {type = "recipe-category", name = "test"})
Re: Adding new recipe category
Posted: Sun Feb 07, 2021 8:45 am
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"}})
Re: Adding new recipe category
Posted: Sun Feb 07, 2021 5:55 pm
by MathieuG89
Obviously ...
I don't know what I was thinking
Thanks a lot for pointing it out !