Currently only used in base for curved-rail, the placeable_by prototype property takes ItemToPlace, and allows placing a single entity using multiple items. But this is not exposed via the runtime API.
Mods like Bluebuild and Nanobots use items_to_place_this when reviving ghosts, but currently assume that 1 entity requires 1 item. This makes it possible to get an infinite number of rails by e.g. letting Bluebuild revive a curved-rail ghost (costing 1 rail) and then mining the curved-rail entity, yielding 4 rail items.
This can be worked around to some degree by inspecting mineable_properties for entities that follow the usual practice of yielding exactly the items needed to place the entity, but not all modded entities adhere to this.
Current API: items_to_place_this :: dictionary string → LuaItemPrototype
Proposed API: items_to_place_this :: array of SimpleItemStack
LuaEntityPrototype - counts in items_to_place_this
LuaEntityPrototype - counts in items_to_place_this
Miniloader — UPS-friendly 1x1 loaders
Bulk Rail Loaders — Rapid train loading and unloading
Beltlayer & Pipelayer — Route items and fluids freely underground
Bulk Rail Loaders — Rapid train loading and unloading
Beltlayer & Pipelayer — Route items and fluids freely underground
Re: LuaEntityPrototype - counts in items_to_place_this
Ok. it's changed for 0.17.
If you want to get ahold of me I'm almost always on Discord.
Re: LuaEntityPrototype - counts in items_to_place_this
Huh. I had assumed that curved rail would require { "straight-rail", "straight-rail", "straight-rail", "straight-rail", "straight-rail" }, but never checked to confirm.