From ce2896cb38a722c65c0a55525ea063fb06a65116 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 26 Jul 2018 23:04:37 -0400 Subject: [PATCH] Command center name added / Regression fix --- core/assets/bundles/bundle.properties | 1 + core/src/io/anuke/mindustry/content/fx/BlockFx.java | 6 ++++-- core/src/io/anuke/mindustry/graphics/OverlayRenderer.java | 2 +- core/src/io/anuke/mindustry/graphics/Palette.java | 2 ++ .../anuke/mindustry/world/blocks/units/CommandCenter.java | 3 ++- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 1873d1a0cd..b861d6c0eb 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -531,3 +531,4 @@ block.bridge-conduit.name=Bridge Conduit block.rotary-pump.name=Rotary Pump block.nuclear-reactor.name=Nuclear Reactor block.interceptor-factory.name=Interceptor Factory +block.command-center.name=Command Center diff --git a/core/src/io/anuke/mindustry/content/fx/BlockFx.java b/core/src/io/anuke/mindustry/content/fx/BlockFx.java index 7540ae78d7..626e40520a 100644 --- a/core/src/io/anuke/mindustry/content/fx/BlockFx.java +++ b/core/src/io/anuke/mindustry/content/fx/BlockFx.java @@ -278,9 +278,11 @@ public class BlockFx extends FxList implements ContentList{ Draw.reset(); }); - commandSend = new Effect(30, e -> { + commandSend = new Effect(28, e -> { + Draw.color(Palette.command); Lines.stroke(e.fout() * 2f); - Lines.poly(e.x, e.y, 40, 4f + e.fin() * 120f); + Lines.poly(e.x, e.y, 40, 4f + e.finpow() * 120f); + Draw.color(); }); } } diff --git a/core/src/io/anuke/mindustry/graphics/OverlayRenderer.java b/core/src/io/anuke/mindustry/graphics/OverlayRenderer.java index b3115f2f52..2b8d7afd71 100644 --- a/core/src/io/anuke/mindustry/graphics/OverlayRenderer.java +++ b/core/src/io/anuke/mindustry/graphics/OverlayRenderer.java @@ -65,7 +65,7 @@ public class OverlayRenderer{ Vector2 vec = Graphics.world(input.getMouseX(), input.getMouseY()); Tile tile = world.tileWorld(vec.x, vec.y); - if(tile != null && tile.block() != Blocks.air && tile.getTeam() == players[0].getTeam()){ + if(tile != null && tile.block() != Blocks.air && tile.target().getTeam() == players[0].getTeam()){ Tile target = tile.target(); if(showBlockDebug && target.entity != null){ diff --git a/core/src/io/anuke/mindustry/graphics/Palette.java b/core/src/io/anuke/mindustry/graphics/Palette.java index 1f369df6f2..d62d980823 100644 --- a/core/src/io/anuke/mindustry/graphics/Palette.java +++ b/core/src/io/anuke/mindustry/graphics/Palette.java @@ -3,6 +3,8 @@ package io.anuke.mindustry.graphics; import com.badlogic.gdx.graphics.Color; public class Palette{ + public static final Color command = Color.valueOf("eab678"); + public static final Color bulletYellow = Color.valueOf("ffeec9"); public static final Color bulletYellowBack = Color.valueOf("f9c87a"); diff --git a/core/src/io/anuke/mindustry/world/blocks/units/CommandCenter.java b/core/src/io/anuke/mindustry/world/blocks/units/CommandCenter.java index 942a6706c3..39d1b31486 100644 --- a/core/src/io/anuke/mindustry/world/blocks/units/CommandCenter.java +++ b/core/src/io/anuke/mindustry/world/blocks/units/CommandCenter.java @@ -11,6 +11,7 @@ import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.units.BaseUnit; import io.anuke.mindustry.entities.units.UnitCommand; import io.anuke.mindustry.gen.Call; +import io.anuke.mindustry.graphics.Palette; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.meta.BlockFlag; @@ -26,7 +27,7 @@ import static io.anuke.mindustry.Vars.*; public class CommandCenter extends Block{ protected TextureRegion[] commandRegions = new TextureRegion[UnitCommand.values().length]; - protected Color topColor = Color.valueOf("eab678"); + protected Color topColor = Palette.command; protected Color bottomColor = Color.valueOf("5e5e5e"); protected Effect effect = BlockFx.commandSend;