Page 1 of 1

[0.17.59] clone_entities() and clone() can clone rails off the rail grid

Posted: Tue Jul 30, 2019 1:40 am
by mulark

Code: Select all

/c game.player.surface.clone_entities({entities={game.player.selected}, destination_offset={0,-1}})
If you run such a command hovering on a rail piece, the rail will be cloned to the midpoint of two rail grids. You cannot use create_entity() or teleport() in the same way.

Editor's clone doesn't have the same issue.

Re: [0.17.59] clone_entities() and clone() can clone rails off the rail grid

Posted: Tue Jul 30, 2019 2:35 am
by Rseding91
Thanks for the report. The editor clone does allow that - you just have to un-check the "snap to grid" setting. There's nothing that disallows placing rails off-grid that makes this an error. If you don't want them off-grid then you'd just not give it offsets that are off grid.