The International Simutrans Forum

 

Author Topic: [patch] preserve position of public stop when join other stops  (Read 2697 times)

0 Members and 1 Guest are viewing this topic.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4506
  • Languages: EN, DE, AT
[patch] preserve position of public stop when join other stops
« on: February 24, 2013, 06:39:55 PM »
Currently, if one makes an own stop public, and the stop gets joined to an existing public halt, the label of the public halt is moved to the position of the players stop. Is this intended?

Patch changes this: The label with the public stop's name stays at its position.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: [patch] preserve position of public stop when join other stops
« Reply #1 on: February 24, 2013, 07:53:47 PM »
Sounds great.

Please consider also ctrl+ stop moving tool to move the label to a different station tile.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9326
  • Languages: De,EN,JP
Re: [patch] preserve position of public stop when join other stops
« Reply #2 on: February 24, 2013, 10:38:03 PM »
I am ignoring Fabios always greedy extension requests and would suggest that this is indeed a good idea.

However, wasn't there somewhere an assumption that the basis pos is number 0 in the tile array?

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: [patch] preserve position of public stop when join other stops
« Reply #3 on: February 25, 2013, 04:46:24 AM »
I am ignoring Fabios always greedy extension requests
Is it my fault if one idea leads to another? :D

Honestly, just brainstorming with thoughts not worthy an own extension request thread ;)

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5387
  • Languages: EN, NO
Re: [patch] preserve position of public stop when join other stops
« Reply #4 on: February 25, 2013, 05:42:44 AM »
The entire code, also before the patch, seems kind of backwards compared to the name of the function and the description in the first post. I guess that's because there might not be any public stop to join with. Or maybe that whatever code calls make_public_and_join isn't prepared that the stop it called that method on is killed during the call?

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4506
  • Languages: EN, DE, AT
Re: [patch] preserve position of public stop when join other stops
« Reply #5 on: February 25, 2013, 08:04:10 AM »
However, wasn't there somewhere an assumption that the basis pos is number 0 in the tile array?
That is, why the patch is more complicated than just changing one position variable ;) Tile 0 of the public halt is moved to position 0 of the new halt..

@Ters: Maybe method needs proper documentation / better name. Will see, what I can do.