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

Feature: Show group name as part of the default vehicle name. #8307

Merged
merged 2 commits into from Dec 15, 2020

Conversation

stormcone
Copy link
Contributor

Only if the vehicle is member of a group and does not have a user defined name.

This patch is based on @KeldorKatarn's commit:
KeldorKatarn/OpenTTD_PatchPack@3f03ec47

group_name

@TrueBrain TrueBrain added candidate: yes This Pull Request is a candidate for being merged size: small This Pull Request is small, and should be relative easy to process size: trivial This Pull Request is trivial and removed size: small This Pull Request is small, and should be relative easy to process labels Dec 14, 2020
@TrueBrain
Copy link
Member

I really like this. There is one thing my OCD triggers on ... but I am not sure it needs fixing:

It is now called Train 1 but MyGroup #1. Depending on if it is in a group, the number gained a #.

I am almost tempted to always add a # :P

Only if the vehicle is member of a group and does not have a user defined name.
@TrueBrain
Copy link
Member

Okay, this hit my OCD enough that I added a commit to change Train 1 into Train #1. Will be a while before all translations pick that up.

I made some minor changes to your patch:

  • With AddToGroup, only invalidate the data of the vehicle that is added
  • With DeleteGroup, no need to invalidate data; the calls done by DeleteGroup always cause AddToGroup to be called
  • Renamed the new string STR_FORMAT_GROUP_VEHICLE_NAME to include _NAME

Also rebased :)

This is for consistency; most other objects add a # to indicate
it is the Nth of that object, except for Trains / RVs / Ships /
Aircrafts.
This becomes painfully apparent with unnamed vehicles in groups,
which do get a "#".
@TrueBrain TrueBrain merged commit f7b8e7e into OpenTTD:master Dec 15, 2020
@stormcone
Copy link
Contributor Author

@TrueBrain Okay, thank you. :)

@stormcone stormcone deleted the group-name branch January 30, 2021 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
candidate: yes This Pull Request is a candidate for being merged size: trivial This Pull Request is trivial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants