From a8a4d314dff1f80970090e9d364f36e787df73d6 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 17 Apr 2022 22:12:17 -0400 Subject: [PATCH] simplify ExtendMap usage --- src/SMAPI/Framework/Content/AssetDataForMap.cs | 3 ++- src/SMAPI/IAssetDataForMap.cs | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SMAPI/Framework/Content/AssetDataForMap.cs b/src/SMAPI/Framework/Content/AssetDataForMap.cs index 133dcc6c..8674461e 100644 --- a/src/SMAPI/Framework/Content/AssetDataForMap.cs +++ b/src/SMAPI/Framework/Content/AssetDataForMap.cs @@ -151,9 +151,10 @@ namespace StardewModdingAPI.Framework.Content } /// - public bool ExtendMap(Map map, int minWidth, int minHeight) + public bool ExtendMap(int minWidth = 0, int minHeight = 0) { bool resized = false; + Map map = this.Data; // resize layers foreach (Layer layer in map.Layers) diff --git a/src/SMAPI/IAssetDataForMap.cs b/src/SMAPI/IAssetDataForMap.cs index 19bdf3b2..dcc7135d 100644 --- a/src/SMAPI/IAssetDataForMap.cs +++ b/src/SMAPI/IAssetDataForMap.cs @@ -17,10 +17,9 @@ namespace StardewModdingAPI void PatchMap(Map source, Rectangle? sourceArea = null, Rectangle? targetArea = null, PatchMapMode patchMode = PatchMapMode.Overlay); /// Extend the map if needed to fit the given size. Note that this is an expensive operation and resizes the map in-place. - /// The map to resize. /// The minimum map width in tiles. /// The minimum map height in tiles. /// Whether the map was resized. - bool ExtendMap(Map map, int minWidth, int minHeight); + bool ExtendMap(int minWidth = 0, int minHeight = 0); } }