Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2003:
[Freeciv-Dev] Re: (PR#3621) Freeciv 1.14.0 Changes Nations in Saved Game
Home

[Freeciv-Dev] Re: (PR#3621) Freeciv 1.14.0 Changes Nations in Saved Game

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Jared.Blackburn@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#3621) Freeciv 1.14.0 Changes Nations in Saved Games
From: "Mike Kaufman" <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 29 Mar 2003 18:56:52 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Sat, Mar 29, 2003 at 03:36:16PM -0800, Raimar Falke wrote:
> 
> Save a game with 1.14.0 and load it with the CVS version. Since the
> savegame only contains the nation ids and these got reordered you end
> up with different nations.

even with this supposition, I cannot reproduce. You have reproduced this?
Note that this was added on Jan 29th to savegame.c:

 /* 1.15 and later versions store nations by name.  Try that first. */
  p = secfile_lookup_str_default(file, NULL, "player%d.nation", plrno);
  if (!p) {
    /*
     * Otherwise read as a pre-1.15 savefile with numeric nation indexes.
     * This random-looking order is from the old nations/ruleset file.
     * Use it to convert old-style nation indices to name strings.
     * The idea is not to be dependent on the order in which nations 
     * get read into the registry.
     */
    const char *name_order[] = {
      "roman", "babylonian", "german", "egyptian", "american", "greek",
      "indian", "russian", "zulu", "french", "aztec", "chinese", "english",
      "mongol", "turk", "spanish", "persian", "arab", "carthaginian", "inca",
      "viking", "polish", "hungarian", "danish", "dutch", "swedish",
      "japanese", "portuguese", "finnish", "sioux", "czech", "australian",
      "welsh", "korean", "scottish", "israeli", "argentine", "canadian",
      "ukrainian", "lithuanian", "kenyan", "dunedain", "vietnamese", "thai",
      "mordor", "bavarian", "brazilian", "irish", "cornish", "italian",
      "filipino", "estonian", "latvian", "boer", "silesian", "singaporean",
      "chilean", "catalan", "croatian", "slovenian", "serbian", "barbarian",
    };
    p = (char *)name_order[secfile_lookup_int(file, "player%d.race", plrno)];
  }
  plr->nation = find_nation_by_name_orig(p);

-mike



[Prev in Thread] Current Thread [Next in Thread]