Hover unit thingy done

This commit is contained in:
Anuken
2022-05-01 10:14:55 -04:00
parent 8ea9c094ab
commit 41a8be1b29
6 changed files with 33 additions and 11 deletions

View File

@@ -4311,7 +4311,7 @@ public class Blocks{
size = 2;
range = 100f;
healAmount = 2f;
healAmount = 1.5f;
consumePower(1f);
consumeLiquid(Liquids.ozone, 3f / 60f);

View File

@@ -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);

View File

@@ -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"){{

View File

@@ -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;

View File

@@ -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);
}
}