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

Docks/Airports/RV Stations can be built without available vehicles. #669

Closed
DorpsGek opened this issue Mar 9, 2007 · 7 comments
Closed
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Mar 9, 2007

Celestar opened the ticket and wrote:

The game prevents construction of railtypes when no appropriate vehicle is available. However, you can still happily build airports, docks and Bus/Truck stops even if you won't have a suitable vehicle for that station for ages.

Reported version: 0.5.0
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/669
@DorpsGek
Copy link
Member Author

mindphlux wrote:

Attached patch modifies the game to behave as desired in the bug report. Player gets an error message when attempting to build an airport, ship dock or depot, road depot when there are no vehicles available for this building type. Patch includes english and german error messages.

Patch does not include prevention of building a bus or truck stop.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/669#comment1104

@DorpsGek
Copy link
Member Author

Celestar wrote:

a few comments concerning that diff:

  1. The check MUST be inside the DoCommand call, because otherwise a modified client will crash a server.
  2. the loop should be done using "FOR_ALL_ENGINES".

A question is whether this is the way to go, or just to prevent opening the toolbar in the first place.


This comment was imported from FlySpray: https://bugs.openttd.org/task/669#comment1105

@DorpsGek
Copy link
Member Author

mindphlux wrote:

Attached is a new diff:

- loop uses FOR_ALL_ENGINES now
- check is done when clicking the toolbar icons for road/ship/air, if it fails, the toolbar won't be opened

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/669#comment1106

@DorpsGek
Copy link
Member Author

DaleStan wrote:

road/ship/air
Why is rail not mentioned here? And shouldn't heilports have a different checke than airports?

+STR_CANT_BUILD_AIRPORT_YET :{WHITE}No aircraft available to build an airport for!
<...>

Please don't end sentences with a preposition. Is there some reason you didn't just put a period after "available"?
Alternatively, and more in line with TTD's original messages: "Can't build airport here ...n... No aircraft available."


This comment was imported from FlySpray: https://bugs.openttd.org/task/669#comment1108

@DorpsGek
Copy link
Member Author

mindphlux wrote:

Rail is not mentioned because that already had the proper check in place. You cannot even open the railroad menu if you have no engines available (at least thats what I found out on the current revision).

Also, my first patch is already replaced by a new version, attached to my second post. There is no error message anymore.


This comment was imported from FlySpray: https://bugs.openttd.org/task/669#comment1109

@DorpsGek
Copy link
Member Author

Chris wrote:

I didn't know there is a patch already so I started a new one from scratch where I did a few things differently.

- The vehicle lists of not allowed vehicles are not shown (error)
- The build tools (train, ship, air) are not shown when no vehicles are allowed (error)
- The road build tools are shown even when road vehicles can't be built but the buttons for depots, bus and truck stations are disabled

See related forum post: http://www.tt-forums.net/viewtopic.php?t=31731

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/669#comment1184

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r10353, though it is optional.


This comment was imported from FlySpray: https://bugs.openttd.org/task/669

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant