WIP point laser turret

This commit is contained in:
Anuken
2022-06-23 20:57:22 -04:00
parent ac47d22ea1
commit be61b45d08
18 changed files with 202 additions and 61 deletions

View File

@@ -8,6 +8,7 @@ import mindustry.entities.*;
import mindustry.entities.bullet.*;
import mindustry.entities.effect.*;
import mindustry.entities.part.*;
import mindustry.entities.part.DrawPart.*;
import mindustry.entities.pattern.*;
import mindustry.gen.*;
import mindustry.graphics.*;
@@ -23,8 +24,6 @@ import mindustry.world.blocks.heat.*;
import mindustry.world.blocks.legacy.*;
import mindustry.world.blocks.liquid.*;
import mindustry.world.blocks.logic.*;
import mindustry.world.blocks.payloads.PayloadConveyor;
import mindustry.world.blocks.payloads.PayloadRouter;
import mindustry.world.blocks.payloads.*;
import mindustry.world.blocks.power.*;
import mindustry.world.blocks.production.*;
@@ -135,7 +134,7 @@ public class Blocks{
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, foreshadow, spectre, meltdown, segment, parallax, tsunami,
//turrets - erekir
breach, diffuse, sublimate, titan, disperse, afflict, fracture,
breach, diffuse, sublimate, titan, disperse, afflict, lustre,
//units
groundFactory, airFactory, navalFactory,
@@ -4081,7 +4080,6 @@ public class Blocks{
limitRange(-5f);
}};
//TODO WIP
afflict = new PowerTurret("afflict"){{
requirements(Category.turret, with(Items.surgeAlloy, 100, Items.silicon, 200, Items.graphite, 250, Items.oxide, 40));
@@ -4197,61 +4195,33 @@ public class Blocks{
limitRange(9f);
}};
if(false)
fracture = new ItemTurret("fracture"){{
lustre = new ContinuousTurret("lustre"){{
requirements(Category.turret, with(Items.beryllium, 150, Items.silicon, 200, Items.graphite, 200, Items.carbide, 50));
ammo(
Items.tungsten, new BasicBulletType(8f, 41){{
knockback = 4f;
width = 25f;
hitSize = 7f;
height = 20f;
shootEffect = Fx.shootBigColor;
smokeEffect = Fx.shootSmokeSquareSparse;
ammoMultiplier = 1;
hitColor = backColor = trailColor = Color.valueOf("ea8878");
frontColor = Color.valueOf("feb380");
trailWidth = 6f;
trailLength = 3;
hitEffect = despawnEffect = Fx.hitSquaresColor;
buildingDamageMultiplier = 0.2f;
range = 100f;
if(false)
spawnBullets.add(new BulletType(){{
instantDisappear = true;
lightning = 6;
lightningLength = 10;
lightningLengthRand = 10;
lightningColor = Color.valueOf("ff6214");
lightningCone = 20f;
damage = 30;
despawnEffect = hitEffect = Fx.none;
}});
}}
);
coolantMultiplier = 6f;
shake = 1f;
//shoot = new ShootAlternate(){{
// shots = 3;
// barrels = 3;
//}};
shootType = new PointLaserBulletType(){{
damage = 150f;
buildingDamageMultiplier = 0.3f;
hitColor = Color.valueOf("fd9e81");
}};
drawer = new DrawTurret("reinforced-"){{
var heatp = PartProgress.warmup.blend(p -> Mathf.absin(2f, 1f) * p.warmup, 0.2f);
parts.add(new RegionPart("-blade"){{
progress = PartProgress.warmup;
heatProgress = PartProgress.warmup.blend(PartProgress.recoil, 0.2f);
heatProgress = PartProgress.warmup;
heatColor = Color.valueOf("ff6214");
mirror = true;
under = true;
moveX = 2f;
moveRot = -7f;
moves.add(new PartMove(PartProgress.recoil, 0f, -2f, 3f));
moves.add(new PartMove(PartProgress.warmup, 0f, -2f, 3f));
}},
new RegionPart("-inner"){{
progress = PartProgress.recoil;
heatProgress = heatp;
progress = PartProgress.warmup;
heatColor = Color.valueOf("ff6214");
mirror = true;
under = false;
@@ -4259,26 +4229,32 @@ public class Blocks{
moveY = -8f;
}},
new RegionPart("-mid"){{
heatProgress = PartProgress.warmup.blend(PartProgress.recoil, 0.2f);
heatProgress = heatp;
progress = PartProgress.warmup;
heatColor = Color.valueOf("ff6214");
moveY = -8f;
progress = PartProgress.recoil;
mirror = false;
under = true;
}});
}};
shootY = 11f;
shootWarmupSpeed = 0.08f;
shootCone = 360f;
aimChangeSpeed = 0.9f;
rotateSpeed = 0.9f;
shootY = 0.5f;
outlineColor = Pal.darkOutline;
size = 4;
envEnabled |= Env.space;
reload = 30f;
recoil = 2f;
range = 125;
range = 250f;
scaledHealth = 210;
rotateSpeed = 3f;
coolant = consume(new ConsumeLiquid(Liquids.water, 15f / 60f));
//TODO is this a good idea to begin with?
unitSort = UnitSorts.strongest;
consumeLiquid(Liquids.nitrogen, 5f / 60f);
}};
//TODO 3 more turrets.