100% training site production without any soldier
Bug #1212191 reported by
cghislai
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Low
|
Unassigned |
Bug Description
Since the training site productivity is indicated the same way as productionsite, the label shows 100% productivity when no soldier is trained.
The trainer program should skip if no soldier is present, so that productivity is not affected
Related branches
lp://staging/~widelands-dev/widelands/bug1212191_bug1212192
- Nasenbaer: Approve
-
Diff: 64 lines (+13/-12)2 files modifiedsrc/logic/production_program.cc (+8/-3)
src/logic/worker.cc (+5/-9)
To post a comment you must log in.
I merged your trunk + found the underlying problem: the "sleep" command returned a "success", which was counted for the statistics, as all other programs where skipped and therefore did not change the statistics, the statistics was rising to 100% quite fast.
The fix was to let the trainingsites see the sleep program as being skipped. I implemented this by a never true check for a soldier of level 9 - I had in mind that there was a "do not count" function somehwere, but I did not find it - so if there is indeed a better way to fix the behaviour, please go for it :).