← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/workarea-fixes into lp:widelands

 

Benedikt Straub has proposed merging lp:~widelands-dev/widelands/workarea-fixes into lp:widelands.

Commit message:
– Highlight the buildings the overlapping workareas belong to
– Fix behaviour of the W hotkey
– Show productionsite overlaps only for certain building types of interest

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1830345 in widelands: "overlapping workareas are very performance hungry"
  https://bugs.launchpad.net/widelands/+bug/1830345
  Bug #1830647 in widelands: "Indicate workarea border more clearly"
  https://bugs.launchpad.net/widelands/+bug/1830647

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/workarea-fixes/+merge/368342
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/workarea-fixes into lp:widelands.
=== modified file 'data/tribes/buildings/productionsites/atlanteans/armorsmithy/init.lua'
--- data/tribes/buildings/productionsites/atlanteans/armorsmithy/init.lua	2018-09-12 03:04:08 +0000
+++ data/tribes/buildings/productionsites/atlanteans/armorsmithy/init.lua	2019-06-04 16:05:14 +0000
@@ -55,6 +55,13 @@
 --        done, including any animations and sounds played.
 --        See :doc:`productionsite_program`.
 --
+--    **indicate_workarea_overlaps**
+--        *Optional*. The names of other productionsites whose workareas should be highlighted
+--        if theirs overlap with this building’s workarea while the player is placing a
+--        building of this type e.g.::
+--
+--            indicate_workarea_overlaps = { "atlanteans_farm", "atlanteans_blackroot_farm" },
+--
 --    **out_of_resource_notification**.
 --        *Optional*. This table defines the message sent by the productionsite
 --        to the player if it has run out of a resource to collect. There are 4

=== modified file 'data/tribes/buildings/productionsites/atlanteans/blackroot_farm/init.lua'
--- data/tribes/buildings/productionsites/atlanteans/blackroot_farm/init.lua	2019-05-31 12:56:36 +0000
+++ data/tribes/buildings/productionsites/atlanteans/blackroot_farm/init.lua	2019-06-04 16:05:14 +0000
@@ -42,6 +42,12 @@
       "blackroot"
    },
 
+   indicate_workarea_overlaps = {
+      "atlanteans_blackroot_farm",
+      "atlanteans_farm",
+      "atlanteans_foresters_house",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/atlanteans/coalmine/init.lua'
--- data/tribes/buildings/productionsites/atlanteans/coalmine/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/atlanteans/coalmine/init.lua	2019-06-04 16:05:14 +0000
@@ -43,6 +43,10 @@
       atlanteans_miner = 3
    },
 
+   indicate_workarea_overlaps = {
+      "atlanteans_coalmine",
+   },
+
    inputs = {
       { name = "smoked_fish", amount = 10 },
       { name = "smoked_meat", amount = 6 },

=== modified file 'data/tribes/buildings/productionsites/atlanteans/crystalmine/init.lua'
--- data/tribes/buildings/productionsites/atlanteans/crystalmine/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/atlanteans/crystalmine/init.lua	2019-06-04 16:05:14 +0000
@@ -55,6 +55,10 @@
       "granite"
    },
 
+   indicate_workarea_overlaps = {
+      "atlanteans_crystalmine",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/atlanteans/farm/init.lua'
--- data/tribes/buildings/productionsites/atlanteans/farm/init.lua	2019-05-31 12:56:36 +0000
+++ data/tribes/buildings/productionsites/atlanteans/farm/init.lua	2019-06-04 16:05:14 +0000
@@ -46,6 +46,12 @@
       "corn"
    },
 
+   indicate_workarea_overlaps = {
+      "atlanteans_blackroot_farm",
+      "atlanteans_farm",
+      "atlanteans_foresters_house",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/atlanteans/fishbreeders_house/init.lua'
--- data/tribes/buildings/productionsites/atlanteans/fishbreeders_house/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/atlanteans/fishbreeders_house/init.lua	2019-06-04 16:05:14 +0000
@@ -47,6 +47,11 @@
       },
    },
 
+   indicate_workarea_overlaps = {
+      "atlanteans_fishers_house",
+      "atlanteans_fishbreeders_house",
+   },
+
    out_of_resource_notification = {
       -- Translators: Short for "Out of ..." for a resource
       title = _"No Fish",

=== modified file 'data/tribes/buildings/productionsites/atlanteans/fishers_house/init.lua'
--- data/tribes/buildings/productionsites/atlanteans/fishers_house/init.lua	2019-06-01 11:23:15 +0000
+++ data/tribes/buildings/productionsites/atlanteans/fishers_house/init.lua	2019-06-04 16:05:14 +0000
@@ -41,6 +41,11 @@
       "fish"
    },
 
+   indicate_workarea_overlaps = {
+      "atlanteans_fishers_house",
+      "atlanteans_fishbreeders_house",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start fishing because ...

=== modified file 'data/tribes/buildings/productionsites/atlanteans/foresters_house/init.lua'
--- data/tribes/buildings/productionsites/atlanteans/foresters_house/init.lua	2019-06-02 14:04:16 +0000
+++ data/tribes/buildings/productionsites/atlanteans/foresters_house/init.lua	2019-06-04 16:05:14 +0000
@@ -37,6 +37,13 @@
       atlanteans_forester = 1
    },
 
+   indicate_workarea_overlaps = {
+      "atlanteans_blackroot_farm",
+      "atlanteans_farm",
+      "atlanteans_foresters_house",
+      "atlanteans_woodcutters_house",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start planting trees because ...

=== modified file 'data/tribes/buildings/productionsites/atlanteans/goldmine/init.lua'
--- data/tribes/buildings/productionsites/atlanteans/goldmine/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/atlanteans/goldmine/init.lua	2019-06-04 16:05:14 +0000
@@ -52,6 +52,10 @@
       "gold_ore"
    },
 
