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

"Ungrouped vehicles" in group gui #915

Closed
DorpsGek opened this issue Jun 22, 2007 · 4 comments
Closed

"Ungrouped vehicles" in group gui #915

DorpsGek opened this issue Jun 22, 2007 · 4 comments
Labels
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

matze opened the ticket and wrote:

r10263

This patch adds a group "Ungrouped vehicles" to the group interface, and treats it like a regular group with the exception of the replacement protection. I think it would be nice to provide this per default with the group interface as it sometimes makes organizing easier. It maybe also fixes # 911.

Thread in forum

Reported version: trunk
Operating system: All


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

matze wrote:

Added patch. Sorry for the borked link above.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/915#comment1415

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Putting all vehicles that are not in a "valid" group in the "all" group seems very counterintuitive to me. I would recommend to just use "DEFAULT_GROUP" as way to mark the vehicle as ungrouped.


This comment was imported from FlySpray: https://bugs.openttd.org/task/915#comment1488

@DorpsGek
Copy link
Member Author

matze wrote:

I thought I left that untouched, vehicles not assigned to a group struct are still put in the DEFAULT_GROUP (and ALL_GROUP should never get assigned to a vehicle; maybe I'm misunderstanding all this). Are you referring to these lines in the patch:

Index: src/engine.cpp

--- src/engine.cpp (revision 10267)
+++ src/engine.cpp (working copy)
@@ -490,7 +490,7 @@

  er->to = INVALID_ENGINE;
  er->next = NULL;

- er->group_id = DEFAULT_GROUP;
+ er->group_id = ALL_GROUP;
return er;
}

I replaced the group of the engine replacements for all vehicles by the ALL_GROUP, and use the replacements of DEFAULT_GROUP for vehicles with this group (=ungrouped vehicles). I did the same for the GUI, where DEFAULT_GROUP was used to refer to all vehicles.

Attached updated version (update to r10387 and cleanup, documentation/comments fixed to match changes)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/915#comment1504

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Implemented

In r10567


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

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Vehicles 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
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