Skip to content

Commit

Permalink
[HaCreator] QOL - automatically re-generate minimap upon saving.
Browse files Browse the repository at this point in the history
  • Loading branch information
lastbattle committed May 23, 2023
1 parent bf4c7bd commit 7fe95dd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions HaCreator/GUI/Save.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,17 @@ private void saveButton_Click(object sender, EventArgs e)
}
MapType type = GetIdBoxMapType();
MapSaver saver = new MapSaver(board);

// Regenerate minimap first
board.RegenerateMinimap();

if (type == MapType.RegularMap)
{
int newId = int.Parse(idBox.Text);
saver.ChangeMapTypeAndID(newId, MapType.RegularMap);
saver.SaveMapImage();
saver.UpdateMapLists();

MessageBox.Show("Saved map with ID: " + newId.ToString());
}
else
Expand Down

0 comments on commit 7fe95dd

Please sign in to comment.