+   indicate_workarea_overlaps = {
+      "atlanteans_goldmine",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start mining gold because ...

=== modified file 'data/tribes/buildings/productionsites/atlanteans/hunters_house/init.lua'
--- data/tribes/buildings/productionsites/atlanteans/hunters_house/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/atlanteans/hunters_house/init.lua	2019-06-04 16:05:14 +0000
@@ -38,6 +38,10 @@
       "meat"
    },
 
+   indicate_workarea_overlaps = {
+      "atlanteans_hunters_house",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start hunting because ...

=== modified file 'data/tribes/buildings/productionsites/atlanteans/ironmine/init.lua'
--- data/tribes/buildings/productionsites/atlanteans/ironmine/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/atlanteans/ironmine/init.lua	2019-06-04 16:05:14 +0000
@@ -19,6 +19,10 @@
       planks = 2
    },
 
+   indicate_workarea_overlaps = {
+      "atlanteans_ironmine",
+   },
+
    animations = {
       idle = {
          pictures = path.list_files(dirname .. "idle_??.png"),

=== modified file 'data/tribes/buildings/productionsites/atlanteans/quarry/init.lua'
--- data/tribes/buildings/productionsites/atlanteans/quarry/init.lua	2019-06-02 14:45:28 +0000
+++ data/tribes/buildings/productionsites/atlanteans/quarry/init.lua	2019-06-04 16:05:14 +0000
@@ -36,6 +36,10 @@
       "granite"
    },
 
+   indicate_workarea_overlaps = {
+      "atlanteans_quarry",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/atlanteans/shipyard/init.lua'
--- data/tribes/buildings/productionsites/atlanteans/shipyard/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/atlanteans/shipyard/init.lua	2019-06-04 16:05:14 +0000
@@ -58,6 +58,10 @@
       { name = "spidercloth", amount = 4 }
    },
 
+   indicate_workarea_overlaps = {
+      "atlanteans_shipyard",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/atlanteans/well/init.lua'
--- data/tribes/buildings/productionsites/atlanteans/well/init.lua	2018-11-20 20:25:08 +0000
+++ data/tribes/buildings/productionsites/atlanteans/well/init.lua	2019-06-04 16:05:14 +0000
@@ -43,6 +43,10 @@
       "water"
    },
 
+   indicate_workarea_overlaps = {
+      "atlanteans_well",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/atlanteans/woodcutters_house/init.lua'
--- data/tribes/buildings/productionsites/atlanteans/woodcutters_house/init.lua	2019-06-02 13:16:53 +0000
+++ data/tribes/buildings/productionsites/atlanteans/woodcutters_house/init.lua	2019-06-04 16:05:14 +0000
@@ -37,6 +37,11 @@
       "log"
    },
 
+   indicate_workarea_overlaps = {
+      "atlanteans_foresters_house",
+      "atlanteans_woodcutters_house",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start felling trees because ...

=== modified file 'data/tribes/buildings/productionsites/barbarians/coalmine/init.lua'
--- data/tribes/buildings/productionsites/barbarians/coalmine/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/barbarians/coalmine/init.lua	2019-06-04 16:05:14 +0000
@@ -55,6 +55,12 @@
       "coal"
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_coalmine",
+      "barbarians_coalmine_deep",
+      "barbarians_coalmine_deeper",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start mining coal because ...

=== modified file 'data/tribes/buildings/productionsites/barbarians/coalmine_deep/init.lua'
--- data/tribes/buildings/productionsites/barbarians/coalmine_deep/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/barbarians/coalmine_deep/init.lua	2019-06-04 16:05:14 +0000
@@ -48,6 +48,12 @@
       barbarians_miner_chief = 1,
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_coalmine",
+      "barbarians_coalmine_deep",
+      "barbarians_coalmine_deeper",
+   },
+
    inputs = {
       { name = "snack", amount = 6 }
    },

=== modified file 'data/tribes/buildings/productionsites/barbarians/coalmine_deeper/init.lua'
--- data/tribes/buildings/productionsites/barbarians/coalmine_deeper/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/barbarians/coalmine_deeper/init.lua	2019-06-04 16:05:14 +0000
@@ -47,6 +47,12 @@
       barbarians_miner_master = 1,
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_coalmine",
+      "barbarians_coalmine_deep",
+      "barbarians_coalmine_deeper",
+   },
+
    inputs = {
       { name = "meal", amount = 6 }
    },

=== modified file 'data/tribes/buildings/productionsites/barbarians/farm/init.lua'
--- data/tribes/buildings/productionsites/barbarians/farm/init.lua	2019-05-31 13:33:41 +0000
+++ data/tribes/buildings/productionsites/barbarians/farm/init.lua	2019-06-04 16:05:14 +0000
@@ -54,6 +54,12 @@
       "wheat"
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_rangers_hut",
+      "barbarians_farm",
+      "barbarians_reed_yard",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/barbarians/fishers_hut/init.lua'
--- data/tribes/buildings/productionsites/barbarians/fishers_hut/init.lua	2019-06-01 11:23:15 +0000
+++ data/tribes/buildings/productionsites/barbarians/fishers_hut/init.lua	2019-06-04 16:05:14 +0000
@@ -47,6 +47,10 @@
       "fish"
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_fishers_hut",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start fishing because ...

=== modified file 'data/tribes/buildings/productionsites/barbarians/gamekeepers_hut/init.lua'
--- data/tribes/buildings/productionsites/barbarians/gamekeepers_hut/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/barbarians/gamekeepers_hut/init.lua	2019-06-04 16:05:14 +0000
@@ -43,6 +43,11 @@
       barbarians_gamekeeper = 1
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_hunters_hut",
+      "barbarians_gamekeepers_hut",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/barbarians/goldmine/init.lua'
--- data/tribes/buildings/productionsites/barbarians/goldmine/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/barbarians/goldmine/init.lua	2019-06-04 16:05:14 +0000
@@ -48,6 +48,12 @@
       barbarians_miner = 1
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_goldmine",
+      "barbarians_goldmine_deep",
+      "barbarians_goldmine_deeper",
+   },
+
    inputs = {
       { name = "ration", amount = 6 }
    },

