freeciv21
freeciv21 copied to clipboard
Shortcut "Show/hide workers" does not show or hide workers
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:
- Start game
- Build city
- Use the shortcut "Show/hide workers" on the city (default: Alt+Shift+Right Mouse)
- Visibility of workers is not toggled, but the city area is colored
Expected behavior
- Using the "Show/hide workers" shortcut should toggle visibility of workers.
- 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:
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
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?)