Hi,
is there a way to force an entity to be position on map only by hand/player action, and disable automatic positionnement by construction bots ?
I want to ensure that this entity will only exist once on the map.
I could use on_robot_built_entity and destory any unwanted entity, but I don't know how to put the item them back to where it was taken from...
And I'm afraid about loops : robots will try to position it forever.
(in the case of on_built_entity, it's easier, because you can put it back into player's inventory or quickbar).
Entity only placeable by hand ?
Entity only placeable by hand ?
My mods on the Factorio Mod Portal 

-
- Filter Inserter
- Posts: 841
- Joined: Mon Sep 14, 2015 7:40 am
- Contact:
Re: Entity only placeable by hand ?
Yes, you can monitor and disallow placement of the ghost entity (inspecting the contents of the ghost), which should stop any bot-placement. I did this once for Logistics Railway: https://github.com/Suprcheese/Logistics ... ol.lua#L35
Re: Entity only placeable by hand ?
Something along the lines of this
on_entity_built event -
if entity.name="entity-ghost" and entity.ghost_name="my-entity" then entity.destroy()
will not allow blueprints or shift placing and you don't have to worry about the item since it is just a ghost.
if it is IN a blueprint it will just destroy that ghost when placed
on_entity_built event -
if entity.name="entity-ghost" and entity.ghost_name="my-entity" then entity.destroy()
will not allow blueprints or shift placing and you don't have to worry about the item since it is just a ghost.
if it is IN a blueprint it will just destroy that ghost when placed
Re: Entity only placeable by hand ?
thx guys ! I'll try this right now.
My mods on the Factorio Mod Portal 