=== modified file 'data/tribes/buildings/productionsites/barbarians/goldmine_deep/init.lua'
--- data/tribes/buildings/productionsites/barbarians/goldmine_deep/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/barbarians/goldmine_deep/init.lua	2019-06-04 16:05:14 +0000
@@ -55,6 +55,12 @@
       "gold_ore"
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_goldmine",
+      "barbarians_goldmine_deep",
+      "barbarians_goldmine_deeper",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start mining gold because ...

=== modified file 'data/tribes/buildings/productionsites/barbarians/goldmine_deeper/init.lua'
--- data/tribes/buildings/productionsites/barbarians/goldmine_deeper/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/barbarians/goldmine_deeper/init.lua	2019-06-04 16:05:14 +0000
@@ -54,6 +54,12 @@
       "gold_ore"
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_goldmine",
+      "barbarians_goldmine_deep",
+      "barbarians_goldmine_deeper",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start mining gold because ...

=== modified file 'data/tribes/buildings/productionsites/barbarians/granitemine/init.lua'
--- data/tribes/buildings/productionsites/barbarians/granitemine/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/barbarians/granitemine/init.lua	2019-06-04 16:05:14 +0000
@@ -46,6 +46,10 @@
       barbarians_miner = 1
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_granitemine",
+   },
+
    inputs = {
       { name = "ration", amount = 8 }
    },

=== modified file 'data/tribes/buildings/productionsites/barbarians/hunters_hut/init.lua'
--- data/tribes/buildings/productionsites/barbarians/hunters_hut/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/barbarians/hunters_hut/init.lua	2019-06-04 16:05:14 +0000
@@ -45,6 +45,11 @@
       barbarians_hunter = 1
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_hunters_hut",
+      "barbarians_gamekeepers_hut",
+   },
+
    outputs = {
       "meat"
    },

=== modified file 'data/tribes/buildings/productionsites/barbarians/ironmine/init.lua'
--- data/tribes/buildings/productionsites/barbarians/ironmine/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/barbarians/ironmine/init.lua	2019-06-04 16:05:14 +0000
@@ -55,6 +55,12 @@
       "iron_ore"
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_ironmine",
+      "barbarians_ironmine_deep",
+      "barbarians_ironmine_deeper",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start mining iron because ...

=== modified file 'data/tribes/buildings/productionsites/barbarians/ironmine_deep/init.lua'
--- data/tribes/buildings/productionsites/barbarians/ironmine_deep/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/barbarians/ironmine_deep/init.lua	2019-06-04 16:05:14 +0000
@@ -55,6 +55,12 @@
       "iron_ore"
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_ironmine",
+      "barbarians_ironmine_deep",
+      "barbarians_ironmine_deeper",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start mining iron because ...

=== modified file 'data/tribes/buildings/productionsites/barbarians/ironmine_deeper/init.lua'
--- data/tribes/buildings/productionsites/barbarians/ironmine_deeper/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/barbarians/ironmine_deeper/init.lua	2019-06-04 16:05:14 +0000
@@ -41,6 +41,12 @@
       mines = "iron",
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_ironmine",
+      "barbarians_ironmine_deep",
+      "barbarians_ironmine_deeper",
+   },
+
    working_positions = {
       barbarians_miner = 1,
       barbarians_miner_chief = 1,

=== modified file 'data/tribes/buildings/productionsites/barbarians/lumberjacks_hut/init.lua'
--- data/tribes/buildings/productionsites/barbarians/lumberjacks_hut/init.lua	2019-06-02 13:16:53 +0000
+++ data/tribes/buildings/productionsites/barbarians/lumberjacks_hut/init.lua	2019-06-04 16:05:14 +0000
@@ -44,6 +44,11 @@
       "log"
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_rangers_hut",
+      "barbarians_lumberjacks_hut",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start felling trees because ...

=== modified file 'data/tribes/buildings/productionsites/barbarians/quarry/init.lua'
--- data/tribes/buildings/productionsites/barbarians/quarry/init.lua	2019-06-02 14:45:28 +0000
+++ data/tribes/buildings/productionsites/barbarians/quarry/init.lua	2019-06-04 16:05:14 +0000
@@ -43,6 +43,10 @@
       "granite"
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_quarry",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/barbarians/rangers_hut/init.lua'
--- data/tribes/buildings/productionsites/barbarians/rangers_hut/init.lua	2019-06-02 14:04:16 +0000
+++ data/tribes/buildings/productionsites/barbarians/rangers_hut/init.lua	2019-06-04 16:05:14 +0000
@@ -43,6 +43,13 @@
       barbarians_ranger = 1
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_rangers_hut",
+      "barbarians_lumberjacks_hut",
+      "barbarians_farm",
+      "barbarians_reed_yard",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start planting trees because ...

=== modified file 'data/tribes/buildings/productionsites/barbarians/reed_yard/init.lua'
--- data/tribes/buildings/productionsites/barbarians/reed_yard/init.lua	2019-05-31 12:56:36 +0000
+++ data/tribes/buildings/productionsites/barbarians/reed_yard/init.lua	2019-06-04 16:05:14 +0000
@@ -38,6 +38,12 @@
       "reed"
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_rangers_hut",
+      "barbarians_reed_yard",
+      "barbarians_farm",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/barbarians/shipyard/init.lua'
--- data/tribes/buildings/productionsites/barbarians/shipyard/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/barbarians/shipyard/init.lua	2019-06-04 16:05:14 +0000
@@ -46,6 +46,10 @@
       { name = "cloth", amount = 4 }
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_shipyard",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/barbarians/well/init.lua'
--- data/tribes/buildings/productionsites/barbarians/well/init.lua	2018-05-24 10:19:21 +0000
+++ data/tribes/buildings/productionsites/barbarians/well/init.lua	2019-06-04 16:05:14 +0000
@@ -44,6 +44,10 @@
       "water"
    },
 
