So we have a new savegame format (savegame2.c) for 2.3.x, courtesy of
patch #1541 et al. I'd like to confirm my understanding of the
implications for maintaining the code in future.

As I understand it, we'll continue to load old and new savegames, but
will only ever save new-format games; while we do still have code to
save old-format games, that's only for the purpose of debugging the new
format, and not accessible in regular builds, and will presumably go
away at some point.

So, if I'm adding a new feature (such as new unit properties) which
touches the savegame, I assume I only have to support both saving and
loading it in savegame2.c, and can leave savegame.c alone (but must of
course ensure that the new properties are initialised properly when an
old savegame is loaded, for instance by defaults when creating a unit).
Is that right?

Also, I think this means there is code in savegame2.c that was copied
from savegame.c which can actually be removed, as it's for backward
compatibility with old savefiles, which will always be in the old
format. (For instance, sg_load_player_unit(), S_OLD_FORTRESS etc.) If
that's confirmed, I'll submit a patch.

_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to