public void FromMap(string map) { this.Name = map; MapName = map; string path = LevelInfo.MapPath(map); Vec3U16 dims = IMapImporter.GetFor(path).ReadDimensions(path); Width = dims.X; Height = dims.Y; Length = dims.Z; BlockDBEntries = BlockDBFile.CountEntries(map); path = LevelInfo.PropsPath(map); LevelConfig cfg = new LevelConfig(); cfg.Load(path); Config = cfg; Visit = new LevelAccessController(cfg, map, true); Build = new LevelAccessController(cfg, map, false); }
public void FromOfflineLevel(string name) { this.Name = name; MapName = name; string path = LevelInfo.MapPath(name); Vec3U16 dims = IMapImporter.Formats[0].ReadDimensions(path); Width = dims.X; Height = dims.Y; Length = dims.Z; BlockDBEntries = BlockDBFile.CountEntries(name); path = LevelInfo.PropsPath(name); LevelConfig cfg = new LevelConfig(); cfg.SetDefaults(Height); cfg.Load(path); Config = cfg; Visit = new LevelAccessController(cfg, name, true); Build = new LevelAccessController(cfg, name, false); }