+   indicate_workarea_overlaps = {
+      "barbarians_well",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/empire/coalmine/init.lua'
--- data/tribes/buildings/productionsites/empire/coalmine/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/empire/coalmine/init.lua	2019-06-04 16:05:14 +0000
@@ -45,6 +45,11 @@
       empire_miner = 1
    },
 
+   indicate_workarea_overlaps = {
+      "empire_coalmine",
+      "empire_coalmine_deep",
+   },
+
    inputs = {
       { name = "ration", amount = 6 },
       { name = "beer", amount = 6 }

=== modified file 'data/tribes/buildings/productionsites/empire/coalmine_deep/init.lua'
--- data/tribes/buildings/productionsites/empire/coalmine_deep/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/empire/coalmine_deep/init.lua	2019-06-04 16:05:14 +0000
@@ -38,6 +38,11 @@
       mines = "coal"
    },
 
+   indicate_workarea_overlaps = {
+      "empire_coalmine",
+      "empire_coalmine_deep",
+   },
+
    working_positions = {
       empire_miner = 1,
       empire_miner_master = 1

=== modified file 'data/tribes/buildings/productionsites/empire/farm/init.lua'
--- data/tribes/buildings/productionsites/empire/farm/init.lua	2019-05-31 12:56:36 +0000
+++ data/tribes/buildings/productionsites/empire/farm/init.lua	2019-06-04 16:05:14 +0000
@@ -29,6 +29,12 @@
       },
    },
 
+   indicate_workarea_overlaps = {
+      "empire_farm",
+      "empire_vineyard",
+      "empire_foresters_house",
+   },
+
    aihints = {
       basic_amount = 1,
       space_consumer = true,

=== modified file 'data/tribes/buildings/productionsites/empire/fishers_house/init.lua'
--- data/tribes/buildings/productionsites/empire/fishers_house/init.lua	2019-06-01 11:23:15 +0000
+++ data/tribes/buildings/productionsites/empire/fishers_house/init.lua	2019-06-04 16:05:14 +0000
@@ -39,6 +39,10 @@
       "fish"
    },
 
+   indicate_workarea_overlaps = {
+      "empire_fishers_house",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start fishing because ...

=== modified file 'data/tribes/buildings/productionsites/empire/foresters_house/init.lua'
--- data/tribes/buildings/productionsites/empire/foresters_house/init.lua	2019-06-02 14:04:16 +0000
+++ data/tribes/buildings/productionsites/empire/foresters_house/init.lua	2019-06-04 16:05:14 +0000
@@ -37,6 +37,13 @@
       empire_forester = 1
    },
 
+   indicate_workarea_overlaps = {
+      "empire_farm",
+      "empire_vineyard",
+      "empire_lumberjacks_house",
+      "empire_foresters_house",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start planting trees because ...

=== modified file 'data/tribes/buildings/productionsites/empire/goldmine/init.lua'
--- data/tribes/buildings/productionsites/empire/goldmine/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/empire/goldmine/init.lua	2019-06-04 16:05:14 +0000
@@ -45,6 +45,11 @@
       empire_miner = 1
    },
 
+   indicate_workarea_overlaps = {
+      "empire_goldmine",
+      "empire_goldmine_deep",
+   },
+
    inputs = {
       { name = "ration", amount = 6 },
       { name = "wine", amount = 6 }

=== modified file 'data/tribes/buildings/productionsites/empire/goldmine_deep/init.lua'
--- data/tribes/buildings/productionsites/empire/goldmine_deep/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/empire/goldmine_deep/init.lua	2019-06-04 16:05:14 +0000
@@ -38,6 +38,11 @@
       mines = "gold"
    },
 
+   indicate_workarea_overlaps = {
+      "empire_goldmine",
+      "empire_goldmine_deep",
+   },
+
    working_positions = {
       empire_miner = 1,
       empire_miner_master = 1

=== modified file 'data/tribes/buildings/productionsites/empire/hunters_house/init.lua'
--- data/tribes/buildings/productionsites/empire/hunters_house/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/empire/hunters_house/init.lua	2019-06-04 16:05:14 +0000
@@ -38,6 +38,10 @@
       "meat"
    },
 
+   indicate_workarea_overlaps = {
+      "empire_hunters_house",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start hunting because ...

=== modified file 'data/tribes/buildings/productionsites/empire/ironmine/init.lua'
--- data/tribes/buildings/productionsites/empire/ironmine/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/empire/ironmine/init.lua	2019-06-04 16:05:14 +0000
@@ -45,6 +45,11 @@
       empire_miner = 1
    },
 
+   indicate_workarea_overlaps = {
+      "empire_ironmine",
+      "empire_ironmine_deep",
+   },
+
    inputs = {
       { name = "ration", amount = 6 },
       { name = "beer", amount = 6 }

=== modified file 'data/tribes/buildings/productionsites/empire/ironmine_deep/init.lua'
--- data/tribes/buildings/productionsites/empire/ironmine_deep/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/empire/ironmine_deep/init.lua	2019-06-04 16:05:14 +0000
@@ -38,6 +38,11 @@
       mines = "iron"
    },
 
+   indicate_workarea_overlaps = {
+      "empire_ironmine",
+      "empire_ironmine_deep",
+   },
+
    working_positions = {
       empire_miner = 1,
       empire_miner_master = 1

=== modified file 'data/tribes/buildings/productionsites/empire/lumberjacks_house/init.lua'
--- data/tribes/buildings/productionsites/empire/lumberjacks_house/init.lua	2019-06-02 13:16:53 +0000
+++ data/tribes/buildings/productionsites/empire/lumberjacks_house/init.lua	2019-06-04 16:05:14 +0000
@@ -37,6 +37,11 @@
       "log"
    },
 
