At present there is no way to find a placement location for either a non north direction or a non 0 orientated entity.
Also you can't check buildability of a non 0 orientated entity.
My example is trying to teleport a player's car at its current orientation. However, I can see finding a placement for a non rotationally symmetrical entity could also be a challenge presently.
So ideally:
- LuaSurface.find_non_colliding_position() - would support direction and orientation being supplied.
- LuaSurface.can_place_entity() - would support orientation being supplied.
LuaSurface.find_non_colliding_position() and LuaSurface.can_place_entity() to support direction and orientation
- Muppet9010
- Filter Inserter
- Posts: 279
- Joined: Sat Dec 09, 2017 6:01 pm
- Contact:
Re: LuaSurface.find_non_colliding_position() and LuaSurface.can_place_entity() to support direction and orientation
I have a similar issue: A user requested that cars teleported by my mod get the same orientation as the player who ordered the teleporting. I'd need to check whether the car with that orientation could be placed at the requested position.Muppet9010 wrote: ↑Thu Jun 30, 2022 10:59 pm My example is trying to teleport a player's car at its current orientation.
I'd like to extend this list. Please add orientation toSo ideally:
- LuaSurface.find_non_colliding_position()
- LuaSurface.find_non_colliding_position_in_box()
- LuaSurface.can_place_entity()
- LuaPlayer.can_place_entity()
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!