ware x is missing and mine exhausted

Bug #1489295 reported by kaputtnik
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Won't Fix

Bug Description

In early state of game a player may not produce as many food and beverage to fill the stock of mines. So often the tooltip of exhausted mines says "Did not start mining, because ware x is missing". The tooltip "Mine exhausted" is set rarely, but in this state of game this message is much important than "ware x is missing".

It would be nice if the messages gets combined, like "No resources and no food in the mine to produce ore".

See https://wl.widelands.org/forum/topic/1788/ for discussion.

Related branches

Toni Förster (stonerl)
Changed in widelands:
milestone: none → build21-rc1
status: New → Confirmed
Revision history for this message
Toni Förster (stonerl) wrote :

My naive idea was to not execute this:


when the current overlay is out_of_resource_title. But I have no clue how to get the current overlay.

Pseudo-Code incomming:

if (overlay != out_of_resource_title){

Does ps.production_result() get me there?

@hessenfarmer what do you think

Revision history for this message
Toni Förster (stonerl) wrote :

ps.production_result() just outputs the translated text.

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

My idea was quite similar:
checking whether the highpriority Message was set / send and supressing the line identified by you.
From a quick look ps.production_result should be the correct method.

so this would result in something like

if (!ps.production_result == descr().out_of_resource_heading()) {

However I am not sure whether this will be enough cause some other code in the mines could trigger either ps.set_production_result() or ps.unnotify_player

Toni Förster (stonerl)
Changed in widelands:
assignee: nobody → Toni Förster (stonerl)
Changed in widelands:
status: Confirmed → Fix Committed
assignee: Toni Förster (stonerl) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.