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 0000000000..0a6bf7f616 Binary files /dev/null and b/core/assets-raw/sprites/blocks/walls/thruster-top.png differ diff --git a/core/assets-raw/sprites/blocks/walls/thruster.png b/core/assets-raw/sprites/blocks/walls/thruster.png index 0725cc31b2..90be6bbc53 100644 Binary files a/core/assets-raw/sprites/blocks/walls/thruster.png and b/core/assets-raw/sprites/blocks/walls/thruster.png differ 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()); + } + } +}