News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Livery scheme selector has no meaning in timeline disabled game

Started by Ranran, December 29, 2019, 05:09:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran

This is a separate issue from the bug posted here, so I post this in a new thread.

Quote
Quote from: Spenk009 on December 19, 2019, 07:24:30 PMMay I suggest that while this receives attention, that use_timeline also acts on the selection disables the timeline of liveries and enables all? It would make pakset work easier and improve control for players wishing to build outside of timelines.
Does this mean that if you turn off the timeline, all options will be displayed, but even if you select a livery scheme, the livery will not be applied until the year of its actual appearance?
certainly, this looks like a bug, but the problem is that the livery scheme doesn't know which to choose from multiple liveries.

For example, if it has 1850's and 1870's liveries, which livery should be applied if the timeline setting is disabled?
The same goes for Vladki's proposal.
It is probably easier to choose the old one if the applicable one has not yet appeared, but it should be noted that you cannot choose any one. It is different from Vladki's desired feature, but choosing individual livery is another feature.
Since the current livery scheme system is designed with the goal of changing the livery over time (it means, you can not select obsolete liveries), adding such features may require a lot of work.

EDIT:
I may now understand Spenk009's opinion. Apparently, if the timeline setting is disabled, the choice of the livery scheme doesn't seem to work at all. It means, if the timeline is disabled, displaying the list does not make sense. I will try to fix this.

Ranran

I think I made it possible to select the livery scheme even when the timeline is off.
Try testing this  ;)
If the timeline is off, the first registered livery in the livery scheme will be applied preferentially.

jamespetts

Thank you for this work. I am afraid that I am having some trouble compiling this on Linux, however: I get the following error when compiling the latest code from the enable-livery-scheme-in-disabled-timeline-game branch:



gui/components/gui_convoy_assembler.cc: In member function 'void gui_convoy_assembler_t::build_vehicle_lists()':
gui/components/gui_convoy_assembler.cc:1078:62: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
      (info->is_retired(month_now) && ((show_retired_vehicles && info->is_obsolete(month_now, welt) ||
                                        ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gui/components/gui_convoy_assembler.cc:1182:19: error: 'class livery_scheme_t' has no member named 'is_contained'
       if (scheme->is_contained(info)) {
                   ^~~~~~~~~~~~
gui/components/gui_convoy_assembler.cc: In member function 'void gui_convoy_assembler_t::add_to_vehicle_list(const vehicle_desc_t*)':
gui/components/gui_convoy_assembler.cc:1317:33: warning: comparison is always true due to limited range of data type [-Wtype-limits]
     && (info->get_engine_type() != vehicle_desc_t::unknown && info->get_engine_type() != 255))
         ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
gui/components/gui_convoy_assembler.cc: In member function 'void gui_convoy_assembler_t::update_data()':
gui/components/gui_convoy_assembler.cc:1679:132: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

I'm sorry about it. I uploaded the missing push and confirmed that I could compile it myself.  :-[
I hope you check it again.

jamespetts

Excellent, thank you: this now works and I have incorporated it.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.