mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-03 03:31:28 +03:00
Fixed incorrect revealed blocks on some maps
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -73,9 +73,19 @@ public class MapFixer{
|
||||
|
||||
editor.beginEdit(map);
|
||||
|
||||
if(!map.name().equals(targetName)){
|
||||
Log.info("Changed name: '@' -> '@'", map.name(), targetName);
|
||||
map.tags.put("name", targetName);
|
||||
if(!state.rules.bannedBlocks.isEmpty()) Log.warn("@: Banned blocks found: @", map.name(), state.rules.bannedBlocks);
|
||||
if(!state.rules.bannedUnits.isEmpty()) Log.warn("@: Banned units found: @", map.name(), state.rules.bannedUnits);
|
||||
|
||||
if(!map.name().equals(targetName) || state.rules.revealedBlocks.size > 0){
|
||||
if(!state.rules.revealedBlocks.isEmpty()){
|
||||
Log.info("@: Clearing revealed blocks: @", map.name(), state.rules.revealedBlocks);
|
||||
state.rules.revealedBlocks.clear();
|
||||
}
|
||||
|
||||
if(!map.name().equals(targetName)){
|
||||
Log.info("Changed name: '@' -> '@'", map.name(), targetName);
|
||||
map.tags.put("name", targetName);
|
||||
}
|
||||
|
||||
MapIO.writeMap(f, map);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user