This commit is contained in:
ChipsEater 2022-11-22 15:59:06 +04:00
parent d553376508
commit 8abded35c8

View File

@ -147,6 +147,7 @@ public class MapsCollection {
if (!map.getMap().getClass().getSimpleName().equals(reader.readLine())) {
return false;
}
map._setArtilleries.clear();
} else {
map = switch (reader.readLine()) {
case "SimpleMap" -> new MapWithSetArtilleriesGeneric<>(_pictureWidth, _pictureHeight, new SimpleMap());
@ -155,8 +156,6 @@ public class MapsCollection {
};
}
map._setArtilleries.clear();
while ((currentLine = reader.readLine()) != null) {
map._setArtilleries.insert(DrawingObjectArtillery.create(currentLine));
}