Merge lp:~widelands-dev/widelands/bugfix-buildings-tooltips into lp:widelands

Proposed by hessenfarmer
Status: Merged
Merged at revision: 9089
Proposed branch: lp:~widelands-dev/widelands/bugfix-buildings-tooltips
Merge into: lp:widelands
Diff against target: 38 lines (+9/-1)
2 files modified
src/logic/map_objects/tribes/production_program.cc (+3/-0)
src/logic/map_objects/tribes/worker.cc (+6/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands/bugfix-buildings-tooltips
Reviewer Review Type Date Requested Status
Toni Förster played Approve
GunChleoc Approve
Review via email: mp+366607@code.launchpad.net

Commit message

Fixes various bugs with buildings tooltips

Description of the change

For lumberjacks, scouts and trainingsites tooltips are now cleared if building starts working again.
Trainingsites now show completed messages

To post a comment you must log in.
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 4823. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/525342093.
Appveyor build 4604. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bugfix_buildings_tooltips-4604.

Revision history for this message
GunChleoc (gunchleoc) wrote :

1 nit, not tested yet.

9088. By hessenfarmer

adressed code review

9089. By hessenfarmer

merged trunk

9090. By hessenfarmer

Added translators hint

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

Ok adrresed code review. However .c_str() did not compile so I stood with .str() which works fine.

Have tested this and added a translators hint.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I overlooked that you were using boost::format, so c_str() is not necessary.

So, code LGTM now :)

review: Approve
9091. By GunChleoc

Fixed codecheck.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 4829. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/525646461.
Appveyor build 4610. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bugfix_buildings_tooltips-4610.

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

Thanks for the review. I would wait for an independent test review, unless you decide to already have it relying on my own testing

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

Can confirm that it is working.

Just one addition. In case of the Mines, the message "Main coal/gold/iron vein exhausted" should have the highest priority. If the vein is exhausted and no ration/snack/meal is available. The message for exhausted veins should not be replaced by the no food message.

Shall I open another bugreport for this?

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

I think I have seen already an old bugreport for this (the mines) lately. So you could search the bugs and promote this old one for b21 instead.

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

As the fix for the mines messages is more complex I'd like to have this one first.

@bunnybot merge

Revision history for this message
bunnybot (widelandsofficial) wrote :

Refusing to merge, since Travis is not green. Use @bunnybot merge force for merging anyways.

Travis build 4829. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/525646461.

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

the inputqueues test again (gcc4.8 debug this time)

@bunnybot merge force

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/logic/map_objects/tribes/production_program.cc'
2--- src/logic/map_objects/tribes/production_program.cc 2019-04-24 06:01:37 +0000
3+++ src/logic/map_objects/tribes/production_program.cc 2019-04-28 14:59:09 +0000
4@@ -1415,6 +1415,9 @@
5 throw wexception("Fail training soldier!!");
6 }
7 ps.molog(" Training done!\n");
8+ /** TRANSLATORS: Success message of a trainingsite ‘%s’ stands for the description of the training program */
9+ /** e.g. Completed upgrading soldier evade from level 0 to level 1 */
10+ ps.set_production_result((boost::format(_("Completed %s")) % ps.top_state().program->descname()).str());
11
12 upcast(TrainingSite, ts, &ps);
13 ts->training_successful(attribute, level);
14
15=== modified file 'src/logic/map_objects/tribes/worker.cc'
16--- src/logic/map_objects/tribes/worker.cc 2019-04-24 06:01:37 +0000
17+++ src/logic/map_objects/tribes/worker.cc 2019-04-28 14:59:09 +0000
18@@ -340,6 +340,9 @@
19 return true;
20 }
21 if (action.sparam1 == "immovable") {
22+ if (upcast(ProductionSite, productionsite, get_location(game))) {
23+ productionsite->unnotify_player();
24+ }
25 std::vector<ImmovableFound> list;
26 if (action.iparam2 < 0)
27 map.find_reachable_immovables(area, &list, cstep);
28@@ -2639,7 +2642,9 @@
29 */
30 bool Worker::run_scout(Game& game, State& state, const Action& action) {
31 molog(" Try scouting for %i ms with search in radius of %i\n", action.iparam2, action.iparam1);
32-
33+ if (upcast(ProductionSite, productionsite, get_location(game))) {
34+ productionsite->unnotify_player();
35+ }
36 ++state.ivar1;
37 start_task_scout(game, action.iparam1, action.iparam2);
38 // state reference may be invalid now

Subscribers

People subscribed via source and target branches

to status/vote changes: