Merge lp://staging/~widelands-dev/widelands/bug-1786613-10s-return-skipped into lp://staging/widelands
Status: | Superseded | ||||
---|---|---|---|---|---|
Proposed branch: | lp://staging/~widelands-dev/widelands/bug-1786613-10s-return-skipped | ||||
Merge into: | lp://staging/widelands | ||||
Diff against target: |
33 lines (+9/-7) 1 file modified
src/logic/map_objects/tribes/productionsite.cc (+9/-7) |
||||
To merge this branch: | bzr merge lp://staging/~widelands-dev/widelands/bug-1786613-10s-return-skipped | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
hessenfarmer | Pending | ||
Review via email: mp+353437@code.staging.launchpad.net |
This proposal supersedes a proposal from 2018-08-13.
This proposal has been superseded by a proposal from 2018-08-20.
Commit message
check for whether the program name is work or not.
Description of the change
I went a different route now. I did some logging and I figured out that the program is only labeled "work" when it calls other programs. Checking for the program name would solve this. there is one catch though. The main work program in the lua files should call a sub program to make this work. this is the case for e.g. Farms, Shipyard, Metalworkshop, etc. There only the unconditioned "return=skipped" needs to be removed.
Productionssites that only have work as a program need to be modified. E.g. the barbarians bakery currently looks like this:
programs = {
work = {
-- TRANSLATORS: Completed/
descname = pgettext(
actions = {
}
},
},
Should then look like this:
programs = {
work = {
-- TRANSLATORS: Completed/
descname = _"working",
actions = {
}
},
bake_bread = {
descname = pgettext(
actions = {
}
},
},
This of course needs to be done for all other buildings as well. It would also unify the way production programs are called. Work then would always call the "sub-programs" for all buildings. Not only the ones that produce only one ware or have the working routine split for other reasons.
Continuous integration builds have changed state:
Travis build 3782. State: failed. Details: https:/ /travis- ci.org/ widelands/ widelands/ builds/ 415390227. /ci.appveyor. com/project/ widelands- dev/widelands/ build/_ widelands_ dev_widelands_ bug_1786613_ 10s_return_ skipped- 3581.
Appveyor build 3581. State: success. Details: https:/