← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/mines-worldsavior into lp:widelands

 

Found another issue: For the buildings where the penalty for missing wares has been removed, the program order is now:
  "return=skipped unless economy needs <ware>",
  "consume=<wares>",
  "animate=working <time>",
  "sleep=<time>",
  "produce=<wares>"
The last two lines should be switched here for all those buildings. It´ll look strange if the building works, then nothing happens, much later after some sleeptime a ware is produced.

Diff comments:

> 
> === modified file 'data/tribes/buildings/productionsites/atlanteans/coalmine/init.lua'
> --- data/tribes/buildings/productionsites/atlanteans/coalmine/init.lua	2017-09-03 07:59:51 +0000
> +++ data/tribes/buildings/productionsites/atlanteans/coalmine/init.lua	2018-07-24 09:41:57 +0000
> @@ -57,17 +57,23 @@
>           -- TRANSLATORS: Completed/Skipped/Did not start mining coal because ...
>           descname = _"mining coal",
>           actions = {
> -            "sleep=45000",
> +            "sleep=40000",
>              "return=skipped unless economy needs coal",
>              "consume=smoked_fish,smoked_meat:2 atlanteans_bread:2",
>              "animate=working 20000",
> -            "mine=coal 4 100 5 2",
> -            "produce=coal:2",
> -            "animate=working 20000",
> -            "mine=coal 4 100 5 2",
> -            "produce=coal:2",
> -            "animate=working 20000",
> -            "mine=coal 4 100 5 2",
> +            "animate=working 20000",    
> +            "animate=working 20000",
> +            "mine=coal 4 100 35 2",
> +            "produce=coal",
> +            "sleep=2500",
> +            "mine=coal 4 100 1 2",
> +            "mine=coal 4 100 1 2",
> +            "mine=coal 4 100 1 2",
> +            "produce=coal:3",

There are two sets of three commands each, so the chance that a given mine will encounter the bug is high. But as it can happen only once per mine, I guess you´re right, it´s acceptable.

A comment should be put in the code to document this.

> +            "sleep=2500",    
> +            "mine=coal 4 100 1 2",
> +            "mine=coal 4 100 1 2",
> +            "mine=coal 4 100 1 2",
>              "produce=coal:3"
>           }
>        },
> 
> === modified file 'data/tribes/buildings/productionsites/frisians/coalmine/init.lua'
> --- data/tribes/buildings/productionsites/frisians/coalmine/init.lua	2018-07-19 09:40:06 +0000
> +++ data/tribes/buildings/productionsites/frisians/coalmine/init.lua	2018-07-24 09:41:57 +0000
> @@ -69,6 +69,7 @@
>              "consume=ration",
>              "animate=working 40000",

+1
I wouldn´t make it faster than 30000 though

>              "mine=coal 3 50 5 20",
> +            "mine=coal 3 50 100 20",
>              "produce=coal:2"
>           }
>        },
> 
> === modified file 'data/tribes/buildings/productionsites/frisians/goldmine_deep/init.lua'
> --- data/tribes/buildings/productionsites/frisians/goldmine_deep/init.lua	2018-07-19 09:40:06 +0000
> +++ data/tribes/buildings/productionsites/frisians/goldmine_deep/init.lua	2018-07-24 09:41:57 +0000
> @@ -63,15 +63,22 @@
>           -- TRANSLATORS: Completed/Skipped/Did not start mining gold because ...
>           descname = _"mining gold",
>           actions = {
> -            "sleep=40000",
> -            "return=skipped unless economy needs gold_ore",
> +            "sleep=39800",
> +            "return=skipped unless economy needs coal",
>              "consume=meal",
> -            "animate=working 18000",
> -            "mine=gold 3 100 10 5",
> -            "produce=gold_ore:2",
> -            "animate=working 18000",
> -            "mine=gold 3 100 10 5",
> -            "produce=gold_ore:2"
> +            "animate=working 19000",
> +            "animate=working 19000",
> +            "animate=working 19000",
> +            "mine=gold 3 100 50 5",
> +            "produce=gold",
> +            "sleep=2000",
> +            "mine=gold 3 100 1 5",
> +            "mine=gold 3 100 1 5",
> +            "produce=gold:2",
> +            "sleep=2000",
> +            "mine=gold 3 100 1 5",
> +            "mine=gold 3 100 1 5",
> +            "produce=gold:2"

+1

>           }
>        },
>     },


-- 
https://code.launchpad.net/~widelands-dev/widelands/mines-worldsavior/+merge/350716
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/mines-worldsavior.


References