Split cargos and cargo subtypes in the refit window
Moderator: OpenTTD Developers
Split cargos and cargo subtypes in the refit window
This patch tries to make finding the wanted cargo subtype in the refit window easier by showing subtypes in a separate list. Since this change could affect some NewGRF sets in unforeseen ways, it could use some testing with different NewGRF configurations. Any feedback will be welcome!
Below this text are some screenshots, you can find the diff file and a win32 build in the next post.
Below this text are some screenshots, you can find the diff file and a win32 build in the next post.
- Attachments
-
- split_refit_1.png (78.02 KiB) Viewed 11934 times
-
- split_refit_2.png (69.77 KiB) Viewed 11934 times
-
- split_refit_3.png (64.1 KiB) Viewed 11934 times
Last edited by Terkhen on 23 Apr 2010 18:58, edited 1 time in total.
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Re: Split cargos and cargo subtypes in the refit window
Diff file and win32 build:
- Attachments
-
- split_refit_r19699.diff
- (17.75 KiB) Downloaded 248 times
-
- split_refit_win32_r19700.rar
- (3.09 MiB) Downloaded 265 times
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
-
- Tycoon
- Posts: 1829
- Joined: 10 Jul 2006 00:43
- Location: Spain
Re: Split cargos and cargo subtypes in the refit window
Awesome patch.
I have a question: It's possible to enable cargo subtypes for locomotives without cargo? It would be awesome to let the user to chose between various liveries of the locomotive.
I have a question: It's possible to enable cargo subtypes for locomotives without cargo? It would be awesome to let the user to chose between various liveries of the locomotive.
Sorry if my english is too poor, I want learn it, but it isn't too easy.
- [list][*]Why use PNG screenshots in 8 bpp games.
[*]Caravan site New Industry. · Spain set. · Some spanish trains for locomotion[*]Favourites:GRVTS · ECS · FIRS
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: Split cargos and cargo subtypes in the refit window
Dose this refit the hole train or parts of it?
For Community Integrated Version http://code.google.com/p/civopenttd/
Re: Split cargos and cargo subtypes in the refit window
To my knowlegde, you need a dummy special cargo to do that (like NARS regearing).maquinista wrote:It's possible to enable cargo subtypes for locomotives without cargo? It would be awesome to let the user to chose between various liveries of the locomotive.
That behaviour is not changed by this patch (it will work exactly as it does in 1.0.0 / trunk).2007Alain2007 wrote:Dose this refit the hole train or parts of it?
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: Split cargos and cargo subtypes in the refit window
Thank you Terkhen for getting back to me
For Community Integrated Version http://code.google.com/p/civopenttd/
Re: Split cargos and cargo subtypes in the refit window
Works with:
Aviators aircraft (version tested 1.7)
World Airliners
Long Vehicles V4
Japanese Train Set 2.1a (Shinkansen - 0 Series, 100, 700, 200 and some DMU from normal railtype)
Planeset 1.5.3 (A380 L, Antonov An-124 Ruslan L, Boeing 747 L, Boeing 747 L EUD, Boeing 777 L Passangers only, Douglas DC-6 S Passangers only, Boeing Commercial Chinook H Goods only)
Grf sets with no refitting subtypes:
2cc trainset 1.0.1
2cc chimaera
Hankyu rail set
Japanese Maglev Set 0.1
Spain Set Taster 1.28
UK Renewal Train Set v3.04 and add-ons0.4
Dutch Trainset Alpha 1.1
HEQS r318
Newships
A New Monorail Set 0.3
i didnt find any problems. tested one set at the time. i will try other sets later.
Aviators aircraft (version tested 1.7)
World Airliners
Long Vehicles V4
Japanese Train Set 2.1a (Shinkansen - 0 Series, 100, 700, 200 and some DMU from normal railtype)
Planeset 1.5.3 (A380 L, Antonov An-124 Ruslan L, Boeing 747 L, Boeing 747 L EUD, Boeing 777 L Passangers only, Douglas DC-6 S Passangers only, Boeing Commercial Chinook H Goods only)
Grf sets with no refitting subtypes:
2cc trainset 1.0.1
2cc chimaera
Hankyu rail set
Japanese Maglev Set 0.1
Spain Set Taster 1.28
UK Renewal Train Set v3.04 and add-ons0.4
Dutch Trainset Alpha 1.1
HEQS r318
Newships
A New Monorail Set 0.3
i didnt find any problems. tested one set at the time. i will try other sets later.
Last edited by ColdIce on 24 Apr 2010 09:37, edited 9 times in total.
The rest is confetti!
Re: Split cargos and cargo subtypes in the refit window
What do you mean with "No support"? No support for refitting inside the set, or no support from this patch?
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Re: Split cargos and cargo subtypes in the refit window
I mean that the window doesnt split. No support from this pacth.
- Attachments
-
- refit.png (23.08 KiB) Viewed 11792 times
The rest is confetti!
Re: Split cargos and cargo subtypes in the refit window
Those cargos have no refitting subtypes: the window does not need to split for them.
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
-
- Tycoon
- Posts: 1829
- Joined: 10 Jul 2006 00:43
- Location: Spain
Re: Split cargos and cargo subtypes in the refit window
This patch is awesome, It removes the clutter in the refit window when you have passengers and tourists.
- Attachments
-
- Window without patch.
- Chundworth Transport, 5th Jan 1995.png (62.58 KiB) Viewed 11746 times
-
- Window with patch.
- Chundworth Transport, 1st Feb 1995.png (57.23 KiB) Viewed 11746 times
Sorry if my english is too poor, I want learn it, but it isn't too easy.
- [list][*]Why use PNG screenshots in 8 bpp games.
[*]Caravan site New Industry. · Spain set. · Some spanish trains for locomotion[*]Favourites:GRVTS · ECS · FIRS
Re: Split cargos and cargo subtypes in the refit window
Is it planned to include it into trunk?
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: Split cargos and cargo subtypes in the refit window
Not at its current state. There were some talks about this patch on the IRC channel and the conclusion was that a tree view would suit this feature better. I don't plan to code that view until I finish some university work, so don't expect news about this feature on my part in the next few months. As always: anyone should feel free to work on this.
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Re: Split cargos and cargo subtypes in the refit window
Hello Therken,
You may probably already have read about it but I will report anyway.
Unfortunately I have found a way to crash you patch.
If you have the refit window open the game crashes while removing the wagons from the locomotive.
I could reproduce it in your patch against r19699 as well as in my patchpack.
In clean trunk the refit window is cleared of options. In your patch not resulting in the crash.
If you want I can provide a crashlog but the bug is very easy to reproduce so I think it is not necessary. Do ask for one if you feel otherwise.
In my bumped version (see chill's patchpack v8) it is sometimes impossible to select refit options until the refit gui is resized.
This I could not reproduce in your clean patch against r19699. It is possible that I have forgotten something or did something wrong while bumping so you may want to ignore this.
I just mention it for completeness.
Also in my current patchpak (not posted yet) the patch needs some adjustment to current trunk which I have not yet done completely ... so I did not test yet against current trunk.
All of the above tested with NARS 2.03 from the ingame content download while refitting woodwagons.
Regards,
ChillCore.
ps: Good luck with your university work
You may probably already have read about it but I will report anyway.
Unfortunately I have found a way to crash you patch.
If you have the refit window open the game crashes while removing the wagons from the locomotive.
I could reproduce it in your patch against r19699 as well as in my patchpack.
In clean trunk the refit window is cleared of options. In your patch not resulting in the crash.
If you want I can provide a crashlog but the bug is very easy to reproduce so I think it is not necessary. Do ask for one if you feel otherwise.
In my bumped version (see chill's patchpack v8) it is sometimes impossible to select refit options until the refit gui is resized.
This I could not reproduce in your clean patch against r19699. It is possible that I have forgotten something or did something wrong while bumping so you may want to ignore this.
I just mention it for completeness.
Also in my current patchpak (not posted yet) the patch needs some adjustment to current trunk which I have not yet done completely ... so I did not test yet against current trunk.
All of the above tested with NARS 2.03 from the ingame content download while refitting woodwagons.
Regards,
ChillCore.
ps: Good luck with your university work
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Re: Split cargos and cargo subtypes in the refit window
That crash is probably caused by a wrong list of cargos after altering the train. If this is the case, the issue can be solved by calling InvalidateWindowData(..., ..., 0) for this window at Train::ConsistChanged(). Thank you for the report, I'll take it into account when I redo this patch.
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Re: Split cargos and cargo subtypes in the refit window
Thank you, for the hint it is fixed now.
Here is what I changed at the end of Train::ConsistChanged(bool same_lenght) in train cmd.cpp.
Should the vehicle details move too or can they stay where they are ?
Here is what I changed at the end of Train::ConsistChanged(bool same_lenght) in train cmd.cpp.
Code: Select all
from
-----
if (this->IsFrontEngine()) {
this->UpdateAcceleration();
SetWindowDirty(WC_VEHICLE_DETAILS, this->index);
- InvalidateWindowData(WC_VEHICLE_REFIT, this->index);
- }
into:
----
if (this->IsFrontEngine()) {
this->UpdateAcceleration();
SetWindowDirty(WC_VEHICLE_DETAILS, this->index);
+ }
+ /* Always invalidate the refit gui data when consist changes. */
+ InvalidateWindowData(WC_VEHICLE_REFIT, this->index);
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
- Vaulter
- Traffic Manager
- Posts: 185
- Joined: 21 Dec 2004 05:35
- Skype: andrey-zaharov
- Location: St. Petersburg, Russia
- Contact:
Re: Split cargos and cargo subtypes in the refit window
Here is fix for bug with scrolled down cargo matrix:
at
should be
not this->vscroll.GetPosition();
at
Code: Select all
RefitWindow::OnClick
Code: Select all
case VRW_SUBTYPE_MATRIX: { // Subtype listbox.
Code: Select all
uint position = (y / (int)this->resize.step_height) + this->vscroll2.GetPosition();
Who is online
Users browsing this forum: No registered users and 3 guests