Rip out preview.pngs
@@ -329,25 +329,6 @@ namespace OpenRA.Editor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SavePreviewImage(string filepath)
|
|
||||||
{
|
|
||||||
var Map = surface1.Map;
|
|
||||||
|
|
||||||
var xs = Map.TopLeft.X;
|
|
||||||
var ys = Map.TopLeft.Y;
|
|
||||||
|
|
||||||
var bitmap = new Bitmap(Map.Width, Map.Height);
|
|
||||||
for (var x = 0; x < Map.Width; x++)
|
|
||||||
for (var y = 0; y < Map.Height; y++)
|
|
||||||
bitmap.SetPixel(x, y, tileset.Terrain[tileset.GetTerrainType(Map.MapTiles[x + xs, y + ys])].Color);
|
|
||||||
|
|
||||||
for (var x = 0; x < Map.Width; x++)
|
|
||||||
for (var y = 0; y < Map.Height; y++)
|
|
||||||
if (Map.MapResources[x + xs, y + ys].type > 0)
|
|
||||||
bitmap.SetPixel(x, y, tileset.Terrain["Ore"].Color);
|
|
||||||
bitmap.Save(filepath, ImageFormat.Png);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SaveClicked(object sender, EventArgs e)
|
void SaveClicked(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (loadedMapName == null)
|
if (loadedMapName == null)
|
||||||
@@ -356,7 +337,6 @@ namespace OpenRA.Editor
|
|||||||
{
|
{
|
||||||
surface1.Map.PlayerCount = surface1.Map.Waypoints.Count;
|
surface1.Map.PlayerCount = surface1.Map.Waypoints.Count;
|
||||||
surface1.Map.Package = new Folder(loadedMapName);
|
surface1.Map.Package = new Folder(loadedMapName);
|
||||||
SavePreviewImage(Path.Combine(loadedMapName, "preview.png"));
|
|
||||||
surface1.Map.Save(loadedMapName);
|
surface1.Map.Save(loadedMapName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 665 B |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 817 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 971 B |
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -1 +0,0 @@
|
|||||||
Maps that are not specific to a single mod go here. In most cases, you want to put maps in mods/$MOD/maps/ instead.
|
|
||||||
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 651 B |