Closed ChrisNeedham24 closed 1 year ago
The logic for this can be mostly borrowed from lines 385-402 of game.py, where the space key iterates through units. Except for this, the list of units will need to be filtered to only those that have remaining stamina and are not laying siege to a settlement.
@ChrisNeedham24 Can you assign me to this issue?
Worth noting that there probably won't be room to add this to the controls page post #92, so you may need to implement something like the boundaries that are defined in a few places and scrolling.
Alright, cool. I will look into that.
save-2022-10-16T20.26.44.txt This save should work for what you need @langstof825, has multiple settlements and many units. (You will need to change the file extension from .txt back to .json though, not sure why GitHub doesn't support JSON files.
Worth noting that there probably won't be room to add this to the controls page post #92, so you may need to implement something like the boundaries that are defined in a few places and scroll
Do you get scrolling for free when using boundaries? I am trying to extend the controls page, but i cannot seem to find the area where we enable the scroll. I noticed when you move around the map using the arrow keys it pans through the map. Is that similar to what i need here?
Having thought a little more about this one, I don't think we'll need 'scrolling' per se. You might just be able to have two 'pages' of controls and the down arrow key sets the page to 2 and the up sets it to 1. Then you'd just need a conditional when displaying the controls, and probably some sort of arrow to denote that you can do it (maybe similar to how the settlements work in the status overlay).
Hmm, alright. That sounds pretty reasonable. I'll give that a go.
Currently, the space key iterates through all of the player's units. In cases where a player may have upwards of 20 units, it would be better if they could iterate specifically through the units that still have stamina.
The M key makes the most sense for this. Would need to be added to the controls page.
When there are no movable units, the key does nothing.