Point defense blocks
This commit is contained in:
@@ -74,7 +74,7 @@ public class Blocks implements ContentList{
|
||||
coreShard, coreFoundation, coreNucleus, vault, container, unloader,
|
||||
|
||||
//turrets
|
||||
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown,
|
||||
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown, segment,
|
||||
|
||||
//units
|
||||
groundFactory, airFactory, navalFactory, basicReconstructor, repairPoint,
|
||||
@@ -83,7 +83,7 @@ public class Blocks implements ContentList{
|
||||
launchPad, launchPadLarge, coreSilo, dataProcessor,
|
||||
|
||||
//misc experimental
|
||||
blockForge, blockLauncher, blockLoader, blockUnloader;
|
||||
blockForge, blockLoader, blockUnloader;
|
||||
|
||||
@Override
|
||||
public void load(){
|
||||
@@ -1674,6 +1674,18 @@ public class Blocks implements ContentList{
|
||||
consumes.add(new ConsumeLiquidFilter(liquid -> liquid.temperature <= 0.5f && liquid.flammability < 0.1f, 0.5f)).update(false);
|
||||
}};
|
||||
|
||||
segment = new PointDefenseTurret("segment"){{
|
||||
requirements(Category.turret, ItemStack.with(Items.silicon, 80, Items.thorium, 80, Items.surgealloy, 50));
|
||||
|
||||
hasPower = true;
|
||||
consumes.power(1.1f);
|
||||
size = 2;
|
||||
shootLength = 5f;
|
||||
bulletDamage = 12f;
|
||||
reloadTime = 25f;
|
||||
health = 190 * size * size;
|
||||
}};
|
||||
|
||||
//endregion
|
||||
//region units
|
||||
|
||||
@@ -1835,13 +1847,6 @@ public class Blocks implements ContentList{
|
||||
size = 3;
|
||||
}};
|
||||
|
||||
blockLauncher = new BlockLauncher("block-launcher"){{
|
||||
requirements(Category.production, BuildVisibility.debugOnly, ItemStack.with(Items.thorium, 100));
|
||||
size = 3;
|
||||
hasPower = true;
|
||||
consumes.power(2f);
|
||||
}};
|
||||
|
||||
blockLoader = new BlockLoader("block-loader"){{
|
||||
requirements(Category.production, BuildVisibility.debugOnly, ItemStack.with(Items.thorium, 100));
|
||||
hasPower = true;
|
||||
|
||||
@@ -367,6 +367,7 @@ public class Bullets implements ContentList{
|
||||
despawnEffect = Fx.none;
|
||||
status = StatusEffects.shocked;
|
||||
statusDuration = 10f;
|
||||
hittable = false;
|
||||
}};
|
||||
|
||||
healBullet = new HealBulletType(5.2f, 13){{
|
||||
@@ -431,6 +432,7 @@ public class Bullets implements ContentList{
|
||||
despawnEffect = Fx.none;
|
||||
status = StatusEffects.burning;
|
||||
keepVelocity = false;
|
||||
hittable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -455,6 +457,7 @@ public class Bullets implements ContentList{
|
||||
hitEffect = Fx.hitFlameSmall;
|
||||
despawnEffect = Fx.none;
|
||||
status = StatusEffects.burning;
|
||||
hittable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -486,6 +489,7 @@ public class Bullets implements ContentList{
|
||||
drawSize = 420f;
|
||||
lifetime = 16f;
|
||||
pierce = true;
|
||||
hittable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,13 +12,12 @@ import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.ui.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.blocks.experimental.BlockLauncher.*;
|
||||
|
||||
import static arc.graphics.g2d.Draw.rect;
|
||||
import static arc.graphics.g2d.Draw.*;
|
||||
import static arc.graphics.g2d.Lines.*;
|
||||
import static arc.math.Angles.*;
|
||||
import static mindustry.Vars.*;
|
||||
import static mindustry.Vars.tilesize;
|
||||
|
||||
public class Fx{
|
||||
public static final Effect
|
||||
@@ -103,18 +102,21 @@ public class Fx{
|
||||
Fill.circle(x, y, e.fslope() * 1.5f * size);
|
||||
}),
|
||||
|
||||
blockTransfer = new Effect(25f, e -> {
|
||||
if(!(e.data instanceof LaunchedBlock)) return;
|
||||
pointBeam = new Effect(25f, e -> {
|
||||
if(!(e.data instanceof Position)) return;
|
||||
|
||||
LaunchedBlock l = e.data();
|
||||
Position pos = e.data();
|
||||
|
||||
Block block = l.block;
|
||||
Position to = Tmp.v3.set(l.x * tilesize, l.y * tilesize).add(block.offset(), block.offset());
|
||||
Draw.color(e.color);
|
||||
Draw.alpha(e.fout());
|
||||
Lines.stroke(1.5f);
|
||||
Lines.line(e.x, e.y, pos.getX(), pos.getY());
|
||||
}),
|
||||
|
||||
Tmp.v1.set(e.x, e.y).interpolate(Tmp.v2.set(to), e.fin(), Interp.linear);
|
||||
float x = Tmp.v1.x, y = Tmp.v1.y;
|
||||
|
||||
Draw.rect(block.icon(Cicon.full), x, y);
|
||||
pointHit = new Effect(8f, e -> {
|
||||
color(Color.white, e.color, e.fin());
|
||||
stroke(e.fout() * 1f + 0.2f);
|
||||
Lines.circle(e.x, e.y, e.fin() * 6f);
|
||||
}),
|
||||
|
||||
lightning = new Effect(10f, 500f, e -> {
|
||||
@@ -915,6 +917,16 @@ public class Fx{
|
||||
|
||||
}),
|
||||
|
||||
sparkShoot = new Effect(12f, e -> {
|
||||
color(Color.white, e.color, e.fin());
|
||||
stroke(e.fout() * 1.2f + 0.6f);
|
||||
|
||||
randLenVectors(e.id, 7, 25f * e.finpow(), e.rotation, 3f, (x, y) -> {
|
||||
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fslope() * 5f + 0.5f);
|
||||
});
|
||||
|
||||
}),
|
||||
|
||||
lightningShoot = new Effect(12f, e -> {
|
||||
color(Color.white, Pal.lancerLaser, e.fin());
|
||||
stroke(e.fout() * 1.2f + 0.5f);
|
||||
|
||||
Reference in New Issue
Block a user