News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

allow manual construction of factories with DistributionWeight=0

Started by poppo, December 04, 2025, 08:57:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

poppo

I want to introduce the factory that cannot be constructed by automatically and can only be constructed manually.
When we set `DistributionWeight=0` for factories, we cannot build them because they are ignored in factory_edit_frame_t::fill_list(). So, I want to display `DistributionWeight=0` factories in factory_edit_frame.

But why is constructing `DistributionWeight=0` factories by hand prohibited?

prissi

distribution_weight was for factories, when were replaced by newer versions with different sizes. Loading such games and replacing old with different sizes could lead to crashes or broken games.

One could use retirement before introduction to hide such fctories in timeline gmes, but there was no way to hide these in normal games.

In the end, it was a small number of factories that were hidden this way. Seeing them in the editor would show their mismatched ugly glory, but then the public service should anyway know why it wants to build them.

r11816 will show them in the editor, if the show obsolete is selected.