Blueprints and dummy entities

Place to get help with not working mods / modding interface.
Post Reply
FlamingCarrot
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue Apr 30, 2019 1:59 pm
Contact:

Blueprints and dummy entities

Post by FlamingCarrot »

My mod includes an electric offshore pump that inherits most of its properties from the vanilla one, but due to prototype limitations uses the assembling-machine type. To keep the "shoreline only" restriction I've used created_entity, create_entity and fast_replace to quietly swap the assembler!pump in whenever the dummy!pump is placed; a technique I'm sure you're all familiar with.

Anyway, the shennanigans are revealed whenever blueprints are made containing the new assembler!pump, which is then placeable off-grid and lacks a craftable item to place it with.

It looked like the "placeable_by" property might allow me to bind the assembler!pump to the same item as the dummy!pump and allow bots to place both with the same item, but I think I just misunderstood what that property is for.

So my query is:

1) Can I automatically swap out placed ghosts of the entity like I did with the entity itself? Can created_entity listen only for placed ghosts of a certain type?
2) Otherwise, can I automatically swap out entities included in a blueprint for another, preferably when the BP is created?

Post Reply

Return to “Modding help”