using GraphProcessor; // Add the namespace
//...
public class Map {
// ...
public virtual void GenerateMap(World world) // Replace the GenerateMap with this method
{
MapData mdata = MapData.Get(map_id);
System.Random seed_rand = new System.Random(seed);
System.Random gen_rand = new System.Random(seed + map_id.GetHashCode());
mdata.map.SetParameterValue("Map", this);
mdata.map.SetParameterValue("Seed", seed_rand);
mdata.map.SetParameterValue("GenSeed", gen_rand);
new ProcessGraphProcessor(mdata.map).Run();
}
public int Depth()
{
return locations.Any() ? locations.Keys.OrderBy(k => k).Last() / 100 : 0;
}
//...
}
max_scroll = map.Depth() * row_spacing - cam_width + row_offset;
if (location != null && location.depth == world_data.GetMap(map).Depth())