Merge pull request #2701 from Voz-Duh/team-indicator-for-command-center

Team Indicator For Command Center
This commit is contained in:
Anuken
2020-09-24 11:16:12 -04:00
committed by GitHub
3 changed files with 2 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 783 B

After

Width:  |  Height:  |  Size: 347 B

View File

@@ -20,7 +20,7 @@ import mindustry.world.meta.*;
public class CommandCenter extends Block{ public class CommandCenter extends Block{
public TextureRegionDrawable[] commandRegions = new TextureRegionDrawable[UnitCommand.all.length]; public TextureRegionDrawable[] commandRegions = new TextureRegionDrawable[UnitCommand.all.length];
public Color topColor = Pal.command, bottomColor = Color.valueOf("5e5e5e"); public Color topColor = null, bottomColor = Color.valueOf("5e5e5e");
public Effect effect = Fx.commandSend; public Effect effect = Fx.commandSend;
public CommandCenter(String name){ public CommandCenter(String name){
@@ -63,7 +63,7 @@ public class CommandCenter extends Block{
Draw.color(bottomColor); Draw.color(bottomColor);
Draw.rect(commandRegions[team.data().command.ordinal()].getRegion(), tile.drawx(), tile.drawy() - 1, size, size); Draw.rect(commandRegions[team.data().command.ordinal()].getRegion(), tile.drawx(), tile.drawy() - 1, size, size);
Draw.color(topColor); Draw.color(topColor == null ? team.color : topColor);
Draw.rect(commandRegions[team.data().command.ordinal()].getRegion(), tile.drawx(), tile.drawy(), size, size); Draw.rect(commandRegions[team.data().command.ordinal()].getRegion(), tile.drawx(), tile.drawy(), size, size);
Draw.color(); Draw.color();
} }