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

Filter by cargo #1941

Closed
DorpsGek opened this issue Apr 19, 2008 · 20 comments
Closed

Filter by cargo #1941

DorpsGek opened this issue Apr 19, 2008 · 20 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

gule opened the ticket and wrote:

With this patch you can filter, by drop down, vehicles by cargo in build new vehicle window.

Attachments

Reported version: trunk
Operating system: All


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

gule wrote:

I updated this patch to trunk version 13085.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment4132

@DorpsGek
Copy link
Member Author

DorpsGek commented Aug 5, 2008

George wrote:

when will this patch go into trunk?


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment4538

@DorpsGek
Copy link
Member Author

George wrote:

BTW, does it take into account, that a vehicle can be refittable to the selected cargo?


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment4891

@DorpsGek
Copy link
Member Author

gule wrote:

Yes.
If you are intersted in it, I can update it to current trunk.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment4917

@DorpsGek
Copy link
Member Author

George wrote:

I'd prefer to see it in the trunk. What is required to move it to the trunk?


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment4926

@DorpsGek
Copy link
Member Author

gule wrote:

I do not know. I did'n get any comments from developers.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment4930

@DorpsGek
Copy link
Member Author

frosch wrote:

just a short look:
- refit_mask is not always valid for ships
- articulated vehicles can carry different cargos
in short, use GetUnionOfArticulatedRefitMasks()


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment4939

@DorpsGek
Copy link
Member Author

sbr wrote:

Hi,

Patch was updated by gule to r14564 (http://www.tt-forums.net/viewtopic.php?p=683525# p683525).

I update it to r14578 adding the following changes:
- [FIX] use GetUnionOfArticulatedRefitMasks as explained by frosch
- [FIX] clean an 'array subscript below array bounds' gcc warning
- Add a 'None' criteria at the end of the cargo list to select train vehicules that have no capacity

I also attach a second patch (build-and-refit_r14578.patch) that should be applied on top of filter-by-cargo_r14578.patch.
These two patches combined made an up-to-date version of the original patch by gule (http://www.tt-forums.net/viewtopic.php?p=657282# p657282).
The 'build-and-refit' button is only visible when the window was opened from a depot and a cargo other than 'all' or 'none' is selected.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment5021

@DorpsGek
Copy link
Member Author

George wrote:

How does it go?


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment5155

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 8, 2009

Timitry wrote:

Any chance for trunk inclusion? :)


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment5243

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 6, 2009

Roujin wrote:

Since a framework for filtering GUILists is now in trunk, this patch should be updated to make use of the new functions. I guess it will also have better chance of trunk inclusion then ;)


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment5527

@DorpsGek
Copy link
Member Author

George wrote:

PLEASE! after r15541 this patch becomes very important. Please, help it to go to the trunk!


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment5646

@DorpsGek
Copy link
Member Author

planetmaker wrote:

not changed. but updated for r15591. But I think Roujin has a very valid point there :)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment5687

@DorpsGek
Copy link
Member Author

DorpsGek commented Mar 7, 2009

George wrote:

What is the current state?


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment5715

@DorpsGek
Copy link
Member Author

planetmaker wrote:

update to trunk r15691 without functional changes... still needs the work Roujin pointed out

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment5763

@DorpsGek
Copy link
Member Author

frosch wrote:

some other intermediate version of this patch can be found in #2196


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment5813

@DorpsGek
Copy link
Member Author

sbr wrote:

I've rewrited the filter-by-cargo patch against r15778 using GUIList filtering capacities and CanCarryCargo()/GetUnionOfArticulatedRefitMasks().

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment5830

@DorpsGek
Copy link
Member Author

sbr wrote:

Update to r15832 with nested widgets definition.

Also attached is a patch that automatically refit the builded engine if we're filtering on a specific cargo that isn't the default one of the engine.
In that case, the "Build Vehicle" button show a "Build and Refit Vehicle" text and tooltip. The displayed cost is then equals to the original cost augmented by the refit cost.
This patch should be applied on top of the first one.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment5836

@DorpsGek
Copy link
Member Author

sbr wrote:

Updated to r15833 and:
- fix nested widgets definition regarding resize parameters
- only show special cargoes (CC_SPECIAL) for rail vehicles
- only show 'None' criteria for rail vehicles

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1941#comment5837

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Implemented

in r16042. Build&Refit might follow later, when newgrf support is ready for that.


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

@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