Fixed #2449 / Fixed #2456 / Fixed #2458 / Fixed #2459 / Fixed #2466 / Fixed #2474

This commit is contained in:
Anuken
2020-09-01 11:34:03 -04:00
parent 6e3162aec2
commit 8e17571824
20 changed files with 129 additions and 83 deletions
@@ -162,7 +162,11 @@ public class ItemTurret extends Turret{
Item item = Vars.content.item(revision < 2 ? read.ub() : read.s());
short a = read.s();
totalAmmo += a;
ammo.add(new ItemEntry(item, a));
//only add ammo if this is a valid ammo type
if(ammoTypes.containsKey(item)){
ammo.add(new ItemEntry(item, a));
}
}
}
}
@@ -52,11 +52,13 @@ public class ItemSource extends Block{
public void draw(){
super.draw();
if(outputItem == null) return;
Draw.color(outputItem.color);
Draw.rect("center", x, y);
Draw.color();
if(outputItem == null){
Draw.rect("cross", x, y);
}else{
Draw.color(outputItem.color);
Draw.rect("center", x, y);
Draw.color();
}
}
@Override
@@ -25,6 +25,7 @@ public class LiquidSource extends Block{
outputsLiquid = true;
saveConfig = true;
noUpdateDisabled = true;
displayFlow = false;
config(Liquid.class, (LiquidSourceBuild tile, Liquid l) -> tile.source = l);
configClear((LiquidSourceBuild tile) -> tile.source = null);
@@ -59,7 +60,9 @@ public class LiquidSource extends Block{
public void draw(){
super.draw();
if(source != null){
if(source == null){
Draw.rect("cross", x, y);
}else{
Draw.color(source.color);
Draw.rect("center", x, y);
Draw.color();