Minor bugfixes
This commit is contained in:
@@ -188,7 +188,7 @@ public class ContentParser{
|
|||||||
case "delay" -> base.delay(data.getFloat("amount"));
|
case "delay" -> base.delay(data.getFloat("amount"));
|
||||||
case "sustain" -> base.sustain(data.getFloat("offset", 0f), data.getFloat("grow", 0f), data.getFloat("sustain"));
|
case "sustain" -> base.sustain(data.getFloat("offset", 0f), data.getFloat("grow", 0f), data.getFloat("sustain"));
|
||||||
case "shorten" -> base.shorten(data.getFloat("amount"));
|
case "shorten" -> base.shorten(data.getFloat("amount"));
|
||||||
case "add" -> base.add(data.getFloat("amount"));
|
case "add" -> data.has("amount") ? base.add(data.getFloat("amount")) : base.add(parser.readValue(PartProgress.class, data.get("other")));
|
||||||
case "blend" -> base.blend(parser.readValue(PartProgress.class, data.get("other")), data.getFloat("amount"));
|
case "blend" -> base.blend(parser.readValue(PartProgress.class, data.get("other")), data.getFloat("amount"));
|
||||||
case "mul" -> base.mul(parser.readValue(PartProgress.class, data.get("other")));
|
case "mul" -> base.mul(parser.readValue(PartProgress.class, data.get("other")));
|
||||||
case "min" -> base.min(parser.readValue(PartProgress.class, data.get("other")));
|
case "min" -> base.min(parser.readValue(PartProgress.class, data.get("other")));
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ public class Weapon implements Cloneable{
|
|||||||
DrawPart.params.sideMultiplier = flipSprite ? -1 : 1;
|
DrawPart.params.sideMultiplier = flipSprite ? -1 : 1;
|
||||||
|
|
||||||
for(int i = 0; i < parts.size; i++){
|
for(int i = 0; i < parts.size; i++){
|
||||||
var part = parts.items[i];
|
var part = parts.get(i);
|
||||||
if(part.under){
|
if(part.under){
|
||||||
part.draw(DrawPart.params);
|
part.draw(DrawPart.params);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package mindustry.type.weapons;
|
package mindustry.type.weapons;
|
||||||
|
|
||||||
|
import arc.graphics.g2d.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import mindustry.entities.bullet.*;
|
import mindustry.entities.bullet.*;
|
||||||
import mindustry.entities.units.*;
|
import mindustry.entities.units.*;
|
||||||
@@ -54,6 +55,7 @@ public class BuildWeapon extends Weapon{
|
|||||||
|
|
||||||
if(unit.activelyBuilding()){
|
if(unit.activelyBuilding()){
|
||||||
float
|
float
|
||||||
|
z = Draw.z(),
|
||||||
rotation = unit.rotation - 90,
|
rotation = unit.rotation - 90,
|
||||||
weaponRotation = rotation + (rotate ? mount.rotation : 0),
|
weaponRotation = rotation + (rotate ? mount.rotation : 0),
|
||||||
wx = unit.x + Angles.trnsx(rotation, x, y) + Angles.trnsx(weaponRotation, 0, -mount.recoil),
|
wx = unit.x + Angles.trnsx(rotation, x, y) + Angles.trnsx(weaponRotation, 0, -mount.recoil),
|
||||||
@@ -62,6 +64,7 @@ public class BuildWeapon extends Weapon{
|
|||||||
py = wy + Angles.trnsy(weaponRotation, this.shootX, this.shootY);
|
py = wy + Angles.trnsy(weaponRotation, this.shootX, this.shootY);
|
||||||
|
|
||||||
unit.drawBuildingBeam(px, py);
|
unit.drawBuildingBeam(px, py);
|
||||||
|
Draw.z(z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,4 +25,4 @@ org.gradle.caching=true
|
|||||||
#used for slow jitpack builds; TODO see if this actually works
|
#used for slow jitpack builds; TODO see if this actually works
|
||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
archash=a02840762b
|
archash=c4505eb469
|
||||||
|
|||||||
Reference in New Issue
Block a user