Better launch / Better spawns / Tweaks

This commit is contained in:
Anuken
2019-01-27 18:09:59 -05:00
parent da9278ad8d
commit db2e6b6973
27 changed files with 1636 additions and 1479 deletions

View File

@@ -33,7 +33,7 @@ public class Blocks implements ContentList{
//environment
air, part, spawn, space, metalfloor, deepwater, water, tar, stone, craters, charr, blackstone, dirt, sand, ice, snow,
grass, shrub, rock, icerock, blackrock, rocks, cliffs, pine,
grass, shrub, rock, icerock, blackrock, rocks, cliffs, pine, whiteTree,
//crafting
siliconSmelter, graphitePress, plastaniumCompressor, multiPress, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer,
@@ -223,6 +223,9 @@ public class Blocks implements ContentList{
variants = 0;
}};
whiteTree = new TreeBlock("white-tree-dead"){{
}};
//endregion
//region crafting
@@ -860,9 +863,6 @@ public class Blocks implements ContentList{
health = 1100;
itemCapacity = 1000;
launchThreshold = 500;
launchTime = 60f * 10;
launchChunkSize = 100;
}};
vault = new Vault("vault"){{

View File

@@ -10,6 +10,7 @@ import io.anuke.arc.math.Angles;
import io.anuke.arc.math.Mathf;
import io.anuke.arc.util.Tmp;
import io.anuke.mindustry.entities.effect.GroundEffectEntity.GroundEffect;
import io.anuke.mindustry.entities.units.BaseUnit;
import io.anuke.mindustry.game.ContentList;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.graphics.Shapes;
@@ -32,13 +33,27 @@ public class Fx implements ContentList{
bigShockwave, nuclearShockwave, explosion, blockExplosion, blockExplosionSmoke, shootSmall, shootHeal, shootSmallSmoke, shootBig, shootBig2, shootBigSmoke,
shootBigSmoke2, shootSmallFlame, shootLiquid, shellEjectSmall, shellEjectMedium,
shellEjectBig, lancerLaserShoot, lancerLaserShootSmoke, lancerLaserCharge, lancerLaserChargeBegin, lightningCharge, lightningShoot,
launchFull;
launchFull, unitSpawn, spawnShockwave;
@Override
public void load(){
none = new Effect(0, 0f, e -> {});
unitSpawn = new Effect(30f, e -> {
if(!(e.data instanceof BaseUnit)) return;
Draw.alpha(e.fin());
float scl = 1f + e.fout()*2f;
BaseUnit unit = (BaseUnit)e.data;
Draw.rect(unit.getIconRegion(), e.x, e.y,
unit.getIconRegion().getWidth() * Draw.scl * scl, unit.getIconRegion().getWidth() * Draw.scl * scl, 180f);
Draw.reset();
});
placeBlock = new Effect(16, e -> {
Draw.color(Palette.accent);
Lines.stroke(3f - e.fin() * 2f);
@@ -78,10 +93,10 @@ public class Fx implements ContentList{
Draw.reset();
});
spawn = new Effect(23, e -> {
spawn = new Effect(30, e -> {
Lines.stroke(2f * e.fout());
Draw.color(Palette.accent);
Lines.poly(e.x, e.y, 4, 3f + e.fin() * 8f);
Lines.poly(e.x, e.y, 4, 5f + e.fin() * 12f);
Draw.reset();
});
@@ -545,6 +560,13 @@ public class Fx implements ContentList{
Draw.reset();
});
spawnShockwave = new Effect(20f, 400f, e -> {
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin());
Lines.stroke(e.fout() * 3f + 0.5f);
Lines.poly(e.x, e.y, 60, e.fin() * 450f);
Draw.reset();
});
explosion = new Effect(30, e -> {
e.scaled(7, i -> {
Lines.stroke(3f * i.fout());

View File

@@ -59,8 +59,6 @@ public class Zones implements ContentList{
}};
craters = new Zone("craters", new MapGenerator("craters", 1){{ distortion = 0; }}){{
alwaysUnlocked = true;
deployCost = ItemStack.with(Items.copper, 300);
startingItems = ItemStack.with(Items.copper, 200);
conditionWave = 15;
@@ -108,7 +106,8 @@ public class Zones implements ContentList{
}};
}};
frozenForest = new Zone("frozenForest", new MapGenerator("groundZero", 1)){{ //TODO implement
frozenForest = new Zone("frozenForest", new MapGenerator("frozenForest")){{ //TODO implement
alwaysUnlocked = true;
deployCost = ItemStack.with(Items.copper, 300);
startingItems = ItemStack.with(Items.copper, 200);
conditionWave = 15;