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

Trains: var4A in purchase list (current railtype) #4410

Closed
DorpsGek opened this issue Jan 15, 2011 · 6 comments
Closed

Trains: var4A in purchase list (current railtype) #4410

DorpsGek opened this issue Jan 15, 2011 · 6 comments
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

mb opened the ticket and wrote:

It would be nice to get var4A (current rail type for trains) available in the purchase list. I´m using different values for net load depending on rail type, and it would be beneficial for the player to see it in advance in the purchase list.

Reported version: trunk
Operating system: All


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

Rubidium wrote:

The current railtype would be the railtype of the depot, right? But what when there is no depot, e.g. the available engines list that you can open from the vehicle list's window.

I assume you want to get the railtype's label, right?


This comment was imported from FlySpray: https://bugs.openttd.org/task/4410#comment9485

@DorpsGek
Copy link
Member Author

mb wrote:

The current railtype would be the railtype of the depot, right?

In this case, yes. (Because the vehicle is not yet built.)

But what when there is no depot, e.g. the available engines list that you can open from the vehicle list's window.

Mmh? Ah yes, there´s another scroll down menu ... never realised it. Well, this list seems to include all vehicles. So, it lacks the "filter functionality" of a depot, so to say. Well, that´d be OK, as a list of vehicles from every depot type, it´d simply display the max value for a particular vehicle.

I assume you want to get the railtype's label, right?

Yes: "the lower byte (rr) contains the (translated) rail type the train vehicle is currently driving on."


This comment was imported from FlySpray: https://bugs.openttd.org/task/4410#comment9488

@DorpsGek
Copy link
Member Author

frosch wrote:

I guess the variable would need to return some special value like 0xFFFFFFFF for the "available vehicles"-list, autoreplace-gui, newspaper and vehicle-preview.

However, there are way too many places where the depot-railtype would need passing to various callbacks and similiar though. Making it very hard to implement unless maybe using some treacherous global variables set and reset by the purchase list.

Would it be enough, if this was only available for callback 23 (additional text)?


This comment was imported from FlySpray: https://bugs.openttd.org/task/4410#comment9500

@DorpsGek
Copy link
Member Author

mb wrote:

However, there are way too many places where the depot-railtype would need passing to various > callbacks and similiar though. Making it very hard to implement unless maybe using some
treacherous global variables set and reset by the purchase list.

I was under the impression that the depot already "knows" about the current railtype (hence its selection of vehicles), and thus it should be "manageable". :)

Would it be enough, if this was only available for callback 23 (additional text)?

It would be helpful, at least.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4410#comment9501

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) component: NewGRF This issue is related to NewGRFs enhancement labels Apr 7, 2018
@andythenorth
Copy link
Contributor

No progress on this in 7 years, let's assume we've passed on it. Can re-open in future if someone is prepared to push this through.

@andythenorth
Copy link
Contributor

The issue is closed, and it's fiddly to implement.

That said, for vehicles that vary stats by railtype (e.g. power etc), it would be a better UI if the purchase menu could show the stats for current depot.

I don't know how the 'available trains' non-depot case would be handled at all though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

2 participants