Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken
2018-09-14 10:53:27 -04:00
45 changed files with 1147 additions and 936 deletions

View File

@@ -217,7 +217,7 @@ public class AmmoTypes implements ContentList{
spectreLaser = new AmmoType(TurretBullets.lancerLaser);
meltdownLaser = new AmmoType(TurretBullets.lancerLaser);
meltdownLaser = new AmmoType(TurretBullets.meltdownLaser);
fuseShotgun = new AmmoType(Items.densealloy, TurretBullets.fuseShot, 1f){{
shootEffect = Fx.none;

View File

@@ -19,8 +19,8 @@ public class Recipes implements ContentList{
new Recipe(defense, DefenseBlocks.copperWall, new ItemStack(Items.copper, 12));
new Recipe(defense, DefenseBlocks.copperWallLarge, new ItemStack(Items.copper, 12 * 4));
new Recipe(defense, DefenseBlocks.compositeWall, new ItemStack(Items.densealloy, 12));
new Recipe(defense, DefenseBlocks.compositeWallLarge, new ItemStack(Items.densealloy, 12 * 4));
new Recipe(defense, DefenseBlocks.denseAlloyWall, new ItemStack(Items.densealloy, 12));
new Recipe(defense, DefenseBlocks.denseAlloyWallLarge, new ItemStack(Items.densealloy, 12 * 4));
new Recipe(defense, DefenseBlocks.door, new ItemStack(Items.densealloy, 12), new ItemStack(Items.silicon, 8));
new Recipe(defense, DefenseBlocks.doorLarge, new ItemStack(Items.densealloy, 12 * 4), new ItemStack(Items.silicon, 8 * 4));
@@ -35,7 +35,7 @@ public class Recipes implements ContentList{
new Recipe(defense, DefenseBlocks.surgeWallLarge, new ItemStack(Items.surgealloy, 12 * 4));
//projectors
new Recipe(defense, DefenseBlocks.mendProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250));
new Recipe(defense, DefenseBlocks.mendProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 50), new ItemStack(Items.silicon, 250));
new Recipe(defense, DefenseBlocks.overdriveProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250));
new Recipe(defense, DefenseBlocks.forceProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250));

View File

@@ -57,7 +57,7 @@ public class CraftingBlocks extends BlockList implements ContentList{
plastaniumCompressor = new PlastaniumCompressor("plastanium-compressor"){{
hasItems = true;
liquidCapacity = 60f;
craftTime = 80f;
craftTime = 60f;
output = Items.plastanium;
itemCapacity = 30;
size = 2;
@@ -67,7 +67,7 @@ public class CraftingBlocks extends BlockList implements ContentList{
updateEffect = BlockFx.plasticburn;
consumes.liquid(Liquids.oil, 0.25f);
consumes.power(0.25f);
consumes.power(0.3f);
consumes.item(Items.titanium, 2);
}};

View File

@@ -114,10 +114,9 @@ public class DebugBlocks extends BlockList implements ContentList{
for(int i = 0; i < items.size; i++){
if(i == 0) continue;
final int f = i;
ImageButton button = cont.addImageButton("white", "toggle", 24, () -> {
ImageButton button = cont.addImageButton("liquid-icon-" + items.get(i).name, "toggle", 24, () -> {
Call.setLiquidSourceLiquid(null, tile, items.get(f));
}).size(38, 42).padBottom(-5.1f).group(group).get();
button.getStyle().imageUpColor = items.get(i).color;
button.setChecked(entity.source.id == f);
if(i % 4 == 3){

View File

@@ -7,7 +7,7 @@ import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.blocks.defense.*;
public class DefenseBlocks extends BlockList implements ContentList{
public static Block copperWall, copperWallLarge, compositeWall, compositeWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge,
public static Block copperWall, copperWallLarge, denseAlloyWall, denseAlloyWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge,
phaseWall, phaseWallLarge, surgeWall, surgeWallLarge, mendProjector, overdriveProjector, forceProjector, shockMine;
@Override
@@ -23,11 +23,11 @@ public class DefenseBlocks extends BlockList implements ContentList{
size = 2;
}};
compositeWall = new Wall("composite-wall"){{
denseAlloyWall = new Wall("dense-alloy-wall"){{
health = 110 * wallHealthMultiplier;
}};
compositeWallLarge = new Wall("composite-wall-large"){{
denseAlloyWallLarge = new Wall("dense-alloy-wall-large"){{
health = 110 * wallHealthMultiplier * 4;
size = 2;
}};

View File

@@ -19,7 +19,7 @@ public class LiquidBlocks extends BlockList implements ContentList{
rotaryPump = new Pump("rotary-pump"){{
shadow = "shadow-rounded-2";
pumpAmount = 0.25f;
pumpAmount = 0.2f;
consumes.power(0.015f);
liquidCapacity = 30f;
powerCapacity = 20f;
@@ -30,7 +30,7 @@ public class LiquidBlocks extends BlockList implements ContentList{
thermalPump = new Pump("thermal-pump"){{
shadow = "shadow-rounded-2";
pumpAmount = 0.55f;
pumpAmount = 0.3f;
consumes.power(0.03f);
liquidCapacity = 40f;
hasPower = true;

View File

@@ -22,7 +22,7 @@ public class PowerBlocks extends BlockList implements ContentList{
thermalGenerator = new LiquidHeatGenerator("thermal-generator"){{
maxLiquidGenerate = 0.5f;
powerCapacity = 40f;
powerPerLiquid = 1.5f;
powerPerLiquid = 1f;
generateEffect = BlockFx.redgeneratespark;
size = 2;
}};

View File

@@ -82,7 +82,7 @@ public class TurretBlocks extends BlockList implements ContentList{
};
}};
lancer = new LaserTurret("lancer"){{
lancer = new ChargeTurret("lancer"){{
range = 90f;
chargeTime = 60f;
chargeMaxDelay = 30f;
@@ -105,7 +105,7 @@ public class TurretBlocks extends BlockList implements ContentList{
arc = new PowerTurret("arc"){{
shootType = AmmoTypes.arc;
reload = 30f;
reload = 40f;
shootShake = 1f;
powerUsed = 5f;
powerCapacity = 30f;
@@ -216,10 +216,13 @@ public class TurretBlocks extends BlockList implements ContentList{
spectre = new DoubleTurret("spectre"){{
ammoTypes = new AmmoType[]{AmmoTypes.bulletDenseBig, AmmoTypes.bulletPyratiteBig, AmmoTypes.bulletThoriumBig};
reload = 4f;
restitution = 0.03f;
ammoUseEffect = ShootFx.shellEjectMedium;
reload = 6f;
coolantMultiplier = 0.5f;
maxCoolantUsed = 1.5f;
restitution = 0.1f;
ammoUseEffect = ShootFx.shellEjectBig;
range = 200f;
inaccuracy = 3f;
recoil = 3f;
xRand = 3f;
shotWidth = 4f;
@@ -231,9 +234,19 @@ public class TurretBlocks extends BlockList implements ContentList{
health = 155 * size * size;
}};
meltdown = new PowerTurret("meltdown"){{
meltdown = new LaserTurret("meltdown"){{
shootType = AmmoTypes.meltdownLaser;
shootEffect = ShootFx.shootBigSmoke2;
shootCone = 40f;
recoil = 4f;
size = 4;
shootShake = 2f;
powerUsed = 10f;
range = 160f;
reload = 130f;
firingMoveFract = 0.25f;
shootDuration = 180f;
powerCapacity = 50f;
}};
}
}

View File

@@ -20,10 +20,7 @@ import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.distribution.MassDriver.DriverBulletData;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.graphics.Fill;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.graphics.Shapes;
import io.anuke.ucore.graphics.*;
import io.anuke.ucore.util.Angles;
import io.anuke.ucore.util.Mathf;
@@ -31,7 +28,7 @@ import static io.anuke.mindustry.Vars.content;
import static io.anuke.mindustry.Vars.world;
public class TurretBullets extends BulletList implements ContentList{
public static BulletType fireball, basicFlame, lancerLaser, fuseShot, waterShot, cryoShot, lavaShot, oilShot, lightning, driverBolt, healBullet, arc;
public static BulletType fireball, basicFlame, lancerLaser, meltdownLaser, fuseShot, waterShot, cryoShot, lavaShot, oilShot, lightning, driverBolt, healBullet, arc;
@Override
public void load(){
@@ -161,6 +158,55 @@ public class TurretBullets extends BulletList implements ContentList{
}
};
meltdownLaser = new BulletType(0.001f, 20){
Color tmpColor = new Color();
Color[] colors = {Color.valueOf("ec745855"), Color.valueOf("ec7458aa"), Color.valueOf("ff9c5a"), Color.WHITE};
float[] tscales = {1f, 0.7f, 0.5f, 0.2f};
float[] strokes = {2f, 1.5f, 1f, 0.3f};
float[] lenscales = {1f, 1.12f, 1.15f, 1.17f};
float length = 200f;
{
hiteffect = BulletFx.hitMeltdown;
despawneffect = Fx.none;
hitsize = 4;
lifetime = 16f;
pierce = true;
}
@Override
public void update(Bullet b){
if(b.timer.get(1, 5f)){
Damage.collideLine(b, b.getTeam(), hiteffect, b.x, b.y, b.angle(), length);
}
Effects.shake(1f, 1f, b.x, b.y);
}
@Override
public void hit(Bullet b, float hitx, float hity){
Effects.effect(hiteffect, colors[2], hitx, hity);
if(Mathf.chance(0.4)){
Fire.create(world.tileWorld(hitx, hity));
}
}
@Override
public void draw(Bullet b){
float baseLen = (length) * b.fout();
Lines.lineAngle(b.x, b.y, b.angle(), baseLen);
for(int s = 0; s < colors.length; s++){
Draw.color(tmpColor.set(colors[s]).mul(1f + Mathf.absin(Timers.time(), 1f, 0.1f)));
for(int i = 0; i < tscales.length; i++){
vector.trns(b.angle() + 180f, (lenscales[i] - 1f) * 35f);
Lines.stroke((9f + Mathf.absin(Timers.time(), 0.8f, 1.5f)) * b.fout() * strokes[s] * tscales[i]);
Lines.lineAngle(b.x + vector.x, b.y + vector.y, b.angle(), baseLen * lenscales[i], CapStyle.none);
}
}
Draw.reset();
}
};
fuseShot = new BulletType(0.01f, 70){
int rays = 3;
float raySpace = 2f;

View File

@@ -11,7 +11,7 @@ import io.anuke.ucore.util.Angles;
import io.anuke.ucore.util.Mathf;
public class BulletFx extends FxList implements ContentList{
public static Effect hitBulletSmall, hitFuse, hitBulletBig, hitFlameSmall, hitLiquid, hitLaser, hitLancer, despawn, flakExplosion, blastExplosion, plasticExplosion,
public static Effect hitBulletSmall, hitFuse, hitBulletBig, hitFlameSmall, hitLiquid, hitLaser, hitLancer, hitMeltdown, despawn, flakExplosion, blastExplosion, plasticExplosion,
artilleryTrail, incendTrail, missileTrail, absorb, flakExplosionBig, plasticExplosionFlak;
@Override
@@ -101,6 +101,18 @@ public class BulletFx extends FxList implements ContentList{
Draw.reset();
});
hitMeltdown = new Effect(12, e -> {
Draw.color(Palette.meltdownHit);
Lines.stroke(e.fout() * 2f);
Angles.randLenVectors(e.id, 6, e.finpow() * 18f, e.rotation, 360f, (x, y) -> {
float ang = Mathf.atan2(x, y);
Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1f);
});
Draw.reset();
});
hitLaser = new Effect(8, e -> {
Draw.color(Color.WHITE, Palette.heal, e.fin());
Lines.stroke(0.5f + e.fout());