-
-
Notifications
You must be signed in to change notification settings - Fork 953
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
Group management enhancements #7886
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also needs a rebase :)
3fead8e
to
b62aa43
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Specific name" is ...a bad name. It took me a while looking at the code to realise what it was doing. Perhaps "automatically generated name" (or "autogen name" for things that want a shorter string)
In terms of commands, I wonder if it's actually worth creating a whole new command for what's essentially just CMD_CREATE_GROUP with an extra boolean flag.
CmdCreateGroup has the following bits:
p1 0-3: vehicle type
p2 0-15: parent group id
CmdCreateGroupSpecificName:
p1 0 - 19: vehicleid
p1 31: shared vehicles
p2 0-15: parent group id
Plenty of room to combine the two, IMO
I changed the functions'/variables' names as you suggested. As for the command in my opinion it's a bit clearer to reading/using the code with 2 separated commands, instead of taking care of the various bits. Like if |
ffe5a2e
to
b2acb79
Compare
…eate a group with a name related to the vehicle.
31f22e1
to
dce10b2
Compare
There are 4 things in this PR:
So, as merge candidate:
|
Because is this causing desync or just looks "weird" when you compare the group list between the clients?
If you join to an existing company, you can easily recreate all of the groups. Just press the delete all groups button, than the create groups automatically button. Anyway I see that it isn't "nice". But maybe could be there a place holder SCC_XXX code or something in the group names, and the clients could substitute them when the window is drawn. Or always get the group names from the server. Or as easy alternative:
I know these are just workarounds, but I do think this is a useful feature. I never liked manually type in the group names.
I do not agree. I do not find #7028 too useful. #7028 can be useful if you start the game in 2050 and you just use the same engine everywhere, and you have only 1 wagon to carry a specific cargo. For example a game without NewGRFs. In that case you do not have to replace your vehicles, the autorenew feature solves it.
See above. |
This PR has potential but hasn't been touched in two years. I think part of the problem is that it's trying to do too much. I'm going to close this but encourage you to separate each feature and open a new PR for each one. That would be much easier to review and evaluate than having them all together like this (for example, the Preview feature is great but it's hard to track down which feature comes from which commit). I'd like to see some of these features in the game, just help us by making them easier to review. 😃 |
The first commit is based on @JGRennison's patch: JGRennison/OpenTTD-patches@91c5dee.
I replaced the text buttons with image buttons.
The second commit is from @KeldorKatarn's patch pack: KeldorKatarn/OpenTTD_PatchPack@3f03ec4.
I modified the loop which finds the unique orders.
The third one is also based on @KeldorKatarn's patches: KeldorKatarn/OpenTTD_PatchPack@49082fb and KeldorKatarn/OpenTTD_PatchPack@bdabd04.
I also modified it a little and added parent groups by cargo for the new groups.