Daedeross / Subterra

Factorio mod that adds an underground along with specialized structures.
MIT License
9 stars 1 forks source link

Fix orientation of locomotives when placing underground #10

Open Daedeross opened 5 years ago

Daedeross commented 5 years ago

Currently, when an subterra-locomotive is placed on an underground rail, it is removed and replaced with the proper locomotive prototype for that level. This causes the unintended side-effect of the locomotive always pointing westward (if on horizontal or diagonal rail) or north (if on vertical rail).

Unfortunately, rolling stock returns false from .supports_direction(). There seems to be something else going on when a player places a train car where the game decides which direction on the track it should be facing. This decision is not happening when the entity is placed via a script.