Blueprint orientation when still in hand (not pasted).
Posted: Sat Mar 16, 2024 5:53 pm
Hi,
How do you find the orientation of a blueprint that is to be pasted?
I was thinking on making a small mod that would deconstruct entities that matched entities in blueprint. I.e. say on "ALT + mouse click", the script would read blueprint in hand, and then look for matching entities on the surface at click position + entity position from blueprint, and if a matching entity on surface was found it would deconstruct it.
This unfortunately is not possible since, position of entities in blueprint don't reflect the orientation of it when pasted. I.e. if you pick a blueprint, that has two entites, A & B with positions [0, 0], and [1, 0], upon rotation of blueprint in hand, the positions read by script would be the same, when you'd expect for them to become [0, 0] and [0, 1]. Even if this update of positions is not done by factorio itself, you could do this manually if you knew the orientation of about to be pasted blueprint, which seems to elude me from the api docs.
Thank you,
Asynchron.
How do you find the orientation of a blueprint that is to be pasted?
I was thinking on making a small mod that would deconstruct entities that matched entities in blueprint. I.e. say on "ALT + mouse click", the script would read blueprint in hand, and then look for matching entities on the surface at click position + entity position from blueprint, and if a matching entity on surface was found it would deconstruct it.
This unfortunately is not possible since, position of entities in blueprint don't reflect the orientation of it when pasted. I.e. if you pick a blueprint, that has two entites, A & B with positions [0, 0], and [1, 0], upon rotation of blueprint in hand, the positions read by script would be the same, when you'd expect for them to become [0, 0] and [0, 1]. Even if this update of positions is not done by factorio itself, you could do this manually if you knew the orientation of about to be pasted blueprint, which seems to elude me from the api docs.
Thank you,
Asynchron.