diff --git a/AntiAircraftGun/AntiAircraftGun/MapsCollection.cs b/AntiAircraftGun/AntiAircraftGun/MapsCollection.cs index 7d61c5c..9fafc57 100644 --- a/AntiAircraftGun/AntiAircraftGun/MapsCollection.cs +++ b/AntiAircraftGun/AntiAircraftGun/MapsCollection.cs @@ -42,7 +42,7 @@ namespace AntiAircraftGun /// Карта public void AddMap(string name, AbstractMap map) { - _mapStorages.Add(name, new MapWithSetAntiAircraftGunsGeneric(_pictureWidth, _pictureHeight, map)); + if(!_mapStorages.ContainsKey(name)) _mapStorages.Add(name, new MapWithSetAntiAircraftGunsGeneric(_pictureWidth, _pictureHeight, map)); } /// /// Удаление карты