Implemented replacement blocks
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="io.anuke.mindustry"
|
package="io.anuke.mindustry"
|
||||||
android:versionCode="7"
|
android:versionCode="8"
|
||||||
android:versionName="1.1.3" >
|
android:versionName="1.1.4" >
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="25" />
|
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="25" />
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 256 B After Width: | Height: | Size: 190 B |
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -17,7 +17,7 @@ public class Inventory{
|
|||||||
|
|
||||||
if(debug){
|
if(debug){
|
||||||
items.put(Item.stone, 2000);
|
items.put(Item.stone, 2000);
|
||||||
items.put(Item.iron, 2000);
|
items.put(Item.iron, 1);
|
||||||
items.put(Item.steel, 2000);
|
items.put(Item.steel, 2000);
|
||||||
items.put(Item.coal, 2000);
|
items.put(Item.coal, 2000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -337,17 +337,30 @@ public class UI extends SceneModule{
|
|||||||
new table(){{
|
new table(){{
|
||||||
atop();
|
atop();
|
||||||
aleft();
|
aleft();
|
||||||
itemtable = new table().top().left().get();
|
|
||||||
itemtable.background("button");
|
defaults().size(60).units(Unit.dp);
|
||||||
|
|
||||||
|
new button("M", ()->{
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
new button("P", ()->{
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
new button("S", ()->{
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
row();
|
||||||
|
|
||||||
|
itemtable = new table("button").end().top().left().colspan(3).fillX().size(-1).get();
|
||||||
|
|
||||||
get().setVisible(play);
|
get().setVisible(play);
|
||||||
|
|
||||||
Label fps = new Label("");
|
Label fps = new Label(()->(Settings.getBool("fps") ? (Gdx.graphics.getFramesPerSecond() + " FPS") : ""));
|
||||||
fps.update(()->{
|
|
||||||
fps.setText(Settings.getBool("fps") ? (Gdx.graphics.getFramesPerSecond() + " FPS") : "");
|
|
||||||
});
|
|
||||||
row();
|
row();
|
||||||
add(fps);
|
add(fps).colspan(3).size(-1);
|
||||||
|
|
||||||
}}.end();
|
}}.end();
|
||||||
|
|
||||||
@@ -599,13 +612,14 @@ public class UI extends SceneModule{
|
|||||||
|
|
||||||
public void updateItems(){
|
public void updateItems(){
|
||||||
itemtable.clear();
|
itemtable.clear();
|
||||||
|
itemtable.left();
|
||||||
|
|
||||||
for(Item stack : Inventory.getItemTypes()){
|
for(Item stack : Inventory.getItemTypes()){
|
||||||
Image image = new Image(Draw.region("icon-" + stack.name()));
|
Image image = new Image(Draw.region("icon-" + stack.name()));
|
||||||
Label label = new Label("" + Inventory.getAmount(stack));
|
Label label = new Label("" + Inventory.getAmount(stack));
|
||||||
label.setFontScale(fontscale*2f);
|
label.setFontScale(fontscale*2f);
|
||||||
itemtable.add(image).size(32).units(Unit.dp);
|
itemtable.add(image).size(32).units(Unit.dp);
|
||||||
itemtable.add(label);
|
itemtable.add(label).left();
|
||||||
itemtable.row();
|
itemtable.row();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class Vars{
|
|||||||
//respawn time in frames
|
//respawn time in frames
|
||||||
public static final float respawnduration = 60*4;
|
public static final float respawnduration = 60*4;
|
||||||
//time between waves in frames
|
//time between waves in frames
|
||||||
public static final float wavespace = 30*60*(android ? 2 : 1);
|
public static final float wavespace = 25*60*(android ? 2 : 1);
|
||||||
//how far away from spawn points the player can't place blocks
|
//how far away from spawn points the player can't place blocks
|
||||||
public static final float enemyspawnspace = 65;
|
public static final float enemyspawnspace = 65;
|
||||||
//scale of the font
|
//scale of the font
|
||||||
|
|||||||
@@ -197,6 +197,11 @@ public class World{
|
|||||||
}
|
}
|
||||||
Tile tile = tile(x, y);
|
Tile tile = tile(x, y);
|
||||||
|
|
||||||
|
if(tile.block() != type && ((tile.block().name.contains("wall") && type.name.contains("wall")) ||
|
||||||
|
(tile.block().name.contains("conveyor") && type.name.contains("conveyor")))){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return tile != null && tile.block() == Blocks.air;
|
return tile != null && tile.block() == Blocks.air;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,10 @@ public class Bullet extends BulletEntity{
|
|||||||
type.draw(this);
|
type.draw(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float drawSize(){
|
||||||
|
return 8;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(){
|
public void update(){
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||||||
},
|
},
|
||||||
sniper = new BulletType(3f, 20){
|
sniper = new BulletType(3f, 20){
|
||||||
public void draw(Bullet b){
|
public void draw(Bullet b){
|
||||||
Draw.color("lightgray");
|
Draw.color(Color.LIGHT_GRAY);
|
||||||
Draw.rect("bullet", b.x, b.y, b.angle());
|
Draw.rect("bullet", b.x, b.y, b.angle());
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,10 @@ public class Enemy extends DestructibleEntity{
|
|||||||
heal();
|
heal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float drawSize(){
|
||||||
|
return 12;
|
||||||
|
}
|
||||||
|
|
||||||
void move(){
|
void move(){
|
||||||
Vector2 vec = Pathfind.find(this);
|
Vector2 vec = Pathfind.find(this);
|
||||||
vec.sub(x, y).setLength(speed);
|
vec.sub(x, y).setLength(speed);
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public enum Recipe{
|
|||||||
turret(defense, WeaponBlocks.turret, stack(Item.stone, 6)),
|
turret(defense, WeaponBlocks.turret, stack(Item.stone, 6)),
|
||||||
dturret(defense, WeaponBlocks.doubleturret, stack(Item.stone, 12)),
|
dturret(defense, WeaponBlocks.doubleturret, stack(Item.stone, 12)),
|
||||||
machineturret(defense, WeaponBlocks.machineturret, stack(Item.iron, 15), stack(Item.stone, 20)),
|
machineturret(defense, WeaponBlocks.machineturret, stack(Item.iron, 15), stack(Item.stone, 20)),
|
||||||
shotgunturret(defense, WeaponBlocks.shotgunturret, stack(Item.iron, 15), stack(Item.iron, 20)),
|
shotgunturret(defense, WeaponBlocks.shotgunturret, stack(Item.iron, 18), stack(Item.stone, 20)),
|
||||||
flameturret(defense, WeaponBlocks.flameturret, stack(Item.iron, 25), stack(Item.steel, 18)),
|
flameturret(defense, WeaponBlocks.flameturret, stack(Item.iron, 25), stack(Item.steel, 18)),
|
||||||
sniperturret(defense, WeaponBlocks.sniperturret, stack(Item.iron, 30), stack(Item.steel, 20)),
|
sniperturret(defense, WeaponBlocks.sniperturret, stack(Item.iron, 30), stack(Item.steel, 20)),
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class UpgradeDialog extends Dialog{
|
|||||||
|
|
||||||
getButtonTable().addButton("Ok", ()->{
|
getButtonTable().addButton("Ok", ()->{
|
||||||
hide();
|
hide();
|
||||||
});
|
}).size(84, 48).pad(4);
|
||||||
|
|
||||||
Table weptab = new Table();
|
Table weptab = new Table();
|
||||||
weptab.background("button");
|
weptab.background("button");
|
||||||
|
|||||||
@@ -32,6 +32,11 @@ public class RepairTurret extends Turret{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawPixelOverlay(Tile tile){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawOver(Tile tile){
|
public void drawOver(Tile tile){
|
||||||
TurretEntity entity = tile.entity();
|
TurretEntity entity = tile.entity();
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user