Skip to content

Commit

Permalink
Fix level designer not saving pickups
Browse files Browse the repository at this point in the history
  • Loading branch information
TollyH committed Dec 1, 2022
1 parent 18bbc21 commit 5992948
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions CSMaze/Level.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,19 +166,19 @@ public JsonLevel GetJsonLevel()
}

List<int[]> exitKeys = new();
foreach (Point key in ExitKeys)
foreach (Point key in OriginalExitKeys)
{
exitKeys.Add(key.ToArray());
}

List<int[]> keySensors = new();
foreach (Point sensor in KeySensors)
foreach (Point sensor in OriginalKeySensors)
{
keySensors.Add(sensor.ToArray());
}

List<int[]> guns = new();
foreach (Point gun in Guns)
foreach (Point gun in OriginalGuns)
{
guns.Add(gun.ToArray());
}
Expand Down
2 changes: 1 addition & 1 deletion CSMazeDesigner/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ private void CanvasMouseEvent(MouseEventArgs e, bool wasClick)
if (lvl.Decorations.ContainsKey(clickedTile))
{
AddToUndo();
_ = lvl.Decorations.Remove(clickedTile);
lvl.Decorations = lvl.Decorations.Remove(clickedTile);
}
else
{
Expand Down

0 comments on commit 5992948

Please sign in to comment.