예제 #1
0
        public void ReturnHandler(object sender, MapReturnedEventArgs e)
        {
            Config config = Main.Get().GetConfig();

            HeightData data = Main.GetResizedHeightData(e.HeightMap, Math.Min(e.HeightMap.Width, (int)config.mapDetailLevel), Math.Min(e.HeightMap.Height, (int)config.mapDetailLevel));

            e.HeightMap.Dispose();

            Main.StretchHeightValues(ref data);

            if (this.maps.Contains(e.Label))
            {
                this.WriteToConsole("Warning: Map with label \"" + e.Label + "\" was returned more than once!");
                this.maps[e.Label] = data;
            }
            else
            {
                this.maps.Add(e.Label, data);
            }
        }
예제 #2
0
        public void ReturnHandler(object sender, MapReturnedEventArgs e){
            Config config = Main.Get().GetConfig();

            HeightData data = Main.GetResizedHeightData(e.HeightMap, Math.Min(e.HeightMap.Width, (int)config.mapDetailLevel), Math.Min(e.HeightMap.Height, (int)config.mapDetailLevel));

            e.HeightMap.Dispose();

            Main.StretchHeightValues(ref data);

            if (this.maps.Contains(e.Label))
            {
                this.WriteToConsole("Warning: Map with label \"" + e.Label + "\" was returned more than once!");
                this.maps[e.Label] = data;
            }
            else
            {
                this.maps.Add(e.Label, data);
            }
        }