New launch pad / Tech tree tweaks
@@ -354,6 +354,7 @@ blocks.targetsair = Targets Air
|
|||||||
blocks.targetsground = Targets Ground
|
blocks.targetsground = Targets Ground
|
||||||
blocks.items = Items: {0}
|
blocks.items = Items: {0}
|
||||||
blocks.itemsmoved = Move Speed
|
blocks.itemsmoved = Move Speed
|
||||||
|
blocks.launchtime = Time Between Launches
|
||||||
blocks.shootrange = Range
|
blocks.shootrange = Range
|
||||||
blocks.size = Size
|
blocks.size = Size
|
||||||
blocks.liquidcapacity = Liquid Capacity
|
blocks.liquidcapacity = Liquid Capacity
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 244 KiB After Width: | Height: | Size: 244 KiB |
|
Before Width: | Height: | Size: 201 KiB After Width: | Height: | Size: 208 KiB |
|
Before Width: | Height: | Size: 316 KiB After Width: | Height: | Size: 308 KiB |
|
Before Width: | Height: | Size: 516 KiB After Width: | Height: | Size: 531 KiB |
@@ -69,7 +69,7 @@ public class Blocks implements ContentList{
|
|||||||
mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, waterExtractor, oilExtractor, cultivator,
|
mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, waterExtractor, oilExtractor, cultivator,
|
||||||
|
|
||||||
//storage
|
//storage
|
||||||
coreShard, coreFoundation, coreNucleus, vault, container, unloader, launchPad,
|
coreShard, coreFoundation, coreNucleus, vault, container, unloader, launchPad, launchPadLarge,
|
||||||
|
|
||||||
//turrets
|
//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,
|
||||||
@@ -754,7 +754,7 @@ public class Blocks implements ContentList{
|
|||||||
titaniumConveyor = new Conveyor("titanium-conveyor"){{
|
titaniumConveyor = new Conveyor("titanium-conveyor"){{
|
||||||
requirements(Category.distribution, ItemStack.with(Items.copper, 2, Items.lead, 1, Items.titanium, 1));
|
requirements(Category.distribution, ItemStack.with(Items.copper, 2, Items.lead, 1, Items.titanium, 1));
|
||||||
health = 65;
|
health = 65;
|
||||||
speed = 0.07f;
|
speed = 0.08f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
junction = new Junction("junction"){{
|
junction = new Junction("junction"){{
|
||||||
@@ -1101,7 +1101,7 @@ public class Blocks implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
launchPad = new LaunchPad("launch-pad"){{
|
launchPad = new LaunchPad("launch-pad"){{
|
||||||
requirements(Category.effect, () -> world.isZone(), ItemStack.with(Items.copper, 500, Items.titanium, 200, Items.silicon, 200, Items.lead, 200));
|
requirements(Category.effect, () -> world.isZone(), ItemStack.with(Items.copper, 500, Items.silicon, 150, Items.lead, 200));
|
||||||
size = 3;
|
size = 3;
|
||||||
itemCapacity = 100;
|
itemCapacity = 100;
|
||||||
launchTime = 60f * 8;
|
launchTime = 60f * 8;
|
||||||
@@ -1109,6 +1109,16 @@ public class Blocks implements ContentList{
|
|||||||
consumes.power(1f);
|
consumes.power(1f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
launchPadLarge = new LaunchPad("launch-pad-large"){{
|
||||||
|
requirements(Category.effect, () -> world.isZone(), ItemStack.with(Items.titanium, 400, Items.silicon, 300, Items.lead, 500, Items.plastanium, 150));
|
||||||
|
size = 4;
|
||||||
|
itemCapacity = 250;
|
||||||
|
launchTime = 60f * 7;
|
||||||
|
hasPower = true;
|
||||||
|
consumes.power(2f);
|
||||||
|
}};
|
||||||
|
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
//region turrets
|
//region turrets
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class Fx implements ContentList{
|
|||||||
bigShockwave, nuclearShockwave, explosion, blockExplosion, blockExplosionSmoke, shootSmall, shootHeal, shootSmallSmoke, shootBig, shootBig2, shootBigSmoke,
|
bigShockwave, nuclearShockwave, explosion, blockExplosion, blockExplosionSmoke, shootSmall, shootHeal, shootSmallSmoke, shootBig, shootBig2, shootBigSmoke,
|
||||||
shootBigSmoke2, shootSmallFlame, shootPyraFlame, shootLiquid, shellEjectSmall, shellEjectMedium,
|
shootBigSmoke2, shootSmallFlame, shootPyraFlame, shootLiquid, shellEjectSmall, shellEjectMedium,
|
||||||
shellEjectBig, lancerLaserShoot, lancerLaserShootSmoke, lancerLaserCharge, lancerLaserChargeBegin, lightningCharge, lightningShoot,
|
shellEjectBig, lancerLaserShoot, lancerLaserShootSmoke, lancerLaserCharge, lancerLaserChargeBegin, lightningCharge, lightningShoot,
|
||||||
unitSpawn, spawnShockwave, magmasmoke, impactShockwave, impactcloud, impactsmoke, dynamicExplosion;
|
unitSpawn, spawnShockwave, magmasmoke, impactShockwave, impactcloud, impactsmoke, dynamicExplosion, padlaunch;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void load(){
|
public void load(){
|
||||||
@@ -106,6 +106,13 @@ public class Fx implements ContentList{
|
|||||||
Lines.poly(e.x, e.y, 4, 5f + e.fin() * 12f);
|
Lines.poly(e.x, e.y, 4, 5f + e.fin() * 12f);
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
padlaunch = new Effect(10, e -> {
|
||||||
|
Lines.stroke(4f * e.fout());
|
||||||
|
Draw.color(Pal.accent);
|
||||||
|
Lines.poly(e.x, e.y, 4, 5f + e.fin() * 60f);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
|
||||||
vtolHover = new Effect(40f, e -> {
|
vtolHover = new Effect(40f, e -> {
|
||||||
float len = e.finpow() * 10f;
|
float len = e.finpow() * 10f;
|
||||||
|
|||||||
@@ -19,15 +19,20 @@ public class TechTree implements ContentList{
|
|||||||
node(junction, () -> {
|
node(junction, () -> {
|
||||||
node(itemBridge);
|
node(itemBridge);
|
||||||
node(router, () -> {
|
node(router, () -> {
|
||||||
|
node(launchPad, () -> {
|
||||||
|
node(launchPadLarge, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
node(distributor);
|
node(distributor);
|
||||||
node(overflowGate);
|
node(sorter, () -> {
|
||||||
node(sorter);
|
node(overflowGate);
|
||||||
|
});
|
||||||
node(container, () -> {
|
node(container, () -> {
|
||||||
node(unloader);
|
node(unloader);
|
||||||
node(vault, () -> {
|
node(vault, () -> {
|
||||||
node(launchPad, () -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,18 @@
|
|||||||
package io.anuke.mindustry.world.blocks.storage;
|
package io.anuke.mindustry.world.blocks.storage;
|
||||||
|
|
||||||
import io.anuke.mindustry.entities.Effects;
|
import io.anuke.arc.graphics.g2d.Draw;
|
||||||
|
import io.anuke.arc.graphics.g2d.Lines;
|
||||||
|
import io.anuke.arc.util.Time;
|
||||||
import io.anuke.mindustry.Vars;
|
import io.anuke.mindustry.Vars;
|
||||||
import io.anuke.mindustry.content.Fx;
|
import io.anuke.mindustry.content.Fx;
|
||||||
|
import io.anuke.mindustry.entities.Effects;
|
||||||
import io.anuke.mindustry.entities.type.TileEntity;
|
import io.anuke.mindustry.entities.type.TileEntity;
|
||||||
|
import io.anuke.mindustry.graphics.Pal;
|
||||||
import io.anuke.mindustry.type.Item;
|
import io.anuke.mindustry.type.Item;
|
||||||
import io.anuke.mindustry.type.ItemType;
|
import io.anuke.mindustry.type.ItemType;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
|
import io.anuke.mindustry.world.meta.BlockStat;
|
||||||
|
import io.anuke.mindustry.world.meta.StatUnit;
|
||||||
|
|
||||||
import static io.anuke.mindustry.Vars.data;
|
import static io.anuke.mindustry.Vars.data;
|
||||||
import static io.anuke.mindustry.Vars.world;
|
import static io.anuke.mindustry.Vars.world;
|
||||||
@@ -23,23 +29,52 @@ public class LaunchPad extends StorageBlock{
|
|||||||
solid = true;
|
solid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setStats(){
|
||||||
|
super.setStats();
|
||||||
|
|
||||||
|
stats.add(BlockStat.launchTime, launchTime / 60f, StatUnit.seconds);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean acceptItem(Item item, Tile tile, Tile source){
|
public boolean acceptItem(Item item, Tile tile, Tile source){
|
||||||
return item.type == ItemType.material && super.acceptItem(item, tile, source);
|
return item.type == ItemType.material && tile.entity.items.total() < itemCapacity;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void draw(Tile tile){
|
||||||
|
super.draw(tile);
|
||||||
|
|
||||||
|
float progress = (tile.entity.items.total() / (float)itemCapacity) * ((tile.entity.timer.getTime(timerLaunch) / (launchTime / tile.entity.timeScale)));
|
||||||
|
float scale = size/3f;
|
||||||
|
|
||||||
|
Lines.stroke(2f);
|
||||||
|
Draw.color(Pal.accentBack);
|
||||||
|
Lines.poly(tile.drawx(), tile.drawy(), 4, scale * 10f * (1f - progress), 45 + 360f*progress);
|
||||||
|
|
||||||
|
Draw.color(Pal.accent);
|
||||||
|
|
||||||
|
if(tile.entity.cons.valid()){
|
||||||
|
for(int i = 0; i < 3; i++){
|
||||||
|
float f = (Time.time() / 100f + i * 0.5f) % 1f;
|
||||||
|
|
||||||
|
Lines.stroke(((2f * (2f - Math.abs(0.5f - f) * 2f)) - 2f + 0.2f));
|
||||||
|
Lines.poly(tile.drawx(), tile.drawy(), 4, (1f - f) * 10f * scale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Draw.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(Tile tile){
|
public void update(Tile tile){
|
||||||
TileEntity entity = tile.entity;
|
TileEntity entity = tile.entity;
|
||||||
|
|
||||||
if(entity.cons.valid() && world.isZone()){
|
if(entity.cons.valid() && world.isZone() && entity.items.total() >= itemCapacity && entity.timer.get(timerLaunch, launchTime / entity.timeScale)){
|
||||||
for(Item item : Vars.content.items()){
|
for(Item item : Vars.content.items()){
|
||||||
if(entity.items.get(item) >= itemCapacity && entity.timer.get(timerLaunch, launchTime / entity.timeScale)){
|
Effects.effect(Fx.padlaunch, tile);
|
||||||
//TODO play animation of some sort
|
data.addItem(item, entity.items.get(item));
|
||||||
Effects.effect(Fx.dooropenlarge, tile);
|
entity.items.set(item, 0);
|
||||||
data.addItem(item, entity.items.get(item));
|
|
||||||
entity.items.set(item, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ public enum BlockStat{
|
|||||||
inputItemCapacity(StatCategory.items),
|
inputItemCapacity(StatCategory.items),
|
||||||
outputItemCapacity(StatCategory.items),
|
outputItemCapacity(StatCategory.items),
|
||||||
itemsMoved(StatCategory.items),
|
itemsMoved(StatCategory.items),
|
||||||
|
launchTime(StatCategory.items),
|
||||||
|
|
||||||
liquidCapacity(StatCategory.liquids),
|
liquidCapacity(StatCategory.liquids),
|
||||||
liquidOutput(StatCategory.liquids),
|
liquidOutput(StatCategory.liquids),
|
||||||
|
|||||||