pickup_position and drop_position for ghost entities
Posted: Fri Dec 30, 2016 6:25 am
While trying to create a mod to search and auto-upgrade inserters, I ran into an error with ghosts causing errors. When I try to copy an inserter's pickup/dropoff locations onto a ghost, I get an error.
Here is the specific code:
Here is the error it produces: "Vector is not a safe distance from the tile edge".
This error occurs whether I use pickup_position or drop_position or both, though I included both in my code snippet for brevity.
I wanted to do this to support a popular mod, but this error happens even without that mod.
Here is the specific code:
Code: Select all
roboport.surface.create_entity{name="entity-ghost", position=inserter.position, inner_name="fast-inserter", direction = inserter.direction, force=roboport.force, pickup_position=inserter.pickup_position, drop_position=inserter.drop_position}
This error occurs whether I use pickup_position or drop_position or both, though I included both in my code snippet for brevity.
I wanted to do this to support a popular mod, but this error happens even without that mod.