Function parser

Source
pub fn parser<P: AsRef<Path>>(full_path: P) -> SaveGameRecord
Expand description

Parse a savegame

Returned information includes:

  • Mods loaded and used in the save with total count
  • Playtime, Save Date, Save Name
  • Map mod name and title
  • Errors, if any, and boolean valid flag
  • Farm list, boolean if it’s a multiplayer save or not

/// # Sample Output

{
  "errorList": [],
  "farms": {
    "4": { "name": "BELLWETHER RANCH", "cash": 110758, "loan": 0, "color": 1 },
    "0": { "name": "--unowned--", "cash": 0, "loan": 0, "color": 1 }
  },
  "isValid": true,
  "mapMod": "FS22_BackRoadsCounty",
  "mapTitle": "Back Roads County",
  "modCount": 38,
  "mods": {
    "FS22_BackRoadsCounty": {
      "version": "1.0.0.2",
      "title": "Back Roads County",
      "farms": [ 0, 1, 4, 5, 15 ]
    }
  },
  "name": "BRC",
  "playTime": "306:40",
  "saveDate": "2022-10-14",
  "singleFarm": false
}