+   indicate_workarea_overlaps = {
+      "empire_lumberjacks_house",
+      "empire_foresters_house",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start felling trees because ...

=== modified file 'data/tribes/buildings/productionsites/empire/marblemine/init.lua'
--- data/tribes/buildings/productionsites/empire/marblemine/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/empire/marblemine/init.lua	2019-06-04 16:05:14 +0000
@@ -42,6 +42,11 @@
       basic_amount = 1
    },
 
+   indicate_workarea_overlaps = {
+      "empire_marblemine",
+      "empire_marblemine_deep",
+   },
+
    working_positions = {
       empire_miner = 1
    },

=== modified file 'data/tribes/buildings/productionsites/empire/marblemine_deep/init.lua'
--- data/tribes/buildings/productionsites/empire/marblemine_deep/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/empire/marblemine_deep/init.lua	2019-06-04 16:05:14 +0000
@@ -43,6 +43,11 @@
       empire_miner_master = 1
    },
 
+   indicate_workarea_overlaps = {
+      "empire_marblemine",
+      "empire_marblemine_deep",
+   },
+
    inputs = {
       { name = "meal", amount = 6 },
       { name = "wine", amount = 6 }

=== modified file 'data/tribes/buildings/productionsites/empire/quarry/init.lua'
--- data/tribes/buildings/productionsites/empire/quarry/init.lua	2019-06-02 14:45:28 +0000
+++ data/tribes/buildings/productionsites/empire/quarry/init.lua	2019-06-04 16:05:14 +0000
@@ -32,6 +32,10 @@
       empire_stonemason = 1
    },
 
+   indicate_workarea_overlaps = {
+      "empire_quarry",
+   },
+
    outputs = {
       "granite",
       "marble"

=== modified file 'data/tribes/buildings/productionsites/empire/shipyard/init.lua'
--- data/tribes/buildings/productionsites/empire/shipyard/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/empire/shipyard/init.lua	2019-06-04 16:05:14 +0000
@@ -47,6 +47,10 @@
       prohibited_till = 1050
    },
 
+   indicate_workarea_overlaps = {
+      "empire_shipyard",
+   },
+
    working_positions = {
       empire_shipwright = 1
    },

=== modified file 'data/tribes/buildings/productionsites/empire/vineyard/init.lua'
--- data/tribes/buildings/productionsites/empire/vineyard/init.lua	2019-05-31 12:56:36 +0000
+++ data/tribes/buildings/productionsites/empire/vineyard/init.lua	2019-06-04 16:05:14 +0000
@@ -44,6 +44,12 @@
       "grape"
    },
 
+   indicate_workarea_overlaps = {
+      "empire_vineyard",
+      "empire_farm",
+      "empire_foresters_house",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/empire/well/init.lua'
--- data/tribes/buildings/productionsites/empire/well/init.lua	2018-05-24 10:19:21 +0000
+++ data/tribes/buildings/productionsites/empire/well/init.lua	2019-06-04 16:05:14 +0000
@@ -42,6 +42,10 @@
       "water"
    },
 
+   indicate_workarea_overlaps = {
+      "empire_well",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/frisians/aqua_farm/init.lua'
--- data/tribes/buildings/productionsites/frisians/aqua_farm/init.lua	2019-05-29 19:15:11 +0000
+++ data/tribes/buildings/productionsites/frisians/aqua_farm/init.lua	2019-06-04 16:05:14 +0000
@@ -49,6 +49,11 @@
       "fish"
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_aqua_farm",
+      "frisians_clay_pit",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/frisians/beekeepers_house/init.lua'
--- data/tribes/buildings/productionsites/frisians/beekeepers_house/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/frisians/beekeepers_house/init.lua	2019-06-04 16:05:14 +0000
@@ -31,6 +31,13 @@
       },
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_berry_farm",
+      "frisians_reed_farm",
+      "frisians_farm",
+      "frisians_beekeepers_house",
+   },
+
    aihints = {
       collects_ware_from_map = "honey",
       prohibited_till = 620,

=== modified file 'data/tribes/buildings/productionsites/frisians/berry_farm/init.lua'
--- data/tribes/buildings/productionsites/frisians/berry_farm/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/frisians/berry_farm/init.lua	2019-06-04 16:05:14 +0000
@@ -41,6 +41,16 @@
       frisians_berry_farmer = 1
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_clay_pit",
+      "frisians_berry_farm",
+      "frisians_reed_farm",
+      "frisians_farm",
+      "frisians_foresters_house",
+      "frisians_beekeepers_house",
+      "frisians_collectors_house",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start planting bushes because ...

=== modified file 'data/tribes/buildings/productionsites/frisians/clay_pit/init.lua'
--- data/tribes/buildings/productionsites/frisians/clay_pit/init.lua	2019-05-29 19:15:11 +0000
+++ data/tribes/buildings/productionsites/frisians/clay_pit/init.lua	2019-06-04 16:05:14 +0000
@@ -35,6 +35,15 @@
       },
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_aqua_farm",
+      "frisians_clay_pit",
+      "frisians_berry_farm",
+      "frisians_reed_farm",
+      "frisians_farm",
+      "frisians_foresters_house",
+   },
+
    aihints = {
       very_weak_ai_limit = 1,
       weak_ai_limit = 2,

=== modified file 'data/tribes/buildings/productionsites/frisians/coalmine/init.lua'
--- data/tribes/buildings/productionsites/frisians/coalmine/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/frisians/coalmine/init.lua	2019-06-04 16:05:14 +0000
@@ -52,6 +52,11 @@
       frisians_miner = 1
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_coalmine",
+      "frisians_coalmine_deep",
+   },
+
    inputs = {
       { name = "ration", amount = 8 }
    },

