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

Add name of group in autoreplace-dialog caption #1117

Closed
DorpsGek opened this issue Aug 9, 2007 · 3 comments
Closed

Add name of group in autoreplace-dialog caption #1117

DorpsGek opened this issue Aug 9, 2007 · 3 comments
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Aug 9, 2007

frosch opened the ticket and wrote:

The caption of the autoreplace-dialog are changed to 'Replace all {vehicletype}', 'Replace ungrouped {vehicletype}' and 'Replace {vehicletype} of group "{group}"'.
I noticed that nycom already had this feature in some early versions of the initial patch, but removed it later. (Perhaps because of changes in GUI programming) I used some remains in the language files of this early feature.

Second, when the "advanced vehicle list" is disabled, autoreplace now operates on all vehicles, and no longer on ungrouped vehicles. This leads to a sensible dialog caption ('Replace all {vehicletype)'), and it appears more logical to me.

I only changed "english.txt", so compiling the other languages throws a lot of warnings. Is there anything I have to do about that in this patch?

Attachments

Reported version: trunk
Operating system: All


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

Rubidium wrote:

"Second, when the "advanced vehicle list" is disabled, autoreplace now operates on all vehicles, and no longer on ungrouped vehicles."
Might sound logical, but my gut says this is going to cause desyncs when one person plays without advanced vehicle lists and one person with the advanced lists.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1117#comment2441

@DorpsGek
Copy link
Member Author

frosch wrote:

The advanced list appears to me like a GUI-only thingie. It can be enabled and disabled client-side during a multiplayer-game. The core always assumes the use of groups.
The change DEFAULT_GROUP -> ALL_GROUP only takes effect, if someone used the grouping interface, added some vehicles to a group, and disabled the group interface later.
If the player now uses the autoreplace, trunk only operates on the ungrouped vehicles. The patch changes this to operate on all vehicles.
In both cases: If the player previously activated a replace protection or specified a autoreplace for a group, he cannot disable this without reactivating the group interface. Really unimportant though :)

I have split the patch in two parts and added a third one:

  1. GroupReplaceCaption_r11289_remove_codedup_and_change_to_all_group.patch:
    Remove codeduplication between ShowReplaceVehicleWindow() and ShowReplaceGroupVehicleWindow(). Change non-advanced-vehicle-list to call the autoreplace-dialog for the ALL_GROUP instead of DEFAULT_GROUP.
    The two procedures are completely identical, except the second gets the selected group from a parameter while the first always uses DEFAULT_GROUP.
    The patch removes this code duplication. It also changes DEFAULT_GROUP to ALL_GROUP, but that is only one line to change, if you don't like it.

  2. GroupReplaceCaption_r11289_main.patch:
    Put the group name into the autoreplace-dialog caption.

  3. GroupReplaceCaption_r11289_update_languages.patch:
    This patch does the trivial changes in all language files, so no warnings are printed on compilation:
    - Remove STR_REPLACE_VEHICLES_WHITE: not needed anymore.
    - Add STR_REPLACE_VEHICLES_CAPTION: only consists of control codes. nothing to translate
    - Insert {skip}{skip} in STR_REPLACE_REMOVE_WAGON and STR_REPLACE_ENGINE_WAGON_SELECT: the translations are still valid.
    - Remove STR_GROUP_REPLACE_CAPTION: meaning changed, must be translated again.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1117#comment2452

@DorpsGek
Copy link
Member Author

michi_cc closed the ticket.

Reason for closing: Implemented

A different patch achieving the wanted behaviour was applied in r24140.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1117

@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant