News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Extension building directions

Started by VS, May 28, 2012, 07:36:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

VS

I have a particular extension building, this one: http://forum.simutrans.com/index.php?topic=9984.msg94674#msg94674

As you can see, it is ideally put between road and rail station, but neither are really guaranteed. For choosing rotation the following rules make most sense:
1) If there is a road, turn the slope towards it.
2) If there is a railroad, do not turn the slope towards it.
3) If there is a building, don't turn the slope towards it.

Is there any reasonable way to approximate this behaviour at least minimally with current "rules"? The only two tools I can see is setting a waytype and choosing correct images for rotations (either facing towards or away). Or do I misunderstand the placement code and waytype has no effect at all?

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

prissi

It will only look for stop. However, since it will be most likely anyway built after finishing the station and before a rad stop, I would code it for this situation.

VS

Ha, thanks! That is all information I need. (Sorry for not making sense of the code... I tried ::( )

It does not feel "right" to place a road stop in front of this, so I would assume the typical case would be empty road and a station on the other side. That means, the "away from slope" part should turn towards stations. Which is how this currently is coded... :)

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

prissi

gebaeude_t *hausbauer_t::neues_gebaeude

deals with this. It first looks for a ground, the a building, then the halt.