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

CargoSpec array cleanup #8392

Merged
merged 2 commits into from Dec 21, 2020
Merged

CargoSpec array cleanup #8392

merged 2 commits into from Dec 21, 2020

Conversation

@Xaroth
Copy link
Contributor

@Xaroth Xaroth commented Dec 16, 2020

The current default CargoSpec list is very (very) verbose, making it very difficult to read what is going on. This PR tries to improve readability by doing some (albeit not-very-pretty) macro work.

This comes with some changes in sprite names and string names to make sure they all match the same format. Since I was not 100% sure on how to deal with the renaming of strings for other translations, I moved those to a separate commit, keeping only the changes to English in the main commit.

@Xaroth Xaroth force-pushed the cargospec_cleanup branch from da91033 to e37a9bb Dec 16, 2020
src/table/cargo_const.h Show resolved Hide resolved
@FLHerne
Copy link

@FLHerne FLHerne commented Dec 17, 2020

Renaming STR_*_SWEETS and STR_*_CANDYFLOSS seems wrong, given that we treat english.txt as the definitive langfile and the strings there are "sweets" and "candyfloss". OTTD source has always been in British English, grep for 'colour'. ;-)

@Xaroth Xaroth force-pushed the cargospec_cleanup branch from e37a9bb to fb8ad59 Dec 17, 2020
@Xaroth
Copy link
Contributor Author

@Xaroth Xaroth commented Dec 17, 2020

@FLHerne , @LordAro mentioned this as well on IRC. I have changed them all to prefer the english origin. This makes it a slightly bigger PR, but as you said, more in-line with the english language file.

@Xaroth Xaroth marked this pull request as ready for review Dec 17, 2020
@Xaroth Xaroth requested a review from glx22 Dec 17, 2020
src/table/cargo_const.h Show resolved Hide resolved
src/table/cargo_const.h Show resolved Hide resolved
@LordAro
Copy link
Member

@LordAro LordAro commented Dec 17, 2020

You're probably not going to want to hear this, but NML could do with some renaming too...

https://github.com/OpenTTD/nml/blob/72bc37a0622c9c8fb79cb55c3e16fe9345c866b8/nml/global_constants.py#L844

Though compatibility will need to be maintained there (not that that's difficult)

@Xaroth Xaroth force-pushed the cargospec_cleanup branch from fb8ad59 to fc30004 Dec 17, 2020
src/table/cargo_const.h Outdated Show resolved Hide resolved
@Xaroth Xaroth force-pushed the cargospec_cleanup branch from fc30004 to 38b28fa Dec 17, 2020
@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Dec 20, 2020

@LordAro : can this be merged before OpenTTD/nml#176 is approved, or is it blocking on it?

@TrueBrain TrueBrain merged commit 86e08aa into OpenTTD:master Dec 21, 2020
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants