The International Simutrans Forum

Development => Patches & Projects => Topic started by: Dwachs on February 24, 2013, 06:39:55 PM

Title: [patch] preserve position of public stop when join other stops
Post by: Dwachs 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.
Title: Re: [patch] preserve position of public stop when join other stops
Post by: Fabio 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.
Title: Re: [patch] preserve position of public stop when join other stops
Post by: prissi 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?
Title: Re: [patch] preserve position of public stop when join other stops
Post by: Fabio on February 25, 2013, 04:46:24 AM
Quote from: prissi on February 24, 2013, 10:38:03 PM
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 ;)
Title: Re: [patch] preserve position of public stop when join other stops
Post by: Ters 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?
Title: Re: [patch] preserve position of public stop when join other stops
Post by: Dwachs on February 25, 2013, 08:04:10 AM
Quote from: prissi on February 24, 2013, 10:38:03 PM
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.