← Back to team overview

widelands-dev team mailing list archive

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

 

Barbarian Ferry Yard needs cloth to build, but there is no Weaving Mill, because that building needs seafaring.

It would be nice to have some indicators for the range when building a new waterway - I think we best wait with that until after we have the new work areas, because there could be some common code there. It would also be nice to have visual indicators for established waterways as an overlay.

Can you please remove the ferry animations except for the first frame each? They cause the diff to be truncated, because there are so many of them. Since they are just placeholders, 1 frame should be good enough for visual quality.

Code review of the bits that I can see is done.

Diff comments:

> 
> === modified file 'data/scripting/mapobjects.lua'
> --- data/scripting/mapobjects.lua	2017-02-08 18:48:32 +0000
> +++ data/scripting/mapobjects.lua	2019-03-19 09:56:51 +0000
> @@ -31,13 +31,30 @@
>  --    :arg basename: The basename of the animation files. The filenames of the animation files need to have the format ``<basename>_(e|ne|se|sw|w|nw)_\d+.png``
>  --    :arg hotspot: The hotspot coordinates for blitting, e.g. ``{ 2, 20 }``.
>  --    :arg fps: Frames per second. Only use this if the animation has more than 1 frame, and if you need to deviate from the default frame rate.
> -function add_walking_animations(table, animationname, dirname, basename, hotspot, fps)
> -   if (fps ~= nil) then
> -      for idx, dir in ipairs{ "ne", "e", "se", "sw", "w", "nw" } do
> -         table[animationname .. "_" .. dir] = {
> -            pictures = path.list_files(dirname .. basename .. "_" .. dir ..  "_??.png"),
> -            hotspot = hotspot,
> -            fps = fps,
> +function add_walking_animations(table, animationname, dirname, basename, hotspot, fps, scale)
> +   if (fps ~= nil and scale ~= nil) then
> +      for idx, dir in ipairs{ "ne", "e", "se", "sw", "w", "nw" } do
> +         table[animationname .. "_" .. dir] = {
> +            pictures = path.list_files(dirname .. basename .. "_" .. dir ..  "_??.png"),
> +            hotspot = hotspot,
> +            fps = fps,
> +            scale = scale,
> +         }
> +      end
> +   elseif (fps ~= nil) then
> +      for idx, dir in ipairs{ "ne", "e", "se", "sw", "w", "nw" } do
> +         table[animationname .. "_" .. dir] = {
> +            pictures = path.list_files(dirname .. basename .. "_" .. dir ..  "_??.png"),
> +            hotspot = hotspot,
> +            fps = fps,
> +         }
> +      end
> +   elseif (scale ~= nil) then

scale is deprecated, because it will be replaced by mipmaps.

> +      for idx, dir in ipairs{ "ne", "e", "se", "sw", "w", "nw" } do
> +         table[animationname .. "_" .. dir] = {
> +            pictures = path.list_files(dirname .. basename .. "_" .. dir ..  "_??.png"),
> +            hotspot = hotspot,
> +            scale = scale,
>           }
>        end
>     else
> 
> === modified file 'data/tribes/atlanteans.lua'
> --- data/tribes/atlanteans.lua	2018-07-29 13:49:09 +0000
> +++ data/tribes/atlanteans.lua	2019-03-19 09:56:51 +0000
> @@ -20,7 +20,9 @@
>  --
>  --    **animations**: Global animations. Contains subtables for ``frontier`` and ``flag``. Each animation needs the parameters ``pictures`` (table of filenames) and ``hotspot`` (2 integer coordinates), and may also define ``fps`` (integer frames per second).
>  --
> ---    **roads**: The file paths for the tribes' road textures in 2 subtables ``busy`` and ``normal``
> +--    **roads**: The file paths for the tribe's road textures in 3 subtables ``busy``, ``normal`` and ``waterway``.
> +--
> +--    **resource_indicators**: The names for the resource indicators. This table contains a subtable for each resource name plus a subtable named "" for no resources. Each subtable is an array, in which the index of each entry is the highest amount of resources the indicator may indicate.

Duplicate - remove

>  --
>  --    **resource_indicators**: The names for the resource indicators. This table contains a subtable for each resource name plus a subtable named "" for no resources. Each subtable is an array, in which the index of each entry is the highest amount of resources the indicator may indicate.
>  --
> @@ -73,6 +77,34 @@
>           "tribes/images/atlanteans/roadt_normal_00.png",
>           "tribes/images/atlanteans/roadt_normal_01.png",
>        },
> +      waterway = {
> +         "tribes/images/atlanteans/waterway_0.png",
> +      },
> +   },
> +
> +   resource_indicators = {

Duplicate - remove

> +      [""] = {
> +         [0] = "atlanteans_resi_none",
> +      },
> +      coal = {
> +         [10] = "atlanteans_resi_coal_1",
> +         [20] = "atlanteans_resi_coal_2",
> +      },
> +      iron = {
> +         [10] = "atlanteans_resi_iron_1",
> +         [20] = "atlanteans_resi_iron_2",
> +      },
> +      gold = {
> +         [10] = "atlanteans_resi_gold_1",
> +         [20] = "atlanteans_resi_gold_2",
> +      },
> +      stones = {
> +         [10] = "atlanteans_resi_stones_1",
> +         [20] = "atlanteans_resi_stones_2",
> +      },
> +      water = {
> +         [100] = "atlanteans_resi_water",
> +      },
>     },
>  
>     resource_indicators = {
> 
> === modified file 'data/tribes/barbarians.lua'
> --- data/tribes/barbarians.lua	2018-07-29 13:49:09 +0000
> +++ data/tribes/barbarians.lua	2019-03-19 09:56:51 +0000
> @@ -24,6 +24,34 @@
>           "tribes/images/barbarians/roadt_normal_00.png",
>           "tribes/images/barbarians/roadt_normal_01.png",
>        },
> +      waterway = {
> +         "tribes/images/barbarians/waterway_0.png",
> +      },
> +   },
> +
> +   resource_indicators = {

duplicate - remove

> +      [""] = {
> +         [0] = "barbarians_resi_none",
> +      },
> +      coal = {
> +         [10] = "barbarians_resi_coal_1",
> +         [20] = "barbarians_resi_coal_2",
> +      },
> +      iron = {
> +         [10] = "barbarians_resi_iron_1",
> +         [20] = "barbarians_resi_iron_2",
> +      },
> +      gold = {
> +         [10] = "barbarians_resi_gold_1",
> +         [20] = "barbarians_resi_gold_2",
> +      },
> +      stones = {
> +         [10] = "barbarians_resi_stones_1",
> +         [20] = "barbarians_resi_stones_2",
> +      },
> +      water = {
> +         [100] = "barbarians_resi_water",
> +      },
>     },
>  
>     resource_indicators = {
> === modified file 'data/tribes/empire.lua'
> --- data/tribes/empire.lua	2018-07-29 13:49:09 +0000
> +++ data/tribes/empire.lua	2019-03-19 09:56:51 +0000
> @@ -27,6 +27,34 @@
>           "tribes/images/empire/roadt_normal_01.png",
>           "tribes/images/empire/roadt_normal_02.png",
>        },
> +      waterway = {
> +         "tribes/images/empire/waterway_0.png",
> +      },
> +   },
> +
> +   resource_indicators = {

duplicate, remove

> +      [""] = {
> +         [0] = "empire_resi_none",
> +      },
> +      coal = {
> +         [10] = "empire_resi_coal_1",
> +         [20] = "empire_resi_coal_2",
> +      },
> +      iron = {
> +         [10] = "empire_resi_iron_1",
> +         [20] = "empire_resi_iron_2",
> +      },
> +      gold = {
> +         [10] = "empire_resi_gold_1",
> +         [20] = "empire_resi_gold_2",
> +      },
> +      stones = {
> +         [10] = "empire_resi_stones_1",
> +         [20] = "empire_resi_stones_2",
> +      },
> +      water = {
> +         [100] = "empire_resi_water",
> +      },
>     },
>  
>     resource_indicators = {
> 
> === modified file 'data/tribes/frisians.lua'
> --- data/tribes/frisians.lua	2018-10-19 14:27:06 +0000
> +++ data/tribes/frisians.lua	2019-03-19 09:56:51 +0000
> @@ -25,6 +25,34 @@
>           "tribes/images/frisians/roadt_normal_00.png",
>           "tribes/images/frisians/roadt_normal_01.png",
>        },
> +      waterway = {
> +         "tribes/images/frisians/waterway_0.png",
> +      },
> +   },
> +
> +   resource_indicators = {

duplicate, remove

> +      [""] = {
> +         [0] = "frisians_resi_none",
> +      },
> +      coal = {
> +         [10] = "frisians_resi_coal_1",
> +         [20] = "frisians_resi_coal_2",
> +      },
> +      iron = {
> +         [10] = "frisians_resi_iron_1",
> +         [20] = "frisians_resi_iron_2",
> +      },
> +      gold = {
> +         [10] = "frisians_resi_gold_1",
> +         [20] = "frisians_resi_gold_2",
> +      },
> +      stones = {
> +         [10] = "frisians_resi_stones_1",
> +         [20] = "frisians_resi_stones_2",
> +      },
> +      water = {
> +         [100] = "frisians_resi_water",
> +      },
>     },
>  
>     resource_indicators = {


-- 
https://code.launchpad.net/~widelands-dev/widelands/ferry/+merge/351880
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/ferry into lp:widelands.


References