Implemented biomatter compressor

This commit is contained in:
Anuken
2018-03-28 00:05:27 -04:00
parent 8526c67e4d
commit a98f42012a
11 changed files with 353 additions and 307 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 491 B

After

Width:  |  Height:  |  Size: 449 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 95 KiB

View File

@ -1,7 +1,7 @@
#Autogenerated file. Do not modify.
#Tue Mar 27 23:20:43 EDT 2018
#Tue Mar 27 23:35:26 EDT 2018
version=release
androidBuildCode=690
androidBuildCode=692
name=Mindustry
code=3.4
build=custom build

View File

@ -112,13 +112,14 @@ public class CraftingBlocks {
hasPower = hasLiquids = true;
}},
biomatterCompressor = new PowerCrafter("biomattercompressor") {{
biomatterCompressor = new Compressor("biomattercompressor") {{
input = new ItemStack(Items.biomatter, 1);
liquidCapacity = 60f;
itemCapacity = 50;
powerUse = 0.05f;
craftTime = 10f;
outputLiquid = Liquids.oil;
outputLiquidAmount = 0.4f;
outputLiquidAmount = 0.05f;
size = 2;
health = 320;
hasLiquids = true;

View File

@ -41,6 +41,7 @@ public class Conveyor extends Block{
update = true;
layer = Layer.overlay;
group = BlockGroup.transportation;
hasInventory = false;
}
@Override

View File

@ -21,6 +21,7 @@ public class Junction extends Block{
solid = true;
instantTransfer = true;
group = BlockGroup.transportation;
hasInventory = false;
}
@Override

View File

@ -14,6 +14,7 @@ public class LiquidJunction extends LiquidBlock{
update = true;
solid = true;
rotate = false;
hasLiquids = false;
}
@Override

View File

@ -0,0 +1,28 @@
package io.anuke.mindustry.world.blocks.types.production;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.graphics.Draw;
public class Compressor extends PowerCrafter {
public Compressor(String name) {
super(name);
hasLiquids = true;
}
@Override
public void draw(Tile tile) {
Draw.rect(name, tile.drawx(), tile.drawy());
Draw.color(Color.CLEAR, tile.entity.liquid.liquid.color, tile.entity.liquid.amount / liquidCapacity);
Draw.rect(name + "-liquid", tile.drawx(), tile.drawy());
Draw.color();
Draw.rect(name + "-top", tile.drawx(), tile.drawy());
}
@Override
public TextureRegion[] getIcon() {
return new TextureRegion[]{Draw.region(name), Draw.region(name + "-top")};
}
}