Morlic wrote:A player wants to move fleet A to system Alpha but mistakenly had fleet B selected which was on its way to system Beta.
The easiest way for him to correct this mistake is to press an undo button especially if he forgot what the previous order for fleet B was (e.g. fleet B is one of many colonization ships sent to a lot of different systems).
OK, well, that's a rather different kind of thing, which I think could be supported but in a different kind of way. I was talking about recording orders as you go, during a turn, so that if the computer rebooted or the game crashed those orders could still be read back and repeated without the player having to make all those determinations again (a fairly rare need and not a big deal, but could be nice to have). That wouldn't really do much to support this kind of 'undo' button that you are talking about though, not particularly well anyways-- yes you could keep the full sequence of all orders (or at least all fleet movement orders) and then search for the second-most-recent move order for that particular fleet, and then perhaps just try reapplying that same original order, or better yet try to determine where in that move path you might now be and just reapply the remaining portion of it, but that seems to get a bit messy and uncertain.biza wrote:Thank you Morlic, that was exactly my thoughts.
I think that really if you were wanting to support an undo button then by far the best approach would be more focused on specifically saving state information which could be referenced for an undo. You could have the MapWnd keep a record related to the most recent order (or perhaps even the most recent N orders), wherein it would store all the necessary information to properly undo that order. For fleet path orders it would be the specifics of the fleet ID and preexisting path, for ship-transfer / fleet-merge orders it would be info on the fleets and ship lists, etc. I think it could even could be made to work for undoing the deletion of a production queue item, though that would probably be one of the trickier ones. Maintaining this info purely in the MapWnd would mean that the undo records would be erased at the start of each new turn and upon any savegame file load, but that seems pretty consistent with typical undo abilities to me.