yairm210 / Unciv

Open-source Android/Desktop remake of Civ V
Mozilla Public License 2.0
7.99k stars 1.51k forks source link

Feature request: Disable automation for all units (or all workers/all non-workers) #11687

Open swansond opened 4 weeks ago

swansond commented 4 weeks ago

Before creating

Problem Description

Sometimes, when using a lot of automated units, it can be desirable to switch them into manual mode for some precise movement or preparation for something. In order to do that today, you have to go overview -> units -> find and tap a unit -> stop automation (or next page first, sometimes) -> back to overview. Adding a toggle to the units overview page would allow all automation to be stopped easily. Toggle on might as well be implemented at the same time, but is less important because to automate all units you can just tap automate over and over and it will automatically switch to the next unit.

Related Issue Links

No response

Desired Solution

A button on the unit overview page to disable automation for all units. Or two, for workers/civilians and for military.

Alternative Approaches

Options to enable automation for all units could also be interesting, but does not itself solve any problems.

Additional Context

No response

SomeTroglodyte commented 4 weeks ago

Yup, why not - some context menu like for the upgrade column, with "wake all sleeping workers", "automate all civilians", "show all units with this action on the map (like a find all Iron from Resource overview would do)", "visit all public lavatories", the possibilities are many. However, I'd like to hear some input on which options would make how many players happier... And I still detest Disc~rap~rud.

SomeTroglodyte commented 3 weeks ago

Toy code produces:

![image](https://github.com/yairm210/Unciv/assets/63000004/5090b870-0040-42c9-84fb-ca5e5deec164)

I think replacing the edit column this way is a good idea - but there's a bunch of annoyances left in there, as partially obvious: The TextField Cell is told to grow its actor, but it doesn't... Menu positioning... Code duplication...