freeciv21 icon indicating copy to clipboard operation
freeciv21 copied to clipboard

Shortcut "Show/hide workers" does not show or hide workers

Open blabber opened this issue 10 months ago • 1 comments

Describe the bug The shortcut "Show/hide workers" does not show or hide workers, but toggles the city/unit color of the nearest city or settler, via key_city_overlay

https://github.com/longturn/freeciv21/blob/1e6a9a2d889bc5a7fab64559d4cb02bf150a0796/client/mapctrl.cpp#L318-L320

To Reproduce Steps to reproduce the behavior:

  1. Start game
  2. Build city
  3. Use the shortcut "Show/hide workers" on the city (default: Alt+Shift+Right Mouse)
  4. Visibility of workers is not toggled, but the city area is colored

Expected behavior

  1. Using the "Show/hide workers" shortcut should toggle visibility of workers.
  2. There should be another, aptly named, shortcut to do what "Show/hide workers" currently does.

Screenshots The map looks like this, after using "Show/hide workers" on a city:

city_overlay

Platform and version (please complete the following information):

  • OS: FreeBSD 14.0-RELEASE-p6
  • Freeciv21 version: 3.1-alpha.5

Additional context Reported on Discord: https://discord.com/channels/378908274113904641/378908274680004619/1222791609192681523

blabber avatar Mar 30 '24 21:03 blabber

A minimal fix would be renaming the shortcut to Show/hide city working area in shortcuts.cpp:92. Options to control the visibility of some types of units would be more complicated because we'd need to come up with a way to group units (in rulesets where transports can lay down buoys or clean pollution, are they workers or transports?)

lmoureaux avatar Apr 09 '24 22:04 lmoureaux