private void save() { for (int i = 0; i < rooms.Count; i++) { if (!RoomHelper.SpawnDefined(rooms[i])) { notifications.Push($"Player spawn is not defined in room-{i}", NotificationState.Bad); return; } if (rooms[i].RoomCompletionType == RoomCompletionType.Warp && !RoomHelper.EndDefined(rooms[i])) { notifications.Push($"Room end is not defined in room-{i}", NotificationState.Bad); return; } } LevelStorage.CreateLevel(name, new Level { Rooms = rooms.ToList() }); notifications.Push("Level has been saved!", NotificationState.Good); }