a
This commit is contained in:
@@ -891,7 +891,7 @@ public class Blocks implements ContentList{
|
||||
useTime = 40f;
|
||||
consumes.power(23f);
|
||||
consumes.item(Items.blastCompound);
|
||||
consumes.liquid(Liquids.water, 0.4f);
|
||||
consumes.liquid(Liquids.cryofluid, 0.8f);
|
||||
}};
|
||||
|
||||
//endregion power
|
||||
|
||||
@@ -234,13 +234,17 @@ public class TechTree implements ContentList{
|
||||
|
||||
node(alphaDartPad, () -> {
|
||||
node(deltaPad, () -> {
|
||||
node(javelinPad);
|
||||
node(tauPad, () -> {
|
||||
node(tridentPad);
|
||||
node(omegaPad, () -> {
|
||||
node(javelinPad, () -> {
|
||||
node(tridentPad, () -> {
|
||||
node(glaivePad);
|
||||
});
|
||||
});
|
||||
|
||||
node(tauPad, () -> {
|
||||
node(omegaPad, () -> {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
node(spiritFactory, () -> {
|
||||
|
||||
@@ -38,7 +38,6 @@ public abstract class FlyingUnit extends BaseUnit{
|
||||
retarget(() -> {
|
||||
targetClosest();
|
||||
|
||||
if(target == null) targetClosestEnemyFlag(BlockFlag.target);
|
||||
if(target == null) targetClosestEnemyFlag(BlockFlag.producer);
|
||||
if(target == null) targetClosestEnemyFlag(BlockFlag.turret);
|
||||
|
||||
|
||||
@@ -106,93 +106,17 @@ public class DeployDialog extends FloatingDialog{
|
||||
drawDefaultBackground(x, y);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void buildButton(Zone zone, TextButton button){
|
||||
button.setDisabled(() -> hidden(zone));
|
||||
button.clicked(() -> info.show(zone));
|
||||
|
||||
if(zone.unlocked()){
|
||||
//button.table(title -> {
|
||||
button.addImage("icon-zone").padRight(3);
|
||||
button.labelWrap(zone.localizedName()).width(140).growX();
|
||||
//});
|
||||
|
||||
//if(data.getWaveScore(zone) > 0){
|
||||
// button.add(Core.bundle.format("bestwave", data.getWaveScore(zone)));
|
||||
//}
|
||||
|
||||
/*
|
||||
button.add("$launch").color(Color.LIGHT_GRAY).pad(4);
|
||||
button.row();
|
||||
button.table(req -> {
|
||||
for(ItemStack stack : zone.deployCost){
|
||||
req.addImage(stack.item.region).size(8 * 3);
|
||||
req.add(stack.amount + "").left();
|
||||
}
|
||||
}).pad(3).growX();*/
|
||||
}else{
|
||||
button.addImage("icon-zone-locked");
|
||||
button.row();
|
||||
button.add("$locked");
|
||||
|
||||
/*else{
|
||||
button.addImage("icon-zone-locked");
|
||||
button.row();
|
||||
button.add("$locked").padBottom(6);
|
||||
|
||||
if(!hidden(zone)){
|
||||
button.row();
|
||||
|
||||
button.table(req -> {
|
||||
req.defaults().left();
|
||||
|
||||
if(zone.zoneRequirements.length > 0){
|
||||
req.table(r -> {
|
||||
r.add("$complete").colspan(2).left();
|
||||
r.row();
|
||||
for(Zone other : zone.zoneRequirements){
|
||||
r.addImage("icon-zone").padRight(4);
|
||||
r.add(other.localizedName()).color(Color.LIGHT_GRAY);
|
||||
r.addImage(data.isCompleted(other) ? "icon-check-2" : "icon-cancel-2")
|
||||
.color(data.isCompleted(other) ? Color.LIGHT_GRAY : Color.SCARLET).padLeft(3);
|
||||
r.row();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
req.row();
|
||||
|
||||
if(zone.itemRequirements.length > 0){
|
||||
req.table(r -> {
|
||||
for(ItemStack stack : zone.itemRequirements){
|
||||
r.addImage(stack.item.region).size(8 * 3).padRight(4);
|
||||
r.add(Math.min(data.getItem(stack.item), stack.amount) + "/" + stack.amount)
|
||||
.color(stack.amount > data.getItem(stack.item) ? Color.SCARLET : Color.LIGHT_GRAY).left();
|
||||
r.row();
|
||||
}
|
||||
}).padTop(10);
|
||||
}
|
||||
|
||||
req.row();
|
||||
|
||||
if(zone.blockRequirements.length > 0){
|
||||
req.table(r -> {
|
||||
r.add("$research.list").colspan(2).left();
|
||||
r.row();
|
||||
for(Block block : zone.blockRequirements){
|
||||
r.addImage(block.icon(Icon.small)).size(8 * 3).padRight(4);
|
||||
r.add(block.localizedName).color(Color.LIGHT_GRAY);
|
||||
r.addImage(data.isUnlocked(block) ? "icon-check-2" : "icon-cancel-2")
|
||||
.color(data.isUnlocked(block) ? Color.LIGHT_GRAY : Color.SCARLET).padLeft(3);
|
||||
r.row();
|
||||
}
|
||||
|
||||
}).padTop(10);
|
||||
}
|
||||
}).growX();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,23 +98,25 @@ public class ZoneInfoDialog extends FloatingDialog{
|
||||
}
|
||||
|
||||
cont.row();
|
||||
cont.table(t -> {
|
||||
cont.table("button-disabled", t -> {
|
||||
t.left();
|
||||
for(ItemStack stack : zone.startingItems){
|
||||
t.addImage(stack.item.icon(Item.Icon.medium)).size(8 * 3).padRight(4);
|
||||
t.label(() -> stack.amount + "");
|
||||
}
|
||||
t.add(!zone.canConfigure() ? Core.bundle.format("configure.locked", zone.configureWave) : "$configure");
|
||||
t.row();
|
||||
t.table(load -> {
|
||||
load.left();
|
||||
for(ItemStack stack : zone.startingItems){
|
||||
load.addImage(stack.item.icon(Item.Icon.medium)).size(8 * 3).padRight(4);
|
||||
load.label(() -> stack.amount + "");
|
||||
}
|
||||
}).growX().left();
|
||||
}).growX().left();
|
||||
}
|
||||
});
|
||||
|
||||
cont.row();
|
||||
|
||||
cont.addButton(!zone.canConfigure() ? Core.bundle.format("configure.locked", zone.configureWave) : "$configure", () -> {
|
||||
|
||||
}).disabled(b -> !zone.canConfigure()).size(300f, 70f).padTop(5).get();
|
||||
|
||||
cont.row();
|
||||
//cont.addButton(!zone.canConfigure() ? Core.bundle.format("configure.locked", zone.configureWave) : "$configure", () -> { }).disabled(b -> !zone.canConfigure()).size(300f, 70f).padTop(5).get();
|
||||
//cont.row();
|
||||
|
||||
Button button = cont.addButton(zone.locked() ? "$uncover" : "$launch", () -> {
|
||||
if(!data.isUnlocked(zone)){
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package io.anuke.mindustry.world.blocks.power;
|
||||
|
||||
import io.anuke.arc.Core;
|
||||
import io.anuke.mindustry.entities.Effects;
|
||||
import io.anuke.arc.graphics.Color;
|
||||
import io.anuke.arc.graphics.g2d.Draw;
|
||||
import io.anuke.arc.graphics.g2d.TextureRegion;
|
||||
@@ -11,11 +10,10 @@ import io.anuke.arc.util.Time;
|
||||
import io.anuke.mindustry.content.Fx;
|
||||
import io.anuke.mindustry.content.Items;
|
||||
import io.anuke.mindustry.entities.Damage;
|
||||
import io.anuke.mindustry.entities.Effects;
|
||||
import io.anuke.mindustry.entities.type.TileEntity;
|
||||
import io.anuke.mindustry.type.Liquid;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.meta.BlockStat;
|
||||
import io.anuke.mindustry.world.meta.StatUnit;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
@@ -59,14 +57,6 @@ public class NuclearReactor extends PowerGenerator{
|
||||
lightsRegion = Core.atlas.find(name + "-lights");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStats(){
|
||||
super.setStats();
|
||||
|
||||
stats.remove(BlockStat.basePowerGeneration);
|
||||
stats.add(BlockStat.basePowerGeneration, powerProduction * 60f, StatUnit.powerSecond);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Tile tile){
|
||||
NuclearReactorEntity entity = tile.entity();
|
||||
|
||||
@@ -35,7 +35,7 @@ public class CoreBlock extends StorageBlock{
|
||||
solid = true;
|
||||
update = true;
|
||||
hasItems = true;
|
||||
flags = EnumSet.of(BlockFlag.target);
|
||||
flags = EnumSet.of(BlockFlag.target, BlockFlag.producer);
|
||||
}
|
||||
|
||||
@Remote(called = Loc.server)
|
||||
|
||||
@@ -26,8 +26,7 @@ public class ConsumePower extends Consume{
|
||||
|
||||
@Override
|
||||
public void build(Tile tile, Table table){
|
||||
//table.add(new ReqImage(new Image("icon-power-requirement"), () -> valid(tile.block(), tile.entity))).size(8*4).padRight(4);
|
||||
// No tooltip for power
|
||||
//No tooltip for power, for now
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user