Fixes
This commit is contained in:
parent
d553376508
commit
8abded35c8
@ -147,6 +147,7 @@ public class MapsCollection {
|
|||||||
if (!map.getMap().getClass().getSimpleName().equals(reader.readLine())) {
|
if (!map.getMap().getClass().getSimpleName().equals(reader.readLine())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
map._setArtilleries.clear();
|
||||||
} else {
|
} else {
|
||||||
map = switch (reader.readLine()) {
|
map = switch (reader.readLine()) {
|
||||||
case "SimpleMap" -> new MapWithSetArtilleriesGeneric<>(_pictureWidth, _pictureHeight, new SimpleMap());
|
case "SimpleMap" -> new MapWithSetArtilleriesGeneric<>(_pictureWidth, _pictureHeight, new SimpleMap());
|
||||||
@ -155,8 +156,6 @@ public class MapsCollection {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
map._setArtilleries.clear();
|
|
||||||
|
|
||||||
while ((currentLine = reader.readLine()) != null) {
|
while ((currentLine = reader.readLine()) != null) {
|
||||||
map._setArtilleries.insert(DrawingObjectArtillery.create(currentLine));
|
map._setArtilleries.insert(DrawingObjectArtillery.create(currentLine));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user