From 852013cd635d49429964b86e053972725d2b111a Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 21 Dec 2020 20:48:00 -0500 Subject: [PATCH] #4068 --- .../sprites/blocks/walls/thruster-top.png | Bin 0 -> 763 bytes .../sprites/blocks/walls/thruster.png | Bin 683 -> 612 bytes core/src/mindustry/content/Blocks.java | 2 +- .../world/blocks/defense/Thruster.java | 37 ++++++++++++++++++ 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 core/assets-raw/sprites/blocks/walls/thruster-top.png create mode 100644 core/src/mindustry/world/blocks/defense/Thruster.java diff --git a/core/assets-raw/sprites/blocks/walls/thruster-top.png b/core/assets-raw/sprites/blocks/walls/thruster-top.png new file mode 100644 index 0000000000000000000000000000000000000000..0a6bf7f6166f0d3e266fcaaa99162fbce9495cfb GIT binary patch literal 763 zcmeAS@N?(olHy`uVBq!ia0y~yU}ykg4rT@hhA$5${$yZaU@Q)DcVbv~PUa;80|QIC zqpu?a!^VE@KZ&di3=I4MJ|V6Q3=Fg8ZwU*}+;r>`0|Ud)+1r#E7#LVfg8YL2|NsA= z;rBMaUH$ItWJD}F3zyYk1F zdDXv8#?t?L82&70U0|=v@LRv)=p2S8;UBoF8MxOO+&u76ucFnm;k)^awGRs9_Z*Ts z@Y&jD{(}{aafv(+zA`^!mDzGYJBQImjxjEg>%m)r4_w|1{>K}_C73EKIrc1)J#bj# zzV?T%G=}O$3u+s}Wn>z*GOV{SW60!;6XZw;7T9x0{=g!QidO3e+r$rC`3%{Q9*CY} z*jCaI{(~vv5_8-`t^{}SidOXo(b@;1eGFzLP2o3~BQ9{qCGtI}HLo~2o6VrRA-si2 zqV<5b5~EMj1JOnXHpdTK^$h!8PZ6JXTlxc6IfMP{DdBndr9X5nWQ>V?_hBdFdJCD=kr!XHiYlFKYv5)f#=;!dk)EOh`+$Ho`dC!=mXJ-4eOZpD2ZGMZU{fZWOYFM zo_azEV_YJ?L`Xxp1=BH+2cq*D6j>`;wG&(z;~sKL1T=(OF#qEIz?JV%&KUQQ?}hFG z?LUljSu0!>4lrI4+Vki}gBN35VZniI4C^!4dh`xx-(uX$s{Mh>`M?dPJ%@x0wlJ(W zVC~TXh39Q1NXYguzWxdgZr+Nx^Es^TzaNM`Ybdgv%q#OA6ckksb*$@W2nUEf5S`2< z$69f84TIW`4zL%)E*>mzE|&lR literal 0 HcmV?d00001 diff --git a/core/assets-raw/sprites/blocks/walls/thruster.png b/core/assets-raw/sprites/blocks/walls/thruster.png index 0725cc31b297527a9ae5cfdc38f4b003d8c5ceec..90be6bbc53083bba4797776c1c1202327e013adb 100644 GIT binary patch delta 599 zcmZ3@`h;bIL_G^L0|SGhK+O*Z1_s9BAa^H*b?0PWGB7Z(q&xaLGB9lH=l+w(%D}+D z8Q>G*I&1!xO~)>kR`mUua`ZPyu)rg-n1O-sFbFdq&tH+kz`*##)5S3)H>Z>>5&RIw@MG#B)&qyxJ(L>~ zA~doE`~4o8H59HEd77=m%aCB5D!at*;Vsq&>8|20MC}^Bv)`ON#djfNjps?mo8jVo zYzm*W3L3l}>sb;+9t2KcRMqtLke#`NpKnF2bx>EXSnF zo^rrTcO%0NCXf3pE&C63InBy{+||H!z?D(dp_@s11LJ*$2bEhZ8Olr7G#EW%zN7!T zH{@O#|ANrt!U63z4d1Gm%@RQ9pS(iN#+LQlemvb(zc8o%Ks{y&XLwLor4Qd~LR4c4zI&>qO zMMrco-wB=*>^rJ2@CG~x%9#5juQZ0KTsp?K;hNGl53>Vzj#(XLX%KE)t#@Hklg&{U ugMLs11&Aau^e}m4b}@otj78ud1KW#xOE>+0FTudTz~JfX=d#Wzp$Pzni{@_t delta 671 zcmaFDvYK^*L_G%^0|UchyTsEB3`|9yE{-7;x8B}4>wDNifGr@L(=@$gyqmoAWjA4UW6qo2!0%xADEFe;>cDk)40vUP)uxeg*}G14ouHHz;r% zcv!)tAbUVnfrFiai9vvYfdND?F_;TBFf?Sy#43=kFmSko%u`Wj0P{hH zH>9vIFfce6G4U!M|@ui_C)zkPe1^5buD|1-A*k z3Jf`{%nKw~8j3bdci>fI$f)OJW?*30(h4H&c$p6zU&!#oMuvfbp}>WQfv=P4fMFqD zS4c)t$eJhCI#LYBk9zNE6JTJNPy;fPi6QLR!-^^on^#s0Gju+FclzAQbqsg@{jLXj&B>f$T3xaN z14F|%29kA%6To5%1ZeLTLBv;HUEEWE&K1Yd)zaN<7RAFkZJ&OEhvJ(vBbc{ m@KJz)qn&|)K}|wU@}T~Ne+nx5XY#xPsq%F7b6Mw<&;$UYG|^E2 diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 66871284bb..eecae2782a 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -876,7 +876,7 @@ public class Blocks implements ContentList{ size = 4; }}; - thruster = new Wall("thruster"){{ + thruster = new Thruster("thruster"){{ health = 55 * 16 * wallHealthMultiplier; size = 4; }}; diff --git a/core/src/mindustry/world/blocks/defense/Thruster.java b/core/src/mindustry/world/blocks/defense/Thruster.java new file mode 100644 index 0000000000..89c9a28c12 --- /dev/null +++ b/core/src/mindustry/world/blocks/defense/Thruster.java @@ -0,0 +1,37 @@ +package mindustry.world.blocks.defense; + +import arc.graphics.g2d.*; +import arc.util.*; +import mindustry.annotations.Annotations.*; +import mindustry.entities.units.*; + +public class Thruster extends Wall{ + public @Load("@-top") TextureRegion topRegion; + + public Thruster(String name){ + super(name); + rotate = true; + quickRotate = false; + } + + @Override + public void drawRequestRegion(BuildPlan req, Eachable list){ + Draw.rect(region, req.drawx(), req.drawy()); + Draw.rect(topRegion, req.drawx(), req.drawy(), req.rotation * 90); + } + + @Override + public TextureRegion[] icons(){ + return new TextureRegion[]{region, topRegion}; + } + + public class ThrusterBuild extends WallBuild{ + + @Override + public void draw(){ + super.draw(); + + Draw.rect(topRegion, x, y, rotdeg()); + } + } +}