The International Simutrans Forum

Development => Technical Documentation => Topic started by: hreintke on May 07, 2017, 01:08:48 PM

Title: Factories with distrubution_weight=0 and factory building
Post by: hreintke on May 07, 2017, 01:08:48 PM
Hi,

In the factory building option of the map editing tools, factories with a distribution weight set to zero are not shown.
I'd like to have them included to be able to have factories which are not build automatic but can be added manually.

Can't find the location in the source where this list is created and displayed.
Anyone knows where that is done ?
Title: Re: Factories with distrubution_weight=0 and factory building
Post by: Dwachs on May 07, 2017, 02:01:04 PM
see gui/factory_edit.cc and factory_edit_frame_t::fill_list
Title: Re: Factories with distrubution_weight=0 and factory building
Post by: hreintke on May 07, 2017, 02:32:56 PM
Thanks,
According to the comment : // DistributionWeight=0 is obsoleted item, only for backward compatibility
That is why is doesn't show up.
Title: Re: Factories with distrubution_weight=0 and factory building
Post by: Ters on May 07, 2017, 06:48:18 PM
For debugging purposes, it might be useful to be able to build obsolete factories as well, although it can be done the slow and normal way.
Title: Re: Factories with distrubution_weight=0 and factory building
Post by: hreintke on May 08, 2017, 06:37:07 AM
Second thought,
Shouldn't obsolete factories be shown when the button "use timeline year" is unchecked ?
In that case, not showing them is a bug.
Title: Re: Factories with distrubution_weight=0 and factory building
Post by: An_dz on May 08, 2017, 07:29:39 AM
Yes, I believe they should show when that's unchecked. At least I'm used to do it, but I generally play without timeline.
Title: Re: Factories with distrubution_weight=0 and factory building
Post by: Ters on May 08, 2017, 02:47:03 PM
These obsolete factories have nothing to do with the in-game timeline. They are factories that existed in earlier version of the pak set, but with have been succeeded by other developments in later versions.