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
RailTypes: Introduction date not enforced #7321
Comments
This is working as intended, the introduction date is an additional way to get introduction, it doesn't mean it only gets introduced on that date. We could add an additional rail type flag that says introduction date should be the only method of introduction. |
That would be useful. This flag could keep the current way of things as a default to preserve compatibility, and always enforce introduction date as an option. |
Could such a flag perhaps be combined with the "hidden railtype" flag that was added recently?
|
That complicates the hidden flag somewhat. |
Hmm, should strict date introduction still require the required railtypes to have been introduced. I'm... not really sure how it will interact. Maybe 'impossible to introduce' are up to the NewGRFs to avoid. |
Perhaps "Introduced exactly on the specified date" could override the required railtypes having been introduced? This would avoid loopholes, and as you said, it would be up to the NewGRF author to come up with a reasonable introduction scheme. |
Looking at the code, I can't see how the railtype will have been introduced. Here are the existing conditions:
No railtypes are introduced based on compatibility or powered flags. So this begs the question, what is introducing it in this case... |
Your introduction date is wrong, the value should be specified as days since year 0 (long date.) The date set for NBBN is "91F" which is around May, year 6. |
Looking at the code, I don't think a new flag to enforce this is necessary after all. |
Thanks! |
I've tested by manually overriding 91F to AFAB6 in the code (that's easier for me than modifying the NewGRF) and the rail type does appear in 1970, give or take a few days for leap years. |
I just did some more checking, and confirm the current code works well. |
That's cool, I learned stuff about code I wrote 10 years ago now! |
Hi there,
In my railtype set, there is a high-speed line coded to be introduced in 1970, but in fact, it gets introduced much earlier than that.
I seem to understand that, currently,a specific railtype gets introduced when a vehicle of that specific railtype gets introduced.
In my set, however, there are no vehicles of that "high-speed" railtype. All my vehicles are coded as "normal-speed": some modern trains will be crippled outside of "high-speed" tracks, because the concept behind my “normal-speed” tracks includes “low maximum axle weight".
For this reason, I'd need introduction year to be enforced even if no vehicles of a certain railtype are present in the set.
Thanks in advance,
Snail
The text was updated successfully, but these errors were encountered: