widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #15572
Re: [Merge] lp:~widelands-dev/widelands/ai-hint-debug into lp:widelands
Thanks for fixing this :)
It messes up the Lua comments in the documentation code examples though - see my comments. Best move the complete comments above the line if they don't fit after.
Also, run clang-format locally to double-check that it won't get messed up again when we merge the branch, because bunnybot will execute clang-format automatically.
Diff comments:
>
> === modified file 'src/logic/map_objects/tribes/worker_program.cc'
> --- src/logic/map_objects/tribes/worker_program.cc 2018-12-13 07:24:01 +0000
> +++ src/logic/map_objects/tribes/worker_program.cc 2018-12-14 22:06:31 +0000
> @@ -363,12 +370,18 @@
>
> breed = {
> "findspace=size:any radius:7 breed resource:fish", -- Find any field that can have fish in
> -it for adding a fish to it below "walk=coords", "animate=freeing 3000", "breed=fish 1", "return"
> + it for adding a fish to it below
This line is a Lua comment, so it needs to start with --
> + "walk=coords",
> + "animate=freeing 3000",
> + "breed=fish 1",
> + "return"
> },
>
> plant = {
> "findspace=size:any radius:5 avoid:field saplingsearches:8", -- Don't get in the way of the
> -farmer's crops when planting trees. Retry 8 times. "walk=coords", "animate=dig 2000",
> + farmer's crops when planting trees. Retry 8 times.
This line is a Lua comment, so it needs to start with --
> + "walk=coords",
> + "animate=dig 2000",
> "animate=planting 1000",
> "plant=attrib:tree_sapling",
> "animate=water 2000",
> @@ -377,7 +390,10 @@
>
> plant = {
> "findspace=size:any radius:2 space", -- The farmer will want to walk to this field again
> -later for harvesting his crop "walk coords", "animate=planting 4000", "plant=attrib:seed_wheat",
> + later for harvesting his crop
This line is a Lua comment, so it needs to start with --
> + "walk=coords",
> + "animate=planting 4000",
> + "plant=attrib:seed_wheat",
> "animate=planting 4000",
> "return",
> },
> @@ -498,8 +514,12 @@
> buildship = {
> "walk=object-or-coords", -- Walk to coordinates from 1. or to object from 2.
> "plant=attrib:shipconstruction unless object", -- 2. This will create an object for us if
> -we don't have one yet "playsound=sound/sawmill sawmill 230", "animate=work 500", "construct", -- 1.
> -This will find a space for us if no object has been planted yet "animate=work 5000", "return"
> + we don't have one yet
This line is a Lua comment, so it needs to start with --
> + "playsound=sound/sawmill sawmill 230",
> + "animate=work 500", "construct", -- 1. This will find a space for us if no object has been
> + planted yet
> + "animate=work 5000",
> + "return"
> },
> */
> /**
> @@ -647,13 +667,18 @@
> "walk=coords",
> "animate=planting 4000",
> "plant=attrib:seed_wheat", -- Plant the tiny field immovable that the worker's tribe knows
> -about "animate=planting 4000", "return",
> + about
This line is a Lua comment, so it needs to start with --
> + "animate=planting 4000",
> + "return",
> },
>
> buildship = {
> "walk=object-or-coords",
> "plant=attrib:shipconstruction unless object", -- Only create a shipconstruction if we
> -don't already have one "playsound=sound/sawmill sawmill 230", "animate=work 500", "construct",
> + don't already have one
This line is a Lua comment, so it needs to start with --
> + "playsound=sound/sawmill sawmill 230",
> + "animate=work 500",
> + "construct",
> "animate=work 5000",
> "return"
> }
> @@ -744,7 +769,9 @@
> "walk=object",
> "animate=idle 1000",
> "removeobject", -- The selected eatable map object has been hunted, so remove it from the
> -map "createware=meat", "return"
> + map
This line is a Lua comment, so it needs to start with --
> + "createware=meat",
> + "return"
> }
> */
> void WorkerProgram::parse_removeobject(Worker::Action* act, const std::vector<std::string>&) {
> @@ -806,7 +833,7 @@
> "playsound=sound/hammering geologist_hammer 192",
> "animate=hacking 3000",
> "findresources" -- Plant a resource marker at the current location, according to what has
> -been found.
> + been found.
This line is a Lua comment, so it needs to start with --
> }
> */
> void WorkerProgram::parse_findresources(Worker::Action* act, const std::vector<std::string>& cmd) {
> @@ -895,9 +922,13 @@
> buildship = {
> "walk=object-or-coords", -- Walk to coordinates from 1. or to object from 2.
> "plant=attrib:shipconstruction unless object", -- 2. This will create an object for us if
> -we don't have one yet "playsound=sound/sawmill sawmill 230", "animate=work 500", "construct", -- 1.
> -Add the current ware to the shipconstruction. This will find a space for us if no shipconstruction
> -object has been planted yet "animate=work 5000", "return"
> + we don't have one yet
This line is a Lua comment, so it needs to start with --
> + "playsound=sound/sawmill sawmill 230",
> + "animate=work 500",
> + "construct", -- 1. Add the current ware to the shipconstruction. This will find a space for
> + us if no shipconstruction object has been planted yet
This line is a Lua comment, so it needs to start with --
> + "animate=work 5000",
> + "return"
> },
> */
> /**
--
https://code.launchpad.net/~widelands-dev/widelands/ai-hint-debug/+merge/360943
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/ai-hint-debug into lp:widelands.
References