This commit is contained in:
BIN
core/assets-raw/sprites/blocks/walls/thruster-top.png
Normal file
BIN
core/assets-raw/sprites/blocks/walls/thruster-top.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 763 B |
Binary file not shown.
|
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 612 B |
@@ -876,7 +876,7 @@ public class Blocks implements ContentList{
|
|||||||
size = 4;
|
size = 4;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
thruster = new Wall("thruster"){{
|
thruster = new Thruster("thruster"){{
|
||||||
health = 55 * 16 * wallHealthMultiplier;
|
health = 55 * 16 * wallHealthMultiplier;
|
||||||
size = 4;
|
size = 4;
|
||||||
}};
|
}};
|
||||||
|
|||||||
37
core/src/mindustry/world/blocks/defense/Thruster.java
Normal file
37
core/src/mindustry/world/blocks/defense/Thruster.java
Normal file
@@ -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<BuildPlan> 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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user