Finished road generator
This commit is contained in:
@ -14,20 +14,7 @@ namespace TransportGame.MapViewer.Storage
|
||||
{
|
||||
public static Map Read(string file)
|
||||
{
|
||||
Map map = SerializationHelper.DeserializeXml<Map>(file);
|
||||
|
||||
// Fix road network issue
|
||||
foreach (var pair in map.RoadNetwork.ArticulationSegments)
|
||||
pair.Value.ParentNetwork = map.RoadNetwork;
|
||||
|
||||
foreach (var pair in map.RoadNetwork.IntersectionSegments)
|
||||
pair.Value.ParentNetwork = map.RoadNetwork;
|
||||
|
||||
foreach (var pair in map.RoadNetwork.Nodes)
|
||||
pair.Value.ParentNetwork = map.RoadNetwork;
|
||||
|
||||
// Done
|
||||
return map;
|
||||
return SerializationHelper.DeserializeXml<Map>(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user