Sector bugfixes / More sector info

This commit is contained in:
Anuken
2021-08-03 16:01:27 -04:00
parent 0b036acb75
commit f820121e08
6 changed files with 69 additions and 18 deletions

View File

@@ -15,6 +15,7 @@ import mindustry.core.*;
import mindustry.entities.*;
import mindustry.entities.units.*;
import mindustry.game.EventType.*;
import mindustry.game.*;
import mindustry.gen.*;
import mindustry.graphics.*;
import mindustry.input.*;
@@ -38,6 +39,7 @@ public class PlacementFragment extends Fragment{
Block menuHoverBlock;
Displayable hover;
Object lastDisplayState;
Team lastTeam;
boolean wasHovered;
Table blockTable, toggler, topTable;
ScrollPane blockPane;
@@ -283,13 +285,14 @@ public class PlacementFragment extends Fragment{
//don't refresh unnecessarily
//refresh only when the hover state changes, or the displayed block changes
if(wasHovered == isHovered && lastDisplayState == displayState) return;
if(wasHovered == isHovered && lastDisplayState == displayState && lastTeam == player.team()) return;
topTable.clear();
topTable.top().left().margin(5);
lastDisplayState = displayState;
wasHovered = isHovered;
lastTeam = player.team();
//show details of selected block, with costs
if(displayBlock != null){