=== modified file 'data/tribes/buildings/productionsites/frisians/coalmine_deep/init.lua'
--- data/tribes/buildings/productionsites/frisians/coalmine_deep/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/frisians/coalmine_deep/init.lua	2019-06-04 16:05:14 +0000
@@ -51,6 +51,11 @@
       frisians_miner_master = 1,
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_coalmine",
+      "frisians_coalmine_deep",
+   },
+
    inputs = {
       { name = "meal", amount = 8 }
    },

=== modified file 'data/tribes/buildings/productionsites/frisians/collectors_house/init.lua'
--- data/tribes/buildings/productionsites/frisians/collectors_house/init.lua	2019-05-19 11:25:28 +0000
+++ data/tribes/buildings/productionsites/frisians/collectors_house/init.lua	2019-06-04 16:05:14 +0000
@@ -31,6 +31,11 @@
       },
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_berry_farm",
+      "frisians_collectors_house",
+   },
+
    aihints = {
       collects_ware_from_map = "fruit",
       prohibited_till = 470,

=== modified file 'data/tribes/buildings/productionsites/frisians/farm/init.lua'
--- data/tribes/buildings/productionsites/frisians/farm/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/frisians/farm/init.lua	2019-06-04 16:05:14 +0000
@@ -57,6 +57,15 @@
       "barley"
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_clay_pit",
+      "frisians_berry_farm",
+      "frisians_reed_farm",
+      "frisians_farm",
+      "frisians_foresters_house",
+      "frisians_beekeepers_house",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/frisians/fishers_house/init.lua'
--- data/tribes/buildings/productionsites/frisians/fishers_house/init.lua	2019-05-31 10:58:39 +0000
+++ data/tribes/buildings/productionsites/frisians/fishers_house/init.lua	2019-06-04 16:05:14 +0000
@@ -37,6 +37,10 @@
       prohibited_till = 490
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_fishers_house",
+   },
+
    working_positions = {
       frisians_fisher = 1
    },

=== modified file 'data/tribes/buildings/productionsites/frisians/foresters_house/init.lua'
--- data/tribes/buildings/productionsites/frisians/foresters_house/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/frisians/foresters_house/init.lua	2019-06-04 16:05:14 +0000
@@ -40,6 +40,15 @@
       frisians_forester = 1
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_clay_pit",
+      "frisians_berry_farm",
+      "frisians_reed_farm",
+      "frisians_farm",
+      "frisians_foresters_house",
+      "frisians_woodcutters_house",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start planting trees because ...

=== modified file 'data/tribes/buildings/productionsites/frisians/goldmine/init.lua'
--- data/tribes/buildings/productionsites/frisians/goldmine/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/frisians/goldmine/init.lua	2019-06-04 16:05:14 +0000
@@ -43,6 +43,11 @@
       },
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_goldmine",
+      "frisians_goldmine_deep",
+   },
+
    aihints = {
       mines = "gold",
       mines_percent = 50,

=== modified file 'data/tribes/buildings/productionsites/frisians/goldmine_deep/init.lua'
--- data/tribes/buildings/productionsites/frisians/goldmine_deep/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/frisians/goldmine_deep/init.lua	2019-06-04 16:05:14 +0000
@@ -46,6 +46,11 @@
       mines = "gold",
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_goldmine",
+      "frisians_goldmine_deep",
+   },
+
    working_positions = {
       frisians_miner = 1,
       frisians_miner_master = 1,

=== modified file 'data/tribes/buildings/productionsites/frisians/hunters_house/init.lua'
--- data/tribes/buildings/productionsites/frisians/hunters_house/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/frisians/hunters_house/init.lua	2019-06-04 16:05:14 +0000
@@ -36,6 +36,10 @@
       prohibited_till = 480
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_hunters_house",
+   },
+
    working_positions = {
       frisians_hunter = 1
    },

=== modified file 'data/tribes/buildings/productionsites/frisians/ironmine/init.lua'
--- data/tribes/buildings/productionsites/frisians/ironmine/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/frisians/ironmine/init.lua	2019-06-04 16:05:14 +0000
@@ -43,6 +43,11 @@
       },
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_ironmine",
+      "frisians_ironmine_deep",
+   },
+
    aihints = {
       mines = "iron",
       mines_percent = 50,

=== modified file 'data/tribes/buildings/productionsites/frisians/ironmine_deep/init.lua'
--- data/tribes/buildings/productionsites/frisians/ironmine_deep/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/frisians/ironmine_deep/init.lua	2019-06-04 16:05:14 +0000
@@ -42,6 +42,11 @@
       },
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_ironmine",
+      "frisians_ironmine_deep",
+   },
+
    aihints = {
       mines = "iron",
    },

=== modified file 'data/tribes/buildings/productionsites/frisians/quarry/init.lua'
--- data/tribes/buildings/productionsites/frisians/quarry/init.lua	2019-06-02 14:45:28 +0000
+++ data/tribes/buildings/productionsites/frisians/quarry/init.lua	2019-06-04 16:05:14 +0000
@@ -39,6 +39,10 @@
       frisians_stonemason = 1
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_quarry",
+   },
+
    outputs = {
       "granite"
    },

