Added health and ammo to block descriptions
This commit is contained in:
Binary file not shown.
@@ -261,6 +261,10 @@ public class UI extends SceneModule{
|
|||||||
tiptable.row();
|
tiptable.row();
|
||||||
tiptable.add().size(10).units(Unit.px);
|
tiptable.add().size(10).units(Unit.px);
|
||||||
tiptable.row();
|
tiptable.row();
|
||||||
|
tiptable.add("[scarlet]Health: " + r.result.health).left();
|
||||||
|
tiptable.row();
|
||||||
|
tiptable.add().size(6).units(Unit.px);
|
||||||
|
tiptable.row();
|
||||||
tiptable.add("[ORANGE]" + description).left();
|
tiptable.add("[ORANGE]" + description).left();
|
||||||
tiptable.pad(Unit.dp.inPixels(10f));
|
tiptable.pad(Unit.dp.inPixels(10f));
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ public class MHueristic implements Heuristic<Tile>{
|
|||||||
if(other.breakable() && other.block().solid) cost += Vars.tilesize*multiplier;
|
if(other.breakable() && other.block().solid) cost += Vars.tilesize*multiplier;
|
||||||
for(Tile tile : node.getNearby()){
|
for(Tile tile : node.getNearby()){
|
||||||
if(tile != null && tile.solid()){
|
if(tile != null && tile.solid()){
|
||||||
cost += Vars.tilesize*2;
|
//don't go near solid tiles!
|
||||||
|
cost += Vars.tilesize*3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return cost;
|
return cost;
|
||||||
|
|||||||
@@ -92,11 +92,18 @@ public class ProductionBlocks{
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
smelter = new Crafter("smelter"){{
|
smelter = new Crafter("smelter"){
|
||||||
health = 70;
|
{
|
||||||
requirements = new Item[]{Item.coal, Item.iron};
|
health = 70;
|
||||||
result = Item.steel;
|
requirements = new Item[]{Item.coal, Item.iron};
|
||||||
}},
|
result = Item.steel;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String description(){
|
||||||
|
return "Takes in coal + iron, outputs steel.";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
stonedrill = new Drill("stonedrill"){{
|
stonedrill = new Drill("stonedrill"){{
|
||||||
resource = Blocks.stone;
|
resource = Blocks.stone;
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ import com.badlogic.gdx.graphics.Color;
|
|||||||
import com.badlogic.gdx.math.MathUtils;
|
import com.badlogic.gdx.math.MathUtils;
|
||||||
|
|
||||||
import io.anuke.mindustry.Vars;
|
import io.anuke.mindustry.Vars;
|
||||||
import io.anuke.mindustry.entities.*;
|
import io.anuke.mindustry.entities.Bullet;
|
||||||
|
import io.anuke.mindustry.entities.BulletType;
|
||||||
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.entities.enemies.Enemy;
|
import io.anuke.mindustry.entities.enemies.Enemy;
|
||||||
import io.anuke.mindustry.resource.Item;
|
import io.anuke.mindustry.resource.Item;
|
||||||
import io.anuke.mindustry.world.Block;
|
import io.anuke.mindustry.world.Block;
|
||||||
@@ -72,7 +74,7 @@ public class Turret extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String description(){
|
public String description(){
|
||||||
return "Shoots things.";
|
return "[green]Ammo: "+(ammo==null ? "N/A" : ammo.name())+"\n[]Shoots things.";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user