diff --git a/core/assets-raw/sprites/blocks/power/steam-generator-turbine1.png b/core/assets-raw/sprites/blocks/power/steam-generator-turbine.png similarity index 100% rename from core/assets-raw/sprites/blocks/power/steam-generator-turbine1.png rename to core/assets-raw/sprites/blocks/power/steam-generator-turbine.png diff --git a/core/assets-raw/sprites/blocks/power/steam-generator-turbine0.png b/core/assets-raw/sprites/blocks/power/steam-generator-turbine0.png deleted file mode 100644 index 27d0b9354c..0000000000 Binary files a/core/assets-raw/sprites/blocks/power/steam-generator-turbine0.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/production/spore-press-bottom.png b/core/assets-raw/sprites/blocks/production/spore-press-bottom.png new file mode 100644 index 0000000000..a100086fe3 Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/spore-press-bottom.png differ diff --git a/core/assets-raw/sprites/blocks/production/spore-press-frame0.png b/core/assets-raw/sprites/blocks/production/spore-press-frame0.png deleted file mode 100644 index a8b86d93bd..0000000000 Binary files a/core/assets-raw/sprites/blocks/production/spore-press-frame0.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/production/spore-press-frame1.png b/core/assets-raw/sprites/blocks/production/spore-press-frame1.png deleted file mode 100644 index 9b403cb9ce..0000000000 Binary files a/core/assets-raw/sprites/blocks/production/spore-press-frame1.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/production/spore-press-frame2.png b/core/assets-raw/sprites/blocks/production/spore-press-frame2.png deleted file mode 100644 index 34f8aad11b..0000000000 Binary files a/core/assets-raw/sprites/blocks/production/spore-press-frame2.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/production/spore-press-piston0.png b/core/assets-raw/sprites/blocks/production/spore-press-piston0.png new file mode 100644 index 0000000000..80dec747a0 Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/spore-press-piston0.png differ diff --git a/core/assets-raw/sprites/blocks/production/spore-press-piston1.png b/core/assets-raw/sprites/blocks/production/spore-press-piston1.png new file mode 100644 index 0000000000..e1b46944ab Binary files /dev/null and b/core/assets-raw/sprites/blocks/production/spore-press-piston1.png differ diff --git a/core/assets-raw/sprites/blocks/production/spore-press.png b/core/assets-raw/sprites/blocks/production/spore-press.png index ae5aee87b3..f1a2f020a8 100644 Binary files a/core/assets-raw/sprites/blocks/production/spore-press.png and b/core/assets-raw/sprites/blocks/production/spore-press.png differ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 574888aabb..3e9b2e2e48 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -1092,8 +1092,11 @@ public class Blocks{ hasPower = true; craftEffect = Fx.none; drawer = new DrawMulti( + new DrawRegion("-bottom"), + new DrawPistons(){{ + sinMag = 1f; + }}, new DrawDefault(), - new DrawFrames(), new DrawLiquidRegion(), new DrawRegion("-top") ); @@ -2298,7 +2301,18 @@ public class Blocks{ consume(new ConsumeItemFlammable()); consume(new ConsumeItemExplode()); - drawer = new DrawMulti(new DrawDefault(), new DrawWarmupRegion(), new DrawTurbines()); + drawer = new DrawMulti( + new DrawDefault(), + new DrawWarmupRegion(), + new DrawRegion("-turbine"){{ + rotateSpeed = 2f; + }}, + new DrawRegion("-turbine"){{ + rotateSpeed = -2f; + rotation = 45f; + }}, + new DrawRegion("-cap") + ); }}; differentialGenerator = new ConsumeGenerator("differential-generator"){{ diff --git a/core/src/mindustry/mod/ClassMap.java b/core/src/mindustry/mod/ClassMap.java index cd09d64cc5..c95603abac 100644 --- a/core/src/mindustry/mod/ClassMap.java +++ b/core/src/mindustry/mod/ClassMap.java @@ -447,7 +447,6 @@ public class ClassMap{ classes.put("DrawShape", mindustry.world.draw.DrawShape.class); classes.put("DrawSideRegion", mindustry.world.draw.DrawSideRegion.class); classes.put("DrawSpikes", mindustry.world.draw.DrawSpikes.class); - classes.put("DrawTurbines", mindustry.world.draw.DrawTurbines.class); classes.put("DrawTurret", mindustry.world.draw.DrawTurret.class); classes.put("DrawWarmupRegion", mindustry.world.draw.DrawWarmupRegion.class); classes.put("DrawWeave", mindustry.world.draw.DrawWeave.class); diff --git a/core/src/mindustry/world/draw/DrawRegion.java b/core/src/mindustry/world/draw/DrawRegion.java index df04838cfd..492310eafb 100644 --- a/core/src/mindustry/world/draw/DrawRegion.java +++ b/core/src/mindustry/world/draw/DrawRegion.java @@ -13,7 +13,7 @@ public class DrawRegion extends DrawBlock{ public String suffix = ""; public boolean spinSprite = false; public boolean drawPlan = true; - public float rotateSpeed, x, y; + public float rotateSpeed, x, y, rotation; /** Any number <=0 disables layer changes. */ public float layer = -1; @@ -29,9 +29,9 @@ public class DrawRegion extends DrawBlock{ float z = Draw.z(); if(layer > 0) Draw.z(layer); if(spinSprite){ - Drawf.spinSprite(region, build.x + x, build.y + y, build.totalProgress() * rotateSpeed); + Drawf.spinSprite(region, build.x + x, build.y + y, build.totalProgress() * rotateSpeed + rotation); }else{ - Draw.rect(region, build.x + x, build.y + y, build.totalProgress() * rotateSpeed); + Draw.rect(region, build.x + x, build.y + y, build.totalProgress() * rotateSpeed + rotation); } Draw.z(z); } diff --git a/core/src/mindustry/world/draw/DrawTurbines.java b/core/src/mindustry/world/draw/DrawTurbines.java deleted file mode 100644 index 11273d94aa..0000000000 --- a/core/src/mindustry/world/draw/DrawTurbines.java +++ /dev/null @@ -1,39 +0,0 @@ -package mindustry.world.draw; - -import arc.*; -import arc.graphics.g2d.*; -import mindustry.gen.*; -import mindustry.world.*; - -public class DrawTurbines extends DrawBlock{ - public TextureRegion[] turbines = new TextureRegion[2]; - public TextureRegion cap; - public float turbineSpeed = 2f; - - @Override - public void draw(Building build){ - float totalTime = build.totalProgress(); - Draw.rect(turbines[0], build.x, build.y, totalTime * turbineSpeed); - Draw.rect(turbines[1], build.x, build.y, -totalTime * turbineSpeed); - - if(cap.found()){ - Draw.rect(cap, build.x, build.y); - } - } - - @Override - public void load(Block block){ - super.load(block); - - cap = Core.atlas.find(block.name + "-cap"); - - for(int i = 0; i < 2; i++){ - turbines[i] = Core.atlas.find(block.name + "-turbine" + i); - } - } - - @Override - public TextureRegion[] icons(Block block){ - return new TextureRegion[]{turbines[0], turbines[1], cap}; - } -}