=== modified file 'data/tribes/buildings/productionsites/frisians/reed_farm/init.lua'
--- data/tribes/buildings/productionsites/frisians/reed_farm/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/frisians/reed_farm/init.lua	2019-06-04 16:05:14 +0000
@@ -47,6 +47,15 @@
       "reed"
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_clay_pit",
+      "frisians_berry_farm",
+      "frisians_reed_farm",
+      "frisians_farm",
+      "frisians_foresters_house",
+      "frisians_beekeepers_house",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/frisians/rockmine/init.lua'
--- data/tribes/buildings/productionsites/frisians/rockmine/init.lua	2019-05-19 11:25:28 +0000
+++ data/tribes/buildings/productionsites/frisians/rockmine/init.lua	2019-06-04 16:05:14 +0000
@@ -43,6 +43,11 @@
       },
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_rockmine",
+      "frisians_rockmine_deep",
+   },
+
    aihints = {
       mines = "stones",
       mines_percent = 50,

=== modified file 'data/tribes/buildings/productionsites/frisians/rockmine_deep/init.lua'
--- data/tribes/buildings/productionsites/frisians/rockmine_deep/init.lua	2019-05-19 11:25:28 +0000
+++ data/tribes/buildings/productionsites/frisians/rockmine_deep/init.lua	2019-06-04 16:05:14 +0000
@@ -42,6 +42,11 @@
       },
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_rockmine",
+      "frisians_rockmine_deep",
+   },
+
    aihints = {
       mines = "stones",
    },

=== modified file 'data/tribes/buildings/productionsites/frisians/shipyard/init.lua'
--- data/tribes/buildings/productionsites/frisians/shipyard/init.lua	2019-05-29 18:29:28 +0000
+++ data/tribes/buildings/productionsites/frisians/shipyard/init.lua	2019-06-04 16:05:14 +0000
@@ -41,6 +41,10 @@
       prohibited_till = 1050
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_shipyard",
+   },
+
    working_positions = {
       frisians_shipwright = 1
    },

=== modified file 'data/tribes/buildings/productionsites/frisians/well/init.lua'
--- data/tribes/buildings/productionsites/frisians/well/init.lua	2018-07-13 11:25:10 +0000
+++ data/tribes/buildings/productionsites/frisians/well/init.lua	2019-06-04 16:05:14 +0000
@@ -44,6 +44,10 @@
       "water"
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_well",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start working because ...

=== modified file 'data/tribes/buildings/productionsites/frisians/woodcutters_house/init.lua'
--- data/tribes/buildings/productionsites/frisians/woodcutters_house/init.lua	2019-06-02 13:16:53 +0000
+++ data/tribes/buildings/productionsites/frisians/woodcutters_house/init.lua	2019-06-04 16:05:14 +0000
@@ -43,6 +43,11 @@
       "log"
    },
 
+   indicate_workarea_overlaps = {
+      "frisians_foresters_house",
+      "frisians_woodcutters_house",
+   },
+
    programs = {
       work = {
          -- TRANSLATORS: Completed/Skipped/Did not start felling trees because ...

=== modified file 'data/txts/developers.json'
--- data/txts/developers.json	2019-04-22 05:24:58 +0000
+++ data/txts/developers.json	2019-06-04 16:05:14 +0000
@@ -159,7 +159,7 @@
 		},
 		{
 			"heading": "Musicians",
-			"image": "images/wui/overlays/workarea123.png",
+			"image": "images/wui/buildings/toggle_workarea.png",
 			"entries":[
 				{
 					"members":[
@@ -178,7 +178,7 @@
 		},
 		{
 			"heading": "Sound Effects",
-			"image": "images/wui/overlays/workarea123.png",
+			"image": "images/wui/buildings/toggle_workarea.png",
 			"entries":[
 				{
 					"members":[

=== modified file 'src/logic/map_objects/tribes/productionsite.cc'
--- src/logic/map_objects/tribes/productionsite.cc	2019-05-29 07:14:00 +0000
+++ src/logic/map_objects/tribes/productionsite.cc	2019-06-04 16:05:14 +0000
@@ -208,6 +208,25 @@
 		}
 	}
 
+	if (table.has_key("indicate_workarea_overlaps")) {
+		for (const std::string& s : table.get_table("indicate_workarea_overlaps")->array_entries<std::string>()) {
+			if (highlight_overlapping_workarea_for_.count(s)) {
+				throw wexception("indicate_workarea_overlaps has duplicate entry");
+			}
+			highlight_overlapping_workarea_for_.insert(s);
+		}
+	}
+	if (workarea_info().empty() ^ highlight_overlapping_workarea_for_.empty()) {
+		if (highlight_overlapping_workarea_for_.empty()) {
+			log("WARNING: Productionsite %s has a workarea but does not warn about any conflicting buildings\n",
+					name().c_str());
+		} else {
+			throw GameDataError(
+					"Productionsite %s without a workarea must not warn about conflicting buildings",
+					name().c_str());
+		}
+	}
+
 	// Verify that any map resource collected is valid
 	if (!hints().collects_ware_from_map().empty()) {
 		if (!(tribes.ware_exists(hints().collects_ware_from_map()))) {

=== modified file 'src/logic/map_objects/tribes/productionsite.h'
--- src/logic/map_objects/tribes/productionsite.h	2019-05-28 21:04:36 +0000
+++ src/logic/map_objects/tribes/productionsite.h	2019-06-04 16:05:14 +0000
@@ -128,6 +128,14 @@
 		return out_of_resource_productivity_threshold_;
 	}
 
+	bool highlight_overlapping_workarea_for(const std::string& n) const {
+		return highlight_overlapping_workarea_for_.count(n);
+	}
+
+	const std::set<std::string>& get_highlight_overlapping_workarea_for() const {
+		return highlight_overlapping_workarea_for_;
+	}
+
 private:
 	BillOfMaterials working_positions_;
 	BillOfMaterials input_wares_;
@@ -140,6 +148,7 @@
 	std::string out_of_resource_message_;
 	std::string resource_not_needed_message_;
 	int out_of_resource_productivity_threshold_;
+	std::set<std::string> highlight_overlapping_workarea_for_;
 
 	DISALLOW_COPY_AND_ASSIGN(ProductionSiteDescr);
 };

=== modified file 'src/logic/map_objects/tribes/tribes.cc'
--- src/logic/map_objects/tribes/tribes.cc	2019-05-29 06:24:42 +0000
+++ src/logic/map_objects/tribes/tribes.cc	2019-06-04 16:05:14 +0000
@@ -335,6 +335,21 @@
 			for (const auto& job : de->working_positions()) {
 				workers_->get_mutable(job.first)->add_employer(i);
 			}
+
+			for (const std::string& n : de->get_highlight_overlapping_workarea_for()) {
+				const DescriptionIndex di = safe_building_index(n);
+				if (upcast(const ProductionSiteDescr, p, get_building_descr(di))) {
+					if (!p->workarea_info().empty()) {
+						continue;
+					}
+					throw GameDataError(
+							"Productionsite %s will warn about conflicting building %s which doesn’t have a workarea",
+							de->name().c_str(), n.c_str());
+				}
+				throw GameDataError(
+						"Productionsite %s will warn about conflicting building %s which is not a productionsite",
+						de->name().c_str(), n.c_str());
+			}
 		}
 
 		// Register which buildings buildings can have been enhanced from

=== modified file 'src/wui/fieldaction.cc'
--- src/wui/fieldaction.cc	2019-05-31 19:31:45 +0000
+++ src/wui/fieldaction.cc	2019-06-04 16:05:14 +0000
@@ -208,6 +208,7 @@
 	bool showing_workarea_preview_;
 	std::set<Widelands::Coords> overlapping_workareas_;
 	bool is_showing_workarea_overlaps_;
+	Widelands::DescriptionIndex building_under_mouse_;
 
 	/// Variables to use with attack dialog.
 	AttackBox* attack_box_;
@@ -258,6 +259,7 @@
      best_tab_(0),
      showing_workarea_preview_(false),
      is_showing_workarea_overlaps_(ib->get_display_flag(InteractiveBase::dfShowWorkareaOverlap)),
+     building_under_mouse_(Widelands::INVALID_INDEX),
      attack_box_(nullptr) {
 	ib->set_sel_freeze(true);
 	set_center_panel(&tabpanel_);
@@ -280,12 +282,14 @@
 		if (!is_showing_workarea_overlaps_) {
 			clear_overlapping_workareas();
 		}
-#ifndef NDEBUG
 		else {
-			// Desired overlaps will be shown as soon as the user moves the mouse
 			assert(overlapping_workareas_.empty());
+			if (building_under_mouse_ != Widelands::INVALID_INDEX) {
+				const Widelands::DescriptionIndex di = building_under_mouse_;
+				building_icon_mouse_out(di); // this unsets building_under_mouse_
+				building_icon_mouse_in(di);
+			}
 		}
-#endif
 	}
 	if (player_ && player_->vision(node_.field - &ibase().egbase().map()[0]) <= 1 &&
 	    !player_->see_all()) {
@@ -730,6 +734,7 @@
 	if (showing_workarea_preview_) {
 		ibase().hide_workarea(node_, false);
 		showing_workarea_preview_ = false;
+		building_under_mouse_ = Widelands::INVALID_INDEX;
 		clear_overlapping_workareas();
 	}
 }
@@ -737,6 +742,7 @@
 void FieldActionWindow::building_icon_mouse_in(const Widelands::DescriptionIndex idx) {
 	if (!showing_workarea_preview_) {
 		assert(overlapping_workareas_.empty());
+		building_under_mouse_ = idx;
 		const Widelands::BuildingDescr& descr = *player_->tribe().get_building_descr(idx);
 		const WorkareaInfo& workarea_info = descr.workarea_info();
 		ibase().show_workarea(workarea_info, node_);
@@ -772,7 +778,9 @@
 						upcast(Widelands::ConstructionSite, cs, imm);
 						d = cs->get_info().becomes;
 						if ((descr.type() == Widelands::MapObjectType::PRODUCTIONSITE &&
-						     d->type() != Widelands::MapObjectType::PRODUCTIONSITE) ||
+						     (d->type() != Widelands::MapObjectType::PRODUCTIONSITE ||
+						     !dynamic_cast<const Widelands::ProductionSiteDescr&>(descr).
+						     		highlight_overlapping_workarea_for(d->name()))) ||
 						    ((descr.type() == Widelands::MapObjectType::MILITARYSITE ||
 						      descr.type() == Widelands::MapObjectType::WAREHOUSE) &&
 						     imm_type != Widelands::MapObjectType::MILITARYSITE &&
@@ -781,7 +789,8 @@
 						}
 					} else if (descr.type() == Widelands::MapObjectType::PRODUCTIONSITE) {
 						if (imm_type != Widelands::MapObjectType::PRODUCTIONSITE ||
-						    imm->get_owner() != player_) {
+						    imm->get_owner() != player_ || !dynamic_cast<const Widelands::ProductionSiteDescr&>(
+						    		descr).highlight_overlapping_workarea_for(imm->descr().name())) {
 							continue;
 						}
 					} else if (descr.type() == Widelands::MapObjectType::WAREHOUSE ||
@@ -811,7 +820,9 @@
 						std::map<Widelands::TCoords<>, uint32_t> colors;
 						for (const Widelands::TCoords<>& t : map.triangles_in_region(
 						        map.to_set(Widelands::Area<>(mr.location(), wa_radius)))) {
-							colors[t] = main_region.count(t) ? 0xffbf3f3f : 0x7fffffff;
+							colors[t] = mr.location() == t.node || mr.location() == map.br_n(t.node) ||
+									mr.location() == (t.t == Widelands::TriangleIndex::D ? map.bl_n(t.node) :
+									map.r_n(t.node)) || main_region.count(t) ? 0xffbf3f3f : 0x7fffffff;
 						}
 						ibase().show_workarea(wa, mr.location(), colors);
 						overlapping_workareas_.insert(mr.location());


Follow ups