diff --git a/core/assets-raw/sprites/units/weapons/osc-weapon.png b/core/assets-raw/sprites/units/weapons/osc-weapon.png new file mode 100644 index 0000000000..b3c65bcfed Binary files /dev/null and b/core/assets-raw/sprites/units/weapons/osc-weapon.png differ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 340aeec41b..9b0c310003 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -4311,7 +4311,7 @@ public class Blocks{ size = 2; range = 100f; - healAmount = 2f; + healAmount = 1.5f; consumePower(1f); consumeLiquid(Liquids.ozone, 3f / 60f); diff --git a/core/src/mindustry/content/ErekirTechTree.java b/core/src/mindustry/content/ErekirTechTree.java index 95de086bc9..581a4dc664 100644 --- a/core/src/mindustry/content/ErekirTechTree.java +++ b/core/src/mindustry/content/ErekirTechTree.java @@ -277,6 +277,10 @@ public class ErekirTechTree{ }); + node(unitRepairTower, Seq.with(new OnSector(two)), () -> { + + }); + node(basicReconstructor, Seq.with(new OnSector(three)), () -> { node(UnitTypes.latum); node(UnitTypes.avert); diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 0e6547c38a..04d4a21131 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -3398,8 +3398,6 @@ public class UnitTypes{ engineSize = 2f; itemCapacity = 0; useEngineElevation = false; - trailLength = 5; - trailScl = 1.1f; for(float f : new float[]{-3f, 3f}){ parts.add(new HoverPart(){{ @@ -3413,6 +3411,29 @@ public class UnitTypes{ color = Color.valueOf("bf92f9"); }}); } + + weapons.add(new Weapon("osc-weapon"){{ + y = 3f; + x = 3f; + mirror = true; + layerOffset = -0.0001f; + reload = 40f; + + bullet = new BasicBulletType(5f, 20){{ + pierceCap = 2; + pierceBuilding = false; + width = 7f; + height = 12f; + lifetime = 25f; + shootEffect = Fx.sparkShoot; + smokeEffect = Fx.shootBigSmoke; + hitColor = backColor = trailColor = Pal.suppress; + frontColor = Color.white; + trailWidth = 1.5f; + trailLength = 5; + hitEffect = despawnEffect = Fx.hitBulletColor; + }}; + }}); }}; avert = new ErekirUnitType("avert"){{ diff --git a/core/src/mindustry/type/Weapon.java b/core/src/mindustry/type/Weapon.java index d72a5ea3f3..047d348a19 100644 --- a/core/src/mindustry/type/Weapon.java +++ b/core/src/mindustry/type/Weapon.java @@ -56,7 +56,7 @@ public class Weapon implements Cloneable{ /** rotation speed of weapon when rotation is enabled, in degrees/t*/ public float rotateSpeed = 20f; /** weapon reload in frames */ - public float reload; + public float reload = 1; /** inaccuracy of degrees of each shot */ public float inaccuracy = 0f; diff --git a/core/src/mindustry/world/blocks/distribution/Conveyor.java b/core/src/mindustry/world/blocks/distribution/Conveyor.java index 093f31aa1b..bb03d4e395 100644 --- a/core/src/mindustry/world/blocks/distribution/Conveyor.java +++ b/core/src/mindustry/world/blocks/distribution/Conveyor.java @@ -25,9 +25,6 @@ public class Conveyor extends Block implements Autotiler{ private static final float itemSpace = 0.4f; private static final int capacity = 3; - final Vec2 tr1 = new Vec2(); - final Vec2 tr2 = new Vec2(); - public @Load(value = "@-#1-#2", lengths = {7, 4}) TextureRegion[][] regions; public float speed = 0f; @@ -162,12 +159,12 @@ public class Conveyor extends Block implements Autotiler{ for(int i = 0; i < len; i++){ Item item = ids[i]; - tr1.trns(rotation * 90, tilesize, 0); - tr2.trns(rotation * 90, -tilesize / 2f, xs[i] * tilesize / 2f); + Tmp.v1.trns(rotation * 90, tilesize, 0); + Tmp.v2.trns(rotation * 90, -tilesize / 2f, xs[i] * tilesize / 2f); Draw.rect(item.fullIcon, - (x + tr1.x * ys[i] + tr2.x), - (y + tr1.y * ys[i] + tr2.y), + (x + Tmp.v1.x * ys[i] + Tmp.v2.x), + (y + Tmp.v1.y * ys[i] + Tmp.v2.y), itemSize, itemSize); } }