Load and save maps using packages.
This commit is contained in:
@@ -60,7 +60,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
ValidateMapFormat(format);
|
||||
|
||||
var tileset = GetTileset(mapSection);
|
||||
Map = new Map(Rules.TileSets[tileset], MapSize, MapSize)
|
||||
Map = new Map(modData, Rules.TileSets[tileset], MapSize, MapSize)
|
||||
{
|
||||
Title = basic.GetValue("Name", Path.GetFileNameWithoutExtension(filename)),
|
||||
Author = "Westwood Studios"
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
var maxTerrainHeight = world.Map.Grid.MaximumTerrainHeight;
|
||||
var tileset = modRules.TileSets[tilesetDropDown.Text];
|
||||
var map = new Map(tileset, width + 2, height + maxTerrainHeight + 2);
|
||||
var map = new Map(Game.ModData, tileset, width + 2, height + maxTerrainHeight + 2);
|
||||
|
||||
var tl = new PPos(1, 1);
|
||||
var br = new PPos(width, height + maxTerrainHeight);
|
||||
|
||||
@@ -168,7 +168,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
// Update the map cache so it can be loaded without restarting the game
|
||||
var classification = mapDirectories[directoryDropdown.Text];
|
||||
modData.MapCache[map.Uid].UpdateFromMap(map.Container, classification, null, map.Grid.Type);
|
||||
modData.MapCache[map.Uid].UpdateFromMap(map.Package, classification, null, map.Grid.Type);
|
||||
|
||||
Console.WriteLine("Saved current map at {0}", combinedPath);
|
||||
Ui.CloseWindow();
|
||||
|
||||
Reference in New Issue
Block a user