Comment 8 for bug 1480961

Revision history for this message
kaputtnik (franku) wrote :

As i understand the code right the ui for "configure economy" is in transport_ui.cc and the code to hide some entries is always there. Here it is checked for has_demand_check() which itself returns a property depending on default_target_quantity (defined in init.lua of the ware. The function default_target_quantity(tribename) checks the init.lua and returns the amount of wares (=initial value for the entry in "configure economy"). If there is no tribename the return value is kInvalidWare. See

http://bazaar.launchpad.net/~widelands-dev/widelands/trunk/view/head:/src/logic/map_objects/tribes/ware_descr.cc#L66

Because all wares have entries for the tribes in the table "default_target_quantity", the retu8rn value is never kInvalidWare and so all ware are displayed in "configure economy".

So it would be enough to remove the tribenames and the coresponding values in the init.lua files, so that the function default_target_quantity() returns kInvalidWare.

The result looks a bit wired, because there are some wholes in the menu for wares, but i think this is intended (in the workers tab the second carrier is also on the same place like in the wares menu) See attached screenshot.