The International Simutrans Forum

 

Author Topic: Extension building directions  (Read 3044 times)

0 Members and 1 Guest are viewing this topic.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Extension building directions
« on: May 28, 2012, 07:36:31 PM »
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?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9353
  • Languages: De,EN,JP
Re: Extension building directions
« Reply #1 on: May 28, 2012, 07:42:03 PM »
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.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Extension building directions
« Reply #2 on: May 28, 2012, 07:55:14 PM »
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... :)

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9353
  • Languages: De,EN,JP
Re: Extension building directions
« Reply #3 on: May 28, 2012, 09:43:45 PM »
gebaeude_t *hausbauer_t::neues_gebaeude

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