1) Recipe that results in an item-with-tags:
Extend the results table to include type="item-with-tags" that includes a tags field that will generate the given tags when the item is manufactured in an assembler.
item-with-tags would be an ItemWithTagsProductPrototype
Code: Select all
{
type = "recipe",
...
results = {
{
type = "item-with-tags",
name = "mod-item-w-tags",
amount = 1,
tags = { resource = { name="coal", amount ="25" } }
}
},
...
}
2) Collate tags from ingredients into result (if result is "item-with-tags"):
This one may be a bit more to implement.
An assembly-machine using an "item-with-tags" (1 or more) that results in an "item-with-tags" collects the tags from the input and puts them all into the result's tags. This would likely include merging tables.
"another-item-w-tags".tags = { another_tag = "some data" }
Code: Select all
{
type = "recipe",
ingredients = {
{name = "steel", amount = 20},
{name = "iron-plate", amount = 50},
{name = "mod-item-w-tags", amount = 1},
{name = "another-item-w-tags", amount = 1}
},
results = {
{ type = "item-with-tags", name = "mod-item-with-tags2", amount = 1 }
},
...
}
I've only seen item-with-tags being used in mods ( I just have the base game ), so this would only affect mods (I think), but would simplify some recipe configurations that could use "generic" items with their manufacture/building. (like this sample which would be a fuel pack that would be a part of an automated train manufacture mod (the fuel would be unpacked into 25 coal, put into the locomotive fuel tank)).
This would help me a lot, and open up a few possibilities for others!
Thanks