Moderator: OpenTTD Developers
If you have some group selected, only vehicles out of this group are considered. For example, you may select "all trains", choose "Group old Vehicles". Select the new group and choose "Group vehicles with negative income" - you will get a group with vehicles that are both old and have negative income.
Works for all vehicle types, of course.
Old behavior is untouched: if you just click the "new group" graphical button, you will notice no changes.
It's a simple yet powerful patch. Have fun
- group_by_property.png (58.44 KiB) Viewed 2097 times
- (9.42 KiB) Downloaded 121 times
I can see much potential in the former idea, with an option to transform it to a full-fledged group.
Sorry for requesting stuff without even having tested your patch first, but I'm not in a position to test it right now and the thought just popped to my head.
I have one small issue, namely one warning generated on compiling with it:
Code: Select all
~/svn/ottd-testing/src/group_gui.cpp: In function ‘void CcCreateGroup(bool, TileIndex, uint32, uint32)’: ~/svn/ottd-testing/src/group_gui.cpp:775: warning: comparison between signed and unsigned integer expressions
It does take the vehicles fitting the criteria out of their current group (if any) and put them into a new full-fledged group. Note: only the current selected group is considered. So if you select "ungrouped vehicles", it won't touch any custom group.Roujin wrote:Does it create a virtual, temporary group, or does it take the vehicles fitting the criteria out of their current group (if any) and put them into a new full-fledged group?
Thanks Gremnon! I don't get this warning and I see two possible reasons for that warning in that code line. I removed one of them (and making the code a little prettier in the same step). Could you test it again? Update see first post.Gremnon wrote:warning generated on compiling with it
Users browsing this forum: No registered users and 3 guests