public static void UpgradeMap(string[] args) { var map = new Map(args[1]); var engineDate = Exts.ParseIntegerInvariant(args[2]); Game.modData = new ModData(map.RequiresMod); UpgradeWeaponRules(engineDate, ref map.WeaponDefinitions, null, 0); UpgradeActorRules(engineDate, ref map.RuleDefinitions, null, 0); map.Save(args[1]); }
static void UpgradeMaps(string mod) { var MapFolderPath = new string[] { Environment.CurrentDirectory, "mods", mod, "maps" } .Aggregate(Path.Combine); foreach (var path in ModData.FindMapsIn(MapFolderPath)) { var map = new Map(path); // Touch the lazy bits to initialize them map.Actors.Force(); map.Smudges.Force(); map.MapTiles.Force(); map.MapResources.Force(); map.Save(path); } }