Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ware x is missing and mine exhausted #2027

Closed
bunnybot opened this issue Sep 9, 2019 · 3 comments
Closed

ware x is missing and mine exhausted #2027

bunnybot opened this issue Sep 9, 2019 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@bunnybot
Copy link

bunnybot commented Sep 9, 2019

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.


Imported from Launchpad using lp2gh.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by stonerl)
My naive idea was to not execute this:

https://bazaar.launchpad.net/~widelands-dev/widelands/trunk/view/head:/src/logic/map_objects/tribes/production_program.cc#L919

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){
ps.set_production_result(result_string);
}

Does ps.production_result() get me there?

@hessenfarmer what do you think

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by stonerl)
ps.production_result() just outputs the translated text.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by stephan-lutz)
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()) {
ps.set_production_result(result_string);
}

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

@bunnybot bunnybot added this to the build21-rc1 milestone Sep 9, 2019
@gunchleoc gunchleoc added enhancement New feature or request launchpad_done and removed Wishlist labels Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants