Example #1
0
    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);
    }
Example #2
0
		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);

		}
Example #3
0
        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);
        }
Example #4
0
		public MapInfo(UnitSync owner, string name, int mapId)
		{
			unitSync = owner;
			this.name = name;
			this.mapId = mapId;
		}
Example #5
0
		public ModInfo(UnitSync owner, string name, int modId)
		{
			unitSync = owner;
			this.name = name;
			this.modId = modId;
		}
Example #6
0
 public MapInfo(UnitSync owner, string name, int mapId)
 {
     unitSync   = owner;
     this.name  = name;
     this.mapId = mapId;
 }
Example #7
0
 public ModInfo(UnitSync owner, string name, int modId)
 {
     unitSync   = owner;
     this.name  = name;
     this.modId = modId;
 }