Fixed minimap not updating when build team changes

This commit is contained in:
Anuken
2021-08-05 14:20:23 -04:00
parent 66ce3e75ec
commit 6fdbe1d5f0
3 changed files with 24 additions and 1 deletions

View File

@@ -33,13 +33,18 @@ public class MinimapRenderer{
updateAll();
});
//make sure to call on the graphics thread
Events.on(TileChangeEvent.class, event -> {
//TODO don't update when the minimap is off?
if(!ui.editor.isShown()){
update(event.tile);
}
});
Events.on(BuildTeamChangeEvent.class, event -> {
if(!ui.editor.isShown()){
update(event.build.tile);
}
});
}
public Pixmap getPixmap(){