From 11eb5f464f74468e3c5d5b0f3a188a9c8cf1c994 Mon Sep 17 00:00:00 2001 From: Voz-Duh Date: Thu, 24 Sep 2020 17:47:50 +0300 Subject: [PATCH 1/3] Team Indicator For Command Center --- .../blocks/units/command-center-team.png | Bin 0 -> 511 bytes .../sprites/blocks/units/command-center.png | Bin 783 -> 347 bytes .../world/blocks/units/CommandCenter.java | 8 ++++++-- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 core/assets-raw/sprites/blocks/units/command-center-team.png diff --git a/core/assets-raw/sprites/blocks/units/command-center-team.png b/core/assets-raw/sprites/blocks/units/command-center-team.png new file mode 100644 index 0000000000000000000000000000000000000000..b9d27f73c97e409300f7a7841c3298d0f4aee854 GIT binary patch literal 511 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc4O2W_978JN-p)SQd&q&uRXFOVmPO$beksLX z2kQ_=UB>LWSA{f<%{CsM@xJ`0j1u?%GZn|&zC5-lYn#&abxn{?vhJqjR#o1F)}ve4 z?&NPjnqdEXZ`S>&V_FlV8$_qAVVq|Az>4Q+!tz9cx3Q}&gnYss-gaLVQr_k>&)_~& zw$BZ#%0o-p_9P!tpQOH~y0PGi;R!BpsRIyPZ#h5y+`+>iPt32Y+%``|FMWe~$@Yj7 z&-q_+ag;}{h+U&*60Oj~dFcsfE^o#?7T-@U^O)9bI3TU?lI=OaNv+DcY=^bI)7CUh zC}(goa-NXaSfJ*?t}#nW;26u*4|@TFZ#jHXe&$Xy(#UC+4r72Q;U#J*w|xkdT!lvI6-A0X`wFc?AtKW-ZyU>i|%I7?A!ws1K-)v%n*=n1O-sFbFdq&tH)O6x`zJ z;uzv_{OwgoK4wJ@)(hu(8>Aon<-d7rmIag7_+6I7eM zINo9RE)UKx%-_Ds88S@z%rb{@6@yy9VYQ@&YZhC&-BW9HOzvo1Q0@!=(!qYB?G;0$ z%w?ttJ(<29$4U;eivQt06`$YxK;__Db@oTIE|)eQF?D~<)g>r*<73yKiw}2tsIsaF zXRu!4n7HNmzQ;cvdOC4#6ZAPbC1$slgJ^?T=>_iT@okEeb=TYhdEV32&t;ucLK6UF CgmJR~ delta 771 zcmcc3)Xz3SqMn0|fq`LFX5l>s2BvGCE{-7;ac^fB`WVpZ2rWCXXy&Ce>F2ZxKHlZjD5wl&a2AX(37+-yOys034ClP<qWFJoEf@m&p&_3X3f`Tb$;*rS6(tCSwrO zX77W3VfOmg-3+?hP2OC6_57({&Hks)^XmRTW4)!i_<_-z>$lu5sXBN)_!KP)(jA~$ z@KcxT#a*B^2cB+MQ`mK0Q9bdIzH07|&(T3@oVhZJ1ujT0dpse=UdC$A0Po z?RmcSjK+>0kqfVm{mf$wg>ZdD6G|V~csMkEj!F}Gv+V0hV@&sZ%Kpa*oAaKNuG?}UXE^c8f>xb*aYSN?8c z$q=v4iFKH|;O%GkhV4D2jZ>qgzGZ#=T(p_K9Ns>y+y= zB86`TzJ3Pu;)PuqzFFb>^yY8Q3`Ao^R<5^qD~G|L6$? x*P4MzM9AyL+=iwp8@w4?wGy{8ak(Bcx0#Un=dWPJXJBe)@O1TaS?83{1ON`^ZZiM? diff --git a/core/src/mindustry/world/blocks/units/CommandCenter.java b/core/src/mindustry/world/blocks/units/CommandCenter.java index 071bcaf273..ef9e0fbb6b 100644 --- a/core/src/mindustry/world/blocks/units/CommandCenter.java +++ b/core/src/mindustry/world/blocks/units/CommandCenter.java @@ -20,7 +20,7 @@ import mindustry.world.meta.*; public class CommandCenter extends Block{ 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 CommandCenter(String name){ @@ -63,7 +63,11 @@ public class CommandCenter extends Block{ Draw.color(bottomColor); Draw.rect(commandRegions[team.data().command.ordinal()].getRegion(), tile.drawx(), tile.drawy() - 1, size, size); - Draw.color(topColor); + if(topColor == null){ + Draw.color(team.color); + }else{ + Draw.color(topColor); + } Draw.rect(commandRegions[team.data().command.ordinal()].getRegion(), tile.drawx(), tile.drawy(), size, size); Draw.color(); } From d08c54d9a701400f373ea04ba0bec68db6b252fb Mon Sep 17 00:00:00 2001 From: Voz-Duh Date: Thu, 24 Sep 2020 18:10:49 +0300 Subject: [PATCH 2/3] Fix --- core/src/mindustry/world/blocks/units/CommandCenter.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/src/mindustry/world/blocks/units/CommandCenter.java b/core/src/mindustry/world/blocks/units/CommandCenter.java index ef9e0fbb6b..cbad080647 100644 --- a/core/src/mindustry/world/blocks/units/CommandCenter.java +++ b/core/src/mindustry/world/blocks/units/CommandCenter.java @@ -63,11 +63,7 @@ public class CommandCenter extends Block{ Draw.color(bottomColor); Draw.rect(commandRegions[team.data().command.ordinal()].getRegion(), tile.drawx(), tile.drawy() - 1, size, size); - if(topColor == null){ - Draw.color(team.color); - }else{ - 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.color(); } From 110c04e5e338e2477b6ce60e639f966160c89c4f Mon Sep 17 00:00:00 2001 From: Summet Date: Thu, 24 Sep 2020 18:32:57 +0300 Subject: [PATCH 3/3] remove .bat --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8006e6e11a..0c43316cb9 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,9 @@ First, make sure you have [JDK 14](https://adoptopenjdk.net/) installed. Open a #### Windows -_Running:_ `gradlew.bat desktop:run` -_Building:_ `gradlew.bat desktop:dist` -_Sprite Packing:_ `gradlew.bat tools:pack` +_Running:_ `gradlew desktop:run` +_Building:_ `gradlew desktop:dist` +_Sprite Packing:_ `gradlew tools:pack` #### Linux/Mac OS