Turret rotation during placement / Status effect display changes
This commit is contained in:
@@ -1013,6 +1013,7 @@ stat.opposites = Opposites
|
|||||||
stat.powercapacity = Power Capacity
|
stat.powercapacity = Power Capacity
|
||||||
stat.powershot = Power/Shot
|
stat.powershot = Power/Shot
|
||||||
stat.damage = Damage
|
stat.damage = Damage
|
||||||
|
stat.frequency = Frequency
|
||||||
stat.targetsair = Targets Air
|
stat.targetsair = Targets Air
|
||||||
stat.targetsground = Targets Ground
|
stat.targetsground = Targets Ground
|
||||||
stat.itemsmoved = Move Speed
|
stat.itemsmoved = Move Speed
|
||||||
@@ -1666,7 +1667,7 @@ block.snow.name = Snow
|
|||||||
block.crater-stone.name = Craters
|
block.crater-stone.name = Craters
|
||||||
block.sand-water.name = Sand Water
|
block.sand-water.name = Sand Water
|
||||||
block.darksand-water.name = Dark Sand Water
|
block.darksand-water.name = Dark Sand Water
|
||||||
block.char.name = Char
|
block.char.name = Charred Stone
|
||||||
block.dacite.name = Dacite
|
block.dacite.name = Dacite
|
||||||
block.rhyolite.name = Rhyolite
|
block.rhyolite.name = Rhyolite
|
||||||
block.dacite-wall.name = Dacite Wall
|
block.dacite-wall.name = Dacite Wall
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
public Interval controlInterval = new Interval();
|
public Interval controlInterval = new Interval();
|
||||||
public @Nullable Block block;
|
public @Nullable Block block;
|
||||||
public boolean overrideLineRotation;
|
public boolean overrideLineRotation;
|
||||||
public int rotation;
|
public int rotation = 1;
|
||||||
public boolean droppingItem;
|
public boolean droppingItem;
|
||||||
public float itemDepositCooldown;
|
public float itemDepositCooldown;
|
||||||
public Group uiGroup;
|
public Group uiGroup;
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ public class CrashHandler{
|
|||||||
return report
|
return report
|
||||||
+ "Version: " + Version.combined() + (Version.buildDate.equals("unknown") ? "" : " (Built " + Version.buildDate + ")") + (Vars.headless ? " (Server)" : "") + "\n"
|
+ "Version: " + Version.combined() + (Version.buildDate.equals("unknown") ? "" : " (Built " + Version.buildDate + ")") + (Vars.headless ? " (Server)" : "") + "\n"
|
||||||
+ "Date: " + new SimpleDateFormat("MMMM d, yyyy HH:mm:ss a", Locale.getDefault()).format(new Date()) + "\n"
|
+ "Date: " + new SimpleDateFormat("MMMM d, yyyy HH:mm:ss a", Locale.getDefault()).format(new Date()) + "\n"
|
||||||
+ "OS: " + OS.osName + (OS.osArchBits != null ? " x" + (OS.osArchBits) : "") + " (" + OS.osArch + ")\n"
|
+ "OS: " + OS.osName + (OS.osArchBits != null ? " x" + (OS.osArchBits) : "") + " (" + OS.osArch + ")\n" +
|
||||||
|
(graphics == null || graphics.getGLVersion() == null ? "" : "GL Version: " + graphics.getGLVersion() + "\n")
|
||||||
+ ((OS.isAndroid || OS.isIos) && app != null ? "Android API level: " + Core.app.getVersion() + "\n" : "")
|
+ ((OS.isAndroid || OS.isIos) && app != null ? "Android API level: " + Core.app.getVersion() + "\n" : "")
|
||||||
+ "Java Version: " + OS.javaVersion + "\n"
|
+ "Java Version: " + OS.javaVersion + "\n"
|
||||||
+ "Runtime Available Memory: " + (Runtime.getRuntime().maxMemory() / 1024 / 1024) + "mb\n"
|
+ "Runtime Available Memory: " + (Runtime.getRuntime().maxMemory() / 1024 / 1024) + "mb\n"
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ public class StatusEffect extends UnlockableContent{
|
|||||||
|
|
||||||
if(intervalDamageTime > 0f && intervalDamage > 0){
|
if(intervalDamageTime > 0f && intervalDamage > 0){
|
||||||
stats.add(Stat.damage, intervalDamage);
|
stats.add(Stat.damage, intervalDamage);
|
||||||
stats.add(Stat.damage, 60f / intervalDamageTime, StatUnit.perSecond);
|
stats.add(Stat.frequency, 60f / intervalDamageTime, StatUnit.perSecond);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean reacts = false;
|
boolean reacts = false;
|
||||||
|
|||||||
@@ -782,22 +782,7 @@ public class UnitType extends UnlockableContent implements Senseable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(immunities.size > 0){
|
if(immunities.size > 0){
|
||||||
var imm = immunities.toSeq().sort();
|
stats.add(Stat.immunities, StatValues.statusEffects(immunities.toSeq().sort()));
|
||||||
//it's redundant to list wet for naval units
|
|
||||||
if(naval){
|
|
||||||
imm.remove(StatusEffects.wet);
|
|
||||||
}
|
|
||||||
stats.add(Stat.immunities, StatValues.statusEffects(imm));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//never actually called; it turns out certain mods have custom weapons that do not need bullets.
|
|
||||||
protected void validateWeapons(){
|
|
||||||
for(int i = 0; i < weapons.size; i++){
|
|
||||||
var wep = weapons.get(i);
|
|
||||||
if(wep.bullet == Bullets.placeholder || wep.bullet == null){
|
|
||||||
throw new RuntimeException("Unit: " + name + ": weapon #" + i + " ('" + wep.name + "') does not have a bullet defined. Make sure you have a bullet: (JSON) or `bullet = ` field in your unit definition.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import mindustry.entities.*;
|
|||||||
import mindustry.entities.Units.*;
|
import mindustry.entities.Units.*;
|
||||||
import mindustry.entities.bullet.*;
|
import mindustry.entities.bullet.*;
|
||||||
import mindustry.entities.pattern.*;
|
import mindustry.entities.pattern.*;
|
||||||
|
import mindustry.entities.units.*;
|
||||||
import mindustry.game.EventType.*;
|
import mindustry.game.EventType.*;
|
||||||
import mindustry.game.*;
|
import mindustry.game.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
@@ -152,10 +153,12 @@ public class Turret extends ReloadTurret{
|
|||||||
public Turret(String name){
|
public Turret(String name){
|
||||||
super(name);
|
super(name);
|
||||||
liquidCapacity = 20f;
|
liquidCapacity = 20f;
|
||||||
quickRotate = false;
|
|
||||||
outlinedIcon = 1;
|
outlinedIcon = 1;
|
||||||
drawLiquidLight = false;
|
drawLiquidLight = false;
|
||||||
sync = true;
|
sync = true;
|
||||||
|
rotate = true;
|
||||||
|
quickRotate = false;
|
||||||
|
drawArrow = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -211,6 +214,11 @@ public class Turret extends ReloadTurret{
|
|||||||
drawer.load(this);
|
drawer.load(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawPlanRegion(BuildPlan plan, Eachable<BuildPlan> list){
|
||||||
|
drawer.drawPlan(this, plan, list);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] icons(){
|
public TextureRegion[] icons(){
|
||||||
return drawer.finalIcons(this);
|
return drawer.finalIcons(this);
|
||||||
@@ -267,6 +275,14 @@ public class Turret extends ReloadTurret{
|
|||||||
|
|
||||||
float lastRangeChange;
|
float lastRangeChange;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void placed(){
|
||||||
|
super.placed();
|
||||||
|
if(rotate){
|
||||||
|
rotation = rotdeg();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void remove(){
|
public void remove(){
|
||||||
super.remove();
|
super.remove();
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import arc.math.*;
|
|||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.entities.part.*;
|
import mindustry.entities.part.*;
|
||||||
|
import mindustry.entities.units.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
@@ -45,6 +46,12 @@ public class DrawTurret extends DrawBlock{
|
|||||||
block.resetGeneratedIcons();
|
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
|
@Override
|
||||||
public void draw(Building build){
|
public void draw(Building build){
|
||||||
Turret turret = (Turret)build.block;
|
Turret turret = (Turret)build.block;
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ public class Stat implements Comparable<Stat>{
|
|||||||
targetsAir = new Stat("targetsAir", StatCat.function),
|
targetsAir = new Stat("targetsAir", StatCat.function),
|
||||||
targetsGround = new Stat("targetsGround", StatCat.function),
|
targetsGround = new Stat("targetsGround", StatCat.function),
|
||||||
damage = new Stat("damage", StatCat.function),
|
damage = new Stat("damage", StatCat.function),
|
||||||
|
frequency = new Stat("frequency", StatCat.function),
|
||||||
ammo = new Stat("ammo", StatCat.function),
|
ammo = new Stat("ammo", StatCat.function),
|
||||||
ammoCapacity = new Stat("ammoCapacity", StatCat.function),
|
ammoCapacity = new Stat("ammoCapacity", StatCat.function),
|
||||||
ammoUse = new Stat("ammoUse", StatCat.function),
|
ammoUse = new Stat("ammoUse", StatCat.function),
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ org.gradle.caching=true
|
|||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
android.enableR8.fullMode=false
|
android.enableR8.fullMode=false
|
||||||
archash=c93f3ff4cb
|
archash=f4edc7709d
|
||||||
|
|||||||
Reference in New Issue
Block a user