Turret rotation during placement / Status effect display changes
This commit is contained in:
@@ -17,6 +17,7 @@ import mindustry.entities.*;
|
||||
import mindustry.entities.Units.*;
|
||||
import mindustry.entities.bullet.*;
|
||||
import mindustry.entities.pattern.*;
|
||||
import mindustry.entities.units.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
@@ -152,10 +153,12 @@ public class Turret extends ReloadTurret{
|
||||
public Turret(String name){
|
||||
super(name);
|
||||
liquidCapacity = 20f;
|
||||
quickRotate = false;
|
||||
outlinedIcon = 1;
|
||||
drawLiquidLight = false;
|
||||
sync = true;
|
||||
rotate = true;
|
||||
quickRotate = false;
|
||||
drawArrow = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -211,6 +214,11 @@ public class Turret extends ReloadTurret{
|
||||
drawer.load(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawPlanRegion(BuildPlan plan, Eachable<BuildPlan> list){
|
||||
drawer.drawPlan(this, plan, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureRegion[] icons(){
|
||||
return drawer.finalIcons(this);
|
||||
@@ -267,6 +275,14 @@ public class Turret extends ReloadTurret{
|
||||
|
||||
float lastRangeChange;
|
||||
|
||||
@Override
|
||||
public void placed(){
|
||||
super.placed();
|
||||
if(rotate){
|
||||
rotation = rotdeg();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(){
|
||||
super.remove();
|
||||
|
||||
@@ -6,6 +6,7 @@ import arc.math.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.entities.part.*;
|
||||
import mindustry.entities.units.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.type.*;
|
||||
@@ -45,6 +46,12 @@ public class DrawTurret extends DrawBlock{
|
||||
block.resetGeneratedIcons();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawPlan(Block block, BuildPlan plan, Eachable<BuildPlan> list){
|
||||
Draw.rect(base, plan.drawx(), plan.drawy());
|
||||
Draw.rect(preview, plan.drawx(), plan.drawy(), plan.rotation * 90f - 90f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Building build){
|
||||
Turret turret = (Turret)build.block;
|
||||
|
||||
@@ -85,6 +85,7 @@ public class Stat implements Comparable<Stat>{
|
||||
targetsAir = new Stat("targetsAir", StatCat.function),
|
||||
targetsGround = new Stat("targetsGround", StatCat.function),
|
||||
damage = new Stat("damage", StatCat.function),
|
||||
frequency = new Stat("frequency", StatCat.function),
|
||||
ammo = new Stat("ammo", StatCat.function),
|
||||
ammoCapacity = new Stat("ammoCapacity", StatCat.function),
|
||||
ammoUse = new Stat("ammoUse", StatCat.function),
|
||||
|
||||
Reference in New Issue
Block a user