Please revert this change to api_command.cc:
https://github.com/simutrans/simutrans/commit/05e43dc342a290ef7f0bcc7daf07be335847b8a5
Reason: it will break scripts after map rotation. Scripts work internally with all coordinates as if the map was never rotated. Thats why I introduced special functions to transfer ribi and coord between squirrel and c++. The rotation parameter of build_station_rotation supplied by script will only be correct if current rotation of map == 0, the original implementation used ribi's, which were safe.
(Ok, I could do that myself, but then this hm_library needs to be fixed, which I would not like to do.)
@Dwachs Wow, it's been a long time! It's a pleasure to read you here again, greetings 👋 8)
To see that the current implementation does not work: generate a new map with many flat beaches and oil rigs, rotate once, let the AI run. There will be failure to build flat harbours.
Nice to read from you too.
And I see, this is a problem.
However, when constructing an asymmetric large extension building (or headquarter), a script would need to specify the orientation (which will be influenced by the current map orientation for a space site check). Thus, I think an layout should be able to be specified; however it must be rotated again in reverse according to the current map rotation.
Would that be acceptable to you too?
yes, something like this needs to be implemented. Will try next week. It needs an artificial datatype to get the conversion done correctly (similar to my_ribi_t).
Since you knew this better than me, I will happily wait for you then.