Indicate overlapping workareas while placing a constructionsite
Bug #1826504 reported by
GunChleoc
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Won't Fix
|
Wishlist
|
Unassigned |
Bug Description
While placing a construction site, indicate whether its workarea overlaps with another workarea, so that the player will know that a forester will plant trees on a farm's field spots, for example.
This could be done by giving the overlapping parts of the workarea overlay a different color, e.g. red.
Forum discussion: https:/
Related branches
lp://staging/~widelands-dev/widelands/overlapping_workareas
- GunChleoc: Approve
- Toni Förster: Approve
-
Diff: 761 lines (+347/-127)14 files modifiedsrc/graphic/color.cc (+7/-0)
src/graphic/color.h (+1/-0)
src/graphic/gl/workarea_program.cc (+38/-36)
src/logic/map.cc (+26/-0)
src/logic/map.h (+8/-0)
src/logic/map_objects/tribes/tribes.cc (+11/-1)
src/logic/map_objects/tribes/tribes.h (+4/-0)
src/logic/map_objects/tribes/workarea_info.h (+27/-0)
src/logic/widelands_geometry.h (+1/-4)
src/wui/actionconfirm.cc (+1/-1)
src/wui/buildingwindow.cc (+1/-1)
src/wui/fieldaction.cc (+92/-5)
src/wui/interactive_base.cc (+115/-74)
src/wui/interactive_base.h (+15/-5)
Changed in widelands: | |
assignee: | nobody → Benedikt Straub (nordfriese) |
milestone: | none → build21-rc1 |
status: | Confirmed → In Progress |
Changed in widelands: | |
status: | In Progress → Fix Committed |
assignee: | Benedikt Straub (nordfriese) → nobody |
To post a comment you must log in.
I see a potential problem here: Since workareas can theoretically have any radius, we will need to iterate over all buildings of the player on the map to check for overlaps. That may be slow. Do we want to define a constant X so that a building with overlapping workarea will be ignored if it is further than X away from the new site?
Should we also indicate overlaps with buildings of other players if they are visible? (Useful e.g. for militarysites)