longturn / freeciv21

Develop your civilization from humble roots to a global empire
GNU General Public License v3.0
214 stars 39 forks source link

allow starting a go-to order to automatically cancel previously set order #2272

Closed hugomflavio closed 12 hours ago

hugomflavio commented 3 months ago

Is your feature request related to a problem? Please describe. When the client is set to not clear orders when a unit is selected, pressing G to set a go-to results in an awkward behaviour. First, the cursor turns into the forbidden symbol (i.e. the unit can't move while e.g. sentried). But then, clearing the Sentry order with space does not update the previous go-to order, so the cursor will still show as the round forbidden symbol. Even worse, pressing G again will stack the go-to orders (even if the sentry has been cleared in-between), causing a stacked forbidden symbol (i.e. one must press ESC as many times as one had pressed G to clear them all and reset).

Describe the solution you'd like Allow G to automatically cancel S or F. This would be consistent with how pressing S will immediately replace a Fortify command.

Describe alternatives you've considered Keep the current initial behaviour (i.e. can't go-to if sentried or fortified), but clearing the previous order with space automatically releases the go-to order.

Additional context Note: this also works for workers performing other tasks e.g. irrigating, roading.

image