Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only possible to build station next to competitor by using CTRL+click #6742

Closed
jursky opened this issue Apr 21, 2018 · 6 comments
Closed

Only possible to build station next to competitor by using CTRL+click #6742

jursky opened this issue Apr 21, 2018 · 6 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@jursky
Copy link

jursky commented Apr 21, 2018

Hello,

I don't know if it's actually a bug or not, but I discovered that it is possible to build a rail station directly next to other player airport (see attached screenshot) using ctrl+click (building a station with possibility of combining two stations into one).

It is not possible to build station directly by just clicking (without ctrl), because that way an popup pops up saying that:
Can't build railroad station here...
Adjoins more than one existing station/loading area

So I think it should not be allowed even using ctrl+click. If I am wrong, just close/delete this issue. :)

adjoined_heli_and_train

Version 1.8.0, playing on Rpi 1/b+, custom build (without any changes to the source code).

@jursky jursky changed the title Possible adjoin of two stations using ctrl+click Possible build of a station using ctrl+click with other company's building Apr 21, 2018
@TrueBrain
Copy link
Member

It is a bug for sure; the question is, is the need for CTRL a bug, or that you can place it there a bug :D

I think that you need to press CTRL is a bug; as why shouldn't you be able to build there :)

@TrueBrain TrueBrain added good first issue Good for newcomers bug Something isn't working labels Apr 21, 2018
@TrueBrain TrueBrain changed the title Possible build of a station using ctrl+click with other company's building Only possible to build station next to competitor by using CTRL+click Apr 21, 2018
@LordAro
Copy link
Member

LordAro commented Apr 22, 2018

Knew I'd seen this before somewhere - basically duplicates #4185 , not that that has any reasonable resolution

@topalavlad
Copy link

If everyone agrees that CTRL should not change the behavior and the user should not be able to build the station there regardless of the modifier key, I'd like to give it a try and fix this behavior.

@planetmaker
Copy link
Contributor

planetmaker commented Jun 8, 2018

I think the desired behaviour is: you can build a station there without need for CTRL+click:

As you are two companies, you are building two completely separate stations. Thus you should simply click the tile and get your station. Thus effectively:

  • keep the possibility to build stations there
  • remove the need for CTRL+click

@andythenorth
Copy link
Contributor

andythenorth commented Jun 8, 2018

I am +1 to Planetmaker's proposal.

Hopman pushed a commit to Hopman/OpenTTD that referenced this issue Jun 20, 2018
@Hopman
Copy link
Contributor

Hopman commented Jun 20, 2018

I was looking into this and this is the solution I found.

I'm still new to C++ and this project, so any feedback is welcome.

Hopman pushed a commit to Hopman/OpenTTD that referenced this issue Jul 20, 2018
Remove unused string "STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION"
from all language files.
Hopman pushed a commit to Hopman/OpenTTD that referenced this issue Jul 20, 2018
Remove unused string "STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION"
from all language and scripting files.
Hopman added a commit to Hopman/OpenTTD that referenced this issue Jul 20, 2018
Hopman added a commit to Hopman/OpenTTD that referenced this issue Jul 20, 2018
Remove unused string "STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION"
from all language and scripting files.
Hemaolle pushed a commit to Hemaolle/OpenTTD that referenced this issue Sep 16, 2018
Hemaolle pushed a commit to Hemaolle/OpenTTD that referenced this issue Sep 16, 2018
Remove unused string "STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION"
from all language and scripting files.
Hemaolle added a commit to Hemaolle/OpenTTD that referenced this issue Sep 16, 2018
…L+click

Fix by checking only for stations owned by the current company when
inspecting if there are multiple adjoining stations to the one being built.

When building next to 2 or more owned stations we don't know which
station should be extended. For other companies' stations that's not a
problem since our station won't merge with theirs anyway.
Hemaolle pushed a commit to Hemaolle/OpenTTD that referenced this issue Sep 16, 2018
Hemaolle pushed a commit to Hemaolle/OpenTTD that referenced this issue Sep 16, 2018
Remove unused string "STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION"
from all language and scripting files.
Hemaolle added a commit to Hemaolle/OpenTTD that referenced this issue Sep 16, 2018
…L+click

Fix by checking only for stations owned by the current company when
inspecting if there are multiple adjoining stations to the one being built.

When building next to 2 or more owned stations we don't know which
station should be extended. For other companies' stations that's not a
problem since our station won't merge with theirs anyway.
@LordAro LordAro closed this as completed Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

7 participants