Change Map.MapSize from int2 to Size.

This commit is contained in:
Paul Chote
2025-04-19 09:36:00 +01:00
committed by Gustas Kažukauskas
parent 2fbbff2860
commit ede12610a8
28 changed files with 94 additions and 91 deletions

View File

@@ -74,7 +74,7 @@ namespace OpenRA.Mods.Cnc.UtilityCommands
if (!ModData.DefaultTerrainInfo.TryGetValue(tileset, out var terrainInfo))
throw new InvalidDataException($"Unknown tileset {tileset}");
Map = new Map(ModData, terrainInfo, MapSize, MapSize)
Map = new Map(ModData, terrainInfo, new Size(MapSize, MapSize))
{
Title = basic.GetValue("Name", Path.GetFileNameWithoutExtension(filename)),
Author = author,

View File

@@ -76,7 +76,7 @@ namespace OpenRA.Mods.Cnc.UtilityCommands
var usedAreaSize = new Size(iniSize[2], 2 * iniSize[3]);
var mapCanvasSize = new Size(usedAreaSize.Width + Cordon.Left + Cordon.Right, usedAreaSize.Height + Cordon.Top + Cordon.Bottom);
var map = new Map(Game.ModData, terrainInfo, mapCanvasSize.Width, mapCanvasSize.Height)
var map = new Map(Game.ModData, terrainInfo, mapCanvasSize)
{
Title = basic.GetValue("Name", Path.GetFileNameWithoutExtension(filename)),
Author = author,