Massive amount of bugfixes / Multi-liquid support / Broken build

This commit is contained in:
Anuken
2018-07-06 23:24:14 -04:00
parent 64f1fbe400
commit d988bb1821
74 changed files with 633 additions and 511 deletions
@@ -12,13 +12,6 @@ public class Liquids implements ContentList {
@Override
public void load() {
none = new Liquid("none", Color.CLEAR){
@Override
public boolean isHidden(){
return true;
}
};
water = new Liquid("water", Color.valueOf("486acd")) {
{
heatCapacity = 0.4f;
@@ -145,17 +145,14 @@ public class Blocks extends BlockList implements ContentList{
rock = new Rock("rock") {{
variants = 2;
varyShadow = true;
}};
icerock = new Rock("icerock") {{
variants = 2;
varyShadow = true;
}};
blackrock = new Rock("blackrock") {{
variants = 1;
varyShadow = true;
}};
}
}
@@ -56,7 +56,7 @@ public class DebugBlocks extends BlockList implements ContentList{
@Override
public void update(Tile tile) {
SorterEntity entity = tile.entity();
entity.items.items[entity.sortItem.id] = 1;
entity.items.set(entity.sortItem, 1);
tryDump(tile, entity.sortItem);
}
@@ -79,9 +79,8 @@ public class DebugBlocks extends BlockList implements ContentList{
public void update(Tile tile) {
LiquidSourceEntity entity = tile.entity();
tile.entity.liquids.amount = liquidCapacity;
tile.entity.liquids.liquid = entity.source;
tryDumpLiquid(tile);
tile.entity.liquids.add(entity.source, liquidCapacity);
tryDumpLiquid(tile, entity.source);
}
@Override
@@ -35,11 +35,11 @@ public class DefenseBlocks extends BlockList implements ContentList {
}};
thoriumWall = new Wall("thorium-wall") {{
health = 110 * wallHealthMultiplier;
health = 200 * wallHealthMultiplier;
}};
thoriumWallLarge = new Wall("thorium-wall-large") {{
health = 110 * wallHealthMultiplier*4;
health = 200 * wallHealthMultiplier*4;
size = 2;
}};
@@ -19,6 +19,7 @@ public class StorageBlocks extends BlockList implements ContentList {
vault = new Vault("vault") {{
size = 3;
health = 600;
itemCapacity = 2000;
}};
unloader = new Unloader("unloader") {{
@@ -73,10 +73,10 @@ public class TurretBlocks extends BlockList implements ContentList {
health = 360;
drawer = (tile, entity) -> {
Draw.rect(name, tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90);
Draw.rect(region, tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90);
Draw.color(entity.liquids.liquid.color);
Draw.alpha(entity.liquids.amount / liquidCapacity);
Draw.color(entity.liquids.current().color);
Draw.alpha(entity.liquids.total() / liquidCapacity);
Draw.rect(name + "-liquid", tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90);
Draw.color();
};
@@ -145,7 +145,7 @@ public class TurretBlocks extends BlockList implements ContentList {
ammoUseEffect = ShootFx.shellEjectBig;
drawer = (tile, entity) -> {
Draw.rect(name, tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90);
Draw.rect(region, tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90);
float offsetx = (int) (Mathf.abscurve(Mathf.curve(entity.reload / reload, 0.3f, 0.2f)) * 3f);
float offsety = -(int) (Mathf.abscurve(Mathf.curve(entity.reload / reload, 0.3f, 0.2f)) * 2f);