The International Simutrans Forum

 

Author Topic: system_type for wayobject  (Read 2425 times)

0 Members and 1 Guest are viewing this topic.

Offline Michael 'Cruzer'

  • Devotee
  • *
  • Posts: 196
  • Founder of pak192.comic
    • Marktplatz für Parkplätze
  • Languages: DE, EN
system_type for wayobject
« on: July 24, 2009, 12:07:12 PM »
Would it be able to make system_types for wayobject?
The usage: You can build a wayobject for every system_type on one way-tile.

Like:
system_type = 0 means train electrification
system_type = 1 means third rail
system_type = 128 means stuff, like noise wall or telegraph poles

Offline gerw

  • Coder/patcher
  • *
  • Posts: 618
Re: system_type for wayobject
« Reply #1 on: July 24, 2009, 12:18:35 PM »
Then some internal stuff has to been reworked (some parts in the code assume, that there is only one wayobj per waytype). But this wouldn't be a great effort, I guess.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: system_type for wayobject
« Reply #2 on: July 24, 2009, 01:15:45 PM »
this would be good at least in two cases: third rail & overhead wires (for trains with those power supply sharing a track) and electification and noise reduction (and maybe also streetlights).

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9513
  • Languages: De,EN,JP
Re: system_type for wayobject
« Reply #3 on: July 24, 2009, 02:29:37 PM »
This will give a graphical mess as the order of those objects is arbitary (i.e. first built would be first draw).

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: system_type for wayobject
« Reply #4 on: July 27, 2009, 09:12:39 AM »
the number
e.g.
system_type = 0 means train electrification
system_type = 1 means third rail
system_type = 128 means stuff, like noise wall or telegraph poles
could be the priority itself: lowest number first drawn (or the other way).

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9513
  • Languages: De,EN,JP
Re: system_type for wayobject
« Reply #5 on: July 27, 2009, 10:08:20 AM »
Adding stuff and removing stuff to a tile is also one of the most frequent operation in simutrans in well developed games. Of course it can be sorted, but this comes always as a price. Also the code for looking up, building and wayobjects  needs some further change. YOur best bet is if gerw works on it ...

On a related note: The "system_types" should be called different, sicne they have no connection to the actual system type of ways and vehicles.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18690
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: system_type for wayobject
« Reply #6 on: July 27, 2009, 10:13:11 PM »
In Simutrans-Experimental, there are way constraints, but there is no automatic way of combining types. Instead, it is possible to produce a single way object type that builds in two different forms of electrification, for example.