public Spring(string path) { if (string.IsNullOrEmpty(path)) path = Directory.GetCurrentDirectory(); if (!path.EndsWith(PathDivider)) path += PathDivider; // ensure that path ends with \\ this.path = path; if (!File.Exists(path + ExecutableName)) throw new Exception(ExecutableName + " not found in " + path); // init unitsync and load basic info unitSync = new UnitSync(path); }
static void Main(string[] args) { if (args.Length ==0) { Console.WriteLine("Needs path to spring"); return; } var us = new UnitSync(Utils.Glue(args)); BinaryFormatter bf = new BinaryFormatter(); using (var fs = new FileStream("mapinfo.dat", FileMode.Create)) bf.Serialize(fs, us.MapList); using (var fs = new FileStream("modinfo.dat", FileMode.Create)) bf.Serialize(fs, us.ModList); }
public Spring(string path) { if (string.IsNullOrEmpty(path)) { path = Directory.GetCurrentDirectory(); } if (!path.EndsWith(PathDivider)) { path += PathDivider; // ensure that path ends with \\ } this.path = path; if (!File.Exists(path + ExecutableName)) { throw new Exception(ExecutableName + " not found in " + path); } // init unitsync and load basic info unitSync = new UnitSync(path); }
public MapInfo(UnitSync owner, string name, int mapId) { unitSync = owner; this.name = name; this.mapId = mapId; }
public ModInfo(UnitSync owner, string name, int modId) { unitSync = owner; this.name = name; this.modId = modId; }