cortex-command-community / Cortex-Command-Community-Project

Cortex Command - Open Source under GNU AGPL v3
https://cortex-command-community.github.io/
GNU Affero General Public License v3.0
107 stars 14 forks source link

On Saved Game Load, Return Focus to Last Focused Unit #131

Open Bit-Crust opened 5 months ago

Bit-Crust commented 5 months ago

Following the template, I'm always frustrated when I save the game in an intense combat situation far, far from the brain, and then upon loading that same save, focus defaults to the brain, so that the unit may be off-screened before I can navigate focus back to him.

It would probably be better in just about every situation if loading a save meant focus would be returned to the last focused unit.

This is particularly bad on Decision Day in the final stretch.

Causeless commented 4 months ago

We use some SpecialBehaviour properties for save/loading this sorta stuff, for example we save/load actor limbs (or lack thereof) by removing their preset limbs with a special behaviour property. Could do the same with a SpecialBehaviour on the Scene or Activity or perhaps Actor itself.

I am unsure if we save a serialized unique ID per-object. That would make this easier.