Way to specify an entity's "blueprint counterpart"

Things that already exist in the current mod API
Post Reply
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

Way to specify an entity's "blueprint counterpart"

Post by Reika »

As per this

viewtopic.php?f=25&t=51097

Basically a way to tell the game "this entity is actually placed by item X, and so should blueprint as it, not be ignored entirely".
Image

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Way to specify an entity's "blueprint counterpart"

Post by eradicator »

The "curved-rail" prototype already has a "placeable_by" attribute. If that attribute was inherited to all LuaEntityPrototype it would indeed solve many blueprinting issues involving multi-entity constructs that mods frequently have to rely on.
(Also if possible at all it would be nice to have free placing with something like placeable_by = {} in some rare cases.)
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13201
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Way to specify an entity's "blueprint counterpart"

Post by Rseding91 »

eradicator wrote:The "curved-rail" prototype already has a "placeable_by" attribute. If that attribute was inherited to all LuaEntityPrototype it would indeed solve many blueprinting issues involving multi-entity constructs that mods frequently have to rely on.
(Also if possible at all it would be nice to have free placing with something like placeable_by = {} in some rare cases.)
It is supported by every entity prototype.
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Way to specify an entity's "blueprint counterpart"

Post by eradicator »

Rseding91 wrote:It is supported by every entity prototype.
Oooh? Really?! :D. It's not in the documentation though.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13201
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Way to specify an entity's "blueprint counterpart"

Post by Rseding91 »

eradicator wrote:
Rseding91 wrote:It is supported by every entity prototype.
Oooh? Really?! :D. It's not in the documentation though.
It's a prototype property - we haven't documented any of those.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Already exists”