Walker in tech tree

This commit is contained in:
Anuken 2022-05-02 17:51:40 -04:00
parent 4d54b8251d
commit 068c0dbe4d
7 changed files with 45 additions and 36 deletions

View File

@ -2002,7 +2002,7 @@ block.small-deconstructor.name = Small Deconstructor
block.canvas.name = Canvas
block.world-processor.name = World Processor
block.world-cell.name = World Cell
block.shield-breaker.name = Shield Breaker
block.shield-breaker.name = Shield Breaker (temp name/sprite)
block.tank-fabricator.name = Tank Fabricator
block.mech-fabricator.name = Mech Fabricator
block.ship-fabricator.name = Ship Fabricator

View File

@ -59,7 +59,7 @@ public class PhysicsProcess implements AsyncProcess{
PhysicRef ref = entity.physref;
ref.body.layer =
entity.type.allowLegStep ? layerLegs :
entity.type.allowLegStep && entity.type.legPhysicsLayer ? layerLegs :
entity.isGrounded() ? layerGround : layerFlying;
ref.x = entity.x;
ref.y = entity.y;

View File

@ -3761,39 +3761,34 @@ public class Blocks{
diffuse = new ItemTurret("diffuse"){{
requirements(Category.turret, with(Items.beryllium, 150, Items.silicon, 150, Items.graphite, 250));
Effect sfe = new MultiEffect(Fx.shootBigColor, Fx.colorSparkBig);
ammo(
Items.graphite, new BasicBulletType(8f, 30){{
knockback = 5f;
width = 25f;
hitSize = 7f;
height = 20f;
lifetime = 20f;
shootEffect = sfe;
shootEffect = Fx.shootTitan;
smokeEffect = Fx.shootBigSmoke;
ammoMultiplier = 1;
pierceCap = 2;
pierce = true;
pierceBuilding = true;
hitColor = backColor = trailColor = Pal.berylShot;
ammoMultiplier = 4;
hitColor = backColor = trailColor = Color.valueOf("ea8878");
frontColor = Color.white;
trailWidth = 5f;
trailLength = 4;
trailWidth = 6f;
trailLength = 3;
hitEffect = despawnEffect = Fx.hitBulletColor;
buildingDamageMultiplier = 0.3f;
buildingDamageMultiplier = 0.2f;
}}
);
shoot = new ShootSpread(){{
shots = 14;
spread = 3f;
shots = 15;
spread = 4f;
}};
coolantMultiplier = 6f;
shootShake = 1f;
ammoPerShot = 1;
maxAmmo = 50;
drawer = new DrawTurret("reinforced-");
shootY = 5f;
outlineColor = Pal.darkOutline;
@ -3802,7 +3797,7 @@ public class Blocks{
reload = 30f;
recoilAmount = 2f;
restitution = 0.03f;
range = 190;
range = 100;
shootCone = 3f;
scaledHealth = 180;
rotateSpeed = 2f;

View File

@ -281,34 +281,45 @@ public class ErekirTechTree{
});
node(basicReconstructor, Seq.with(new OnSector(three)), () -> {
node(UnitTypes.latum);
node(UnitTypes.avert);
node(UnitTypes.locus);
node(mechFabricator, Seq.with(new OnSector(two)), () -> {
node(UnitTypes.merui, () -> {
node(tankAssembler, Seq.with(new OnSector(three), new Research(constructor), new Research(atmosphericConcentrator)), () -> {
node(UnitTypes.vanquish, () -> {
node(UnitTypes.conquer, Seq.with(tmpNever), () -> {
});
node(shipFabricator, Seq.with(new OnSector(three)), () -> {
node(UnitTypes.osc, () -> {
});
});
node(shipAssembler, Seq.with(new OnSector(five)), () -> {
node(UnitTypes.quell, () -> {
node(UnitTypes.disrupt, Seq.with(tmpNever), () -> {
node(basicReconstructor, Seq.with(new OnSector(three)), () -> {
node(UnitTypes.latum);
node(UnitTypes.avert);
node(UnitTypes.locus);
node(tankAssembler, Seq.with(new OnSector(three), new Research(constructor), new Research(atmosphericConcentrator)), () -> {
node(UnitTypes.vanquish, () -> {
node(UnitTypes.conquer, Seq.with(tmpNever), () -> {
});
});
});
node(mechAssembler, Seq.with(tmpNever), () -> {
node(UnitTypes.bulwark, () -> {
node(UnitTypes.krepost, Seq.with(tmpNever), () -> {
node(shipAssembler, Seq.with(new OnSector(five)), () -> {
node(UnitTypes.quell, () -> {
node(UnitTypes.disrupt, Seq.with(tmpNever), () -> {
});
});
node(mechAssembler, Seq.with(tmpNever), () -> {
node(UnitTypes.bulwark, () -> {
node(UnitTypes.krepost, Seq.with(tmpNever), () -> {
});
});
});
});
});
});
});
});
});

View File

@ -2921,7 +2921,8 @@ public class UnitTypes{
rippleScale = 0.2f;
legMoveSpace = 1f;
hovering = true;
allowLegStep = true;
legPhysicsLayer = false;
shadowElevation = 0.1f;
groundLayer = Layer.legUnit - 1f;

View File

@ -178,6 +178,8 @@ public class UnitType extends UnlockableContent{
rotateToBuilding = true,
/** if true and this is a legged unit, this unit can walk over blocks. */
allowLegStep = false,
/** for legged units, setting this to false forces it to be on the ground physics layer. */
legPhysicsLayer = true,
/** if true, this unit cannot drown, and will not be affected by the floor under it. */
hovering = false,
/** if true, this unit can move in any direction regardless of rotation. if false, this unit can only move in the direction it is facing. */

View File

@ -505,8 +505,8 @@ public class Turret extends ReloadTurret{
//TODO aimX / aimY for multi shot turrets?
handleBullet(type.create(this, team, bulletX, bulletY, shootAngle, -1f, 1f + Mathf.range(velocityInaccuracy), lifeScl, null, mover, targetPos.x, targetPos.y), xOffset, yOffset, angleOffset);
(shootEffect == Fx.none ? type.shootEffect : shootEffect).at(bulletX, bulletY, rotation, type.hitColor);
(smokeEffect == Fx.none ? type.smokeEffect : smokeEffect).at(bulletX, bulletY, rotation, type.hitColor);
(shootEffect == Fx.none ? type.shootEffect : shootEffect).at(bulletX, bulletY, rotation + angleOffset, type.hitColor);
(smokeEffect == Fx.none ? type.smokeEffect : smokeEffect).at(bulletX, bulletY, rotation + angleOffset, type.hitColor);
shootSound.at(bulletX, bulletY, Mathf.random(soundPitchMin, soundPitchMax));
ammoUseEffect.at(