Renamed Map to CityMap
This commit is contained in:
@ -17,7 +17,7 @@ namespace TransportGame.Generator
|
||||
private float LotSquareMaxSize { get { return ConfigManager.Buildgen.LotSquareMaxSize; } }
|
||||
private float LotSpacing { get { return ConfigManager.Buildgen.LotSpacing; } }
|
||||
|
||||
private Map map;
|
||||
private CityMap map;
|
||||
QuadTree<RoadNode> nodeTree;
|
||||
QuadTree<BuildingLot> lotTree;
|
||||
|
||||
@ -214,7 +214,7 @@ namespace TransportGame.Generator
|
||||
return b;
|
||||
}
|
||||
|
||||
public void Generate(Map map)
|
||||
public void Generate(CityMap map)
|
||||
{
|
||||
this.map = map;
|
||||
map.Buildings = new List<Building>();
|
||||
|
@ -19,9 +19,9 @@ namespace TransportGame.Generator
|
||||
/// <param name="width">Width</param>
|
||||
/// <param name="height">Height</param>
|
||||
/// <returns>City</returns>
|
||||
public Map Generate(int width, int height)
|
||||
public CityMap Generate(int width, int height)
|
||||
{
|
||||
Map map;
|
||||
CityMap map;
|
||||
|
||||
// Generate terrain
|
||||
TerrainGenerator terrainGen = new TerrainGenerator();
|
||||
|
@ -11,7 +11,7 @@ namespace TransportGame.Generator
|
||||
{
|
||||
System.Random random = new System.Random();
|
||||
|
||||
public void Generate(Map map)
|
||||
public void Generate(CityMap map)
|
||||
{
|
||||
// Generate range
|
||||
float mp = (float)(map.Width * map.Height) / (1024 * 1024); // For 4k x 4k range should be around 900
|
||||
|
@ -49,7 +49,7 @@ namespace TransportGame.Generator
|
||||
List<RoadGeneratorSegment> queue;
|
||||
|
||||
System.Random random = new System.Random();
|
||||
Map map;
|
||||
CityMap map;
|
||||
|
||||
private float HighwaySegmentLength { get { return ConfigManager.Roadgen.HighwaySegmentLength; } }
|
||||
private float DefaultBranchPopulationTreshold { get { return ConfigManager.Roadgen.DefaultBranchPopulationTreshold; } }
|
||||
@ -71,7 +71,7 @@ namespace TransportGame.Generator
|
||||
{
|
||||
}
|
||||
|
||||
public void Initialize(Map map)
|
||||
public void Initialize(CityMap map)
|
||||
{
|
||||
this.map = map;
|
||||
map.RoadNetwork = new RoadNetwork();
|
||||
@ -142,7 +142,7 @@ namespace TransportGame.Generator
|
||||
return !map.IsInside(p.X, p.Y) || map.IsWater(p.X, p.Y) || map.GetSteepness(p.X, p.Y) > SteepnessLimit;
|
||||
}
|
||||
|
||||
public void Generate(Map map)
|
||||
public void Generate(CityMap map)
|
||||
{
|
||||
Initialize(map);
|
||||
|
||||
|
@ -34,10 +34,10 @@ namespace TransportGame.Generator
|
||||
Noise.Scale = ConfigManager.Tergen.ElevationScale;
|
||||
}
|
||||
|
||||
public Map Generate(int width, int height)
|
||||
public CityMap Generate(int width, int height)
|
||||
{
|
||||
// Create map
|
||||
Map map = new Map(width, height);
|
||||
CityMap map = new CityMap(width, height);
|
||||
|
||||
// Pick a random biome
|
||||
map.Biome = PickBiome();
|
||||
@ -61,7 +61,7 @@ namespace TransportGame.Generator
|
||||
return BiomeManager.Biomes.ElementAt(biome);
|
||||
}
|
||||
|
||||
private void GenerateElevation(Map map)
|
||||
private void GenerateElevation(CityMap map)
|
||||
{
|
||||
for (int x = 0; x < map.Width; ++x)
|
||||
for (int y = 0; y < map.Height; ++y)
|
||||
|
Reference in New Issue
Block a user