Blueprint for this suggestion: https://blueprints.launchpad.net/widelands/+spec/warehouse-profile
Related bug: "Hard to empty warehouse" https://bugs.launchpad.net/widelands/+bug/722087
I suggest that warehouses need a new feature for "profiles" implemented as a tab on the warehouse window. Players sometimes use warehouses for specific tasks, rather than storing all wares. In the profiles tab there would be buttons which toggle between the standard ware storage states (none, prefer, do not store, remove) for a pre-set category of wares.
Relating to bug 722087 the profiles feature could be used to select all wares to easily change the state of all wares if the player wanted to fill or empty the warehouse
The tab could have a "Single profile only" button to make it easily select a single profile and "Do not store" wares for all other profiles. This would mean that if the player wished only food items to be stored they could click "Single profile only" button, click "Food" profile icon and all wares that are not in "Food" would automatically be set to "Do not store".
Example usage scenarios:
Scenario 1: A warehouse is no longer wanted but has lots of wares in it.
I do not think this is a scenario that happens very often but the number of mouse clicks needed means it is very time consuming and frustrating.
Current state: The player must click every single ware icon and then click "Do not store". Player's mouse is now worn out from all the clicking Anyone who has done this often enough knows that it is easy to miss icons or accidentally toggle another icon, which compounds the frustration.
With profiles feature: Player clicks on profiles tab and clicks "All wares" profile icon. Player clicks "remove" button and all wares are removed without being able to accidentally forget to select a ware or spend an hour clicking the mouse.
Scenario 2: The player builds a warehouse far away from their HQ and wants to store construction wares but nothing else.
This helps them to build far-away sites more quickly. Setting the warehouse with the current behaviour doesn't require a lot of mouse clicks but I think that players use warehouses for specific tasks often enough to make it worth considering.
Current state: The (empire) player has to click on trunks, wood, stones, marble and marble columns and click "prefer". In some cases the player may wish to prevent any other wares being stored which means many more mouse clicks are needed.
With profiles feature: Player clicks on profiles tab and clicks "Single profile only" then the "Construction" profile icon. Player clicks "prefer". This would set trunks, wood, stone, marble+columns wares to prefer and all other items as "Do not store". Player would not be able to accidentally forget to select a ware and would save time with fewer mouse clicks.
Scenario 3: The player has many mines which are far away from their food and weapon economies.
The mines need to be supplied with food but the player doesn't want any of the mined wares to be kept in the warehouse as they should be sent to the HQ. The player does not mind if other wares are stored here.
Current state: The player builds a warehouse and selects ration, meal, beer, wine and clicks "Prefer". The player has to then de-select these four wares then click stone, marble, goldstone, iron ore and coal and click "Do not store".
With profiles feature: The player clicks on profiles tab, clicks "Mining food" profile and clicks "Prefer". Player clicks on "Mined wares" profile and clicks "Do not store". The warehouse will now prefer all miner food but will send the mined wares back towards HQ where they are used/stored near the weapon economy.
Scenario 4: The player wishes to supply a mining and weapon economy more efficiently.
They have mines, smelters and weapon/armour smiths close together. The player's training sites and their main area of expansion are further away so they do not want the weapons stored here. There is no need for the mined marble or stone to be kept here as there is little construction.
Current state: Player clicks ration, meal, beer, wine, coal, goldstone, gold, iron ore, iron, cloth and wood icons and clicks "Prefer". Player clicks all of these icons again then clicks marble, stone, all weapon and armor icons and clicks "Do not store". It would be easy for the player to forget they don't need marble and stone and end up having these construction materials stored in the wrong place.
With feature: Player clicks profiles tab and clicks "Single profile only" and "Mine and weapon economy" profile icon and clicks "Prefer". All required wares are set to preferred and those which are not to be stored are "Do not store".
In addition to the profiles mentioned there could also be "Military expansion" which would have the "Construction" wares as well as being the preferred store for soldiers, preferring highly-trained soldiers. "Military training" would prefer weapons and foods for training soldiers, prohibit soldiers with maximum stats and prefer all other soldiers. This way all fully-trained soldiers would be sent to the next-preferred warehouse (the HQ, or a "military" warehouse where they are most needed) and those which need training would be stored here so they can quickly get to the training sites. "Mining foods" would prefer rations, meals, wine and beer but prohibit coal, iron/gold ore, stones and marble to ensure that the mined wares are sent to be stored or used where they prefer.