Merge lp://qastaging/~widelands-dev/widelands/failed_skipped_10s into lp://qastaging/widelands

Proposed by Toni Förster
Status: Merged
Merged at revision: 9133
Proposed branch: lp://qastaging/~widelands-dev/widelands/failed_skipped_10s
Merge into: lp://qastaging/widelands
Diff against target: 393 lines (+44/-43)
7 files modified
data/tribes/buildings/productionsites/barbarians/helmsmithy/init.lua (+3/-0)
data/tribes/buildings/productionsites/barbarians/metal_workshop/init.lua (+10/-10)
data/tribes/buildings/productionsites/empire/toolsmithy/init.lua (+12/-12)
src/logic/map_objects/tribes/productionsite.cc (+7/-9)
src/logic/map_objects/tribes/productionsite.h (+4/-4)
src/map_io/map_buildingdata_packet.cc (+6/-6)
test/maps/plain.wmf/scripting/test_casern.lua (+2/-2)
To merge this branch: bzr merge lp://qastaging/~widelands-dev/widelands/failed_skipped_10s
Reviewer Review Type Date Requested Status
hessenfarmer review Approve
GunChleoc Approve
Review via email: mp+368014@code.qastaging.launchpad.net

Commit message

add failed programs to the skipped stack

don't show % for trend

move sleep behind consume in metal_workshop & toolsmithy

added sound to helmsmithy

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

Continuous integration builds have changed state:

Travis build 5079. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/538470132.
Appveyor build 4859. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_failed_skipped_10s-4859.

Revision history for this message
GunChleoc (gunchleoc) wrote :

LGTM :)

I removed the gettext function from the pure placeholder, because it does not need translation.

@bunnybot merge

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

looks good to me. However there might be some complaints about having the sound as some people (we all know) do find this annoying. However I like it.

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

Oops found some other buildings which need to be adopted to this scheme then

atlanteans crystal mine
empire marble mine, marble mine deep
frisians tailors shop, aqua farm, recycling center and eventually reindeer farm

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

Found some more. Barbarian's mines. Going to add the changes to this branch, since it won't be merged because the casern_test failed. I guess we need to adapt this test as well...

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

Hmm, there are many more. The question is. Shall we move the sleep time just behind consume, or remove sleep and add the time to the animation time, were applicable?

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

It basically affects all buildings. Most buildings have a sleep before skipped and/or consume. So we need to move them as well. But the question is, do we want to move them or add them to the animation cycle? Or at least move some seconds to the animation cycle?

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

Barbarians mines are not affected I think.

Basically the change of order is definitely necessary for all buildings with multiple outputs and different inputs needed for the outputs (best example atlantean or frisian toolsmithy).

It can be adopted (which I prefer) for buildings with multiple outputs and high sleep times (e.g. crystal mine).
It is not necessary for buildings with leading sleep times of less then 10 secs as these would been masked by the code now.
Furthermore it is not necessary for buildings with only one output as the effect of wasted time if undersupplied would been averaged over time.

That was the basis for my suggestion above.

I'd like to keep the sleep times around at least of one third to one half of the total time as it looks more natural if a building isn't busy all the time.
Having only working animations would make the screen a bit unquiet I am afraid.

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

Okay, so basically only the buildings you listed above?

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

Unless you find others for which the criteria apply, but we could change that anytime in a new branch as well.

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

Did some thinking :D

> It is not necessary for buildings with leading sleep times of less then 10
> secs as these would been masked by the code now.

> Furthermore it is not necessary for buildings with only one output as the
> effect of wasted time if undersupplied would been averaged over time.

But now in all programs that have a sleep before consume and/or skipped it will always be 10s plus sleep. E.g. the barbarian's baker has a sleep of 30 seconds before consume. Every fail would now result in 10s + 30s before for the next execution.

Even if the time would be 1 second it would now always be 10s + 1s, the first sleep never gets masked but added.

That's why I would like to have skipped the first, consume the second and sleep the third call in every program. Generally, having a sleep before consume would be a time penalty, regardless of the length.

Having every program like this would also have the benefit, that the program flow itself would be unified. A program skipped or failed means, it starts 10 second later before it would fail or skip again. Otherwise, it would be 10s plus whatever sleep time we have before consume/skip. The sleep times then would be part of a completed cycle and not a failed or skipped.

Does this sound reasonable?

> That was the basis for my suggestion above.
>
> I'd like to keep the sleep times around at least of one third to one half of
> the total time as it looks more natural if a building isn't busy all the time.
> Having only working animations would make the screen a bit unquiet I am
> afraid.

Sounds sensible.

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

On a second thought this sounds very reasonable.

especially the unifying aspect is a position I alkready took in the forum discussion so if you want to unify them all I would have no objection. But we should playtest the changes before merging in this case.

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

Okay, I'm going to set a new branch up that contains the changes to the lua files. Base will be this branch.

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

This branch fails:

test/maps/plain.wmf/scripting/test_casern.lua

How do I run the test locally?

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

Running regression tests locally:

./regression_test.py -b ./widelands

Revision history for this message
GunChleoc (gunchleoc) wrote :

This will run the whole test suite - he will only want to run the casern test when fixing.

https://wl.widelands.org/wiki/RegressionTests/

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

The 10s increase in the test fixed it. But we only need this as long as the unify_sleep_time isn't merged into branch. We can revert these changes there because sleeps aren't executed before a possible fail anymore.

@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 5095. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/538979803.

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

the inputqueues again

@bunnybot merge force

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: