Decreased throughput of instant transfer blocks chained to routers

This commit is contained in:
Anuken
2020-08-23 17:08:07 -04:00
parent 2f19cab144
commit fefef3bc47
4 changed files with 7 additions and 7 deletions

View File

@@ -163,7 +163,7 @@ public class Bullets implements ContentList{
width = 6f;
height = 8f;
hitEffect = Fx.flakExplosion;
splashDamage = 20f;
splashDamage = 22f;
splashDamageRadius = 20f;
fragBullet = flakGlassFrag;
fragBullets = 5;

View File

@@ -152,9 +152,9 @@ public class ItemTurret extends Turret{
@Override
public void read(Reads read, byte revision){
super.read(read, revision);
byte amount = read.b();
int amount = read.ub();
for(int i = 0; i < amount; i++){
Item item = Vars.content.item(read.b());
Item item = Vars.content.item(read.ub());
short a = read.s();
totalAmmo += a;
ammo.add(new ItemEntry(item, a));

View File

@@ -35,7 +35,7 @@ public class Router extends Block{
time += 1f / speed * delta();
Building target = getTileTarget(lastItem, lastInput, false);
if(target != null && (time >= 1f || !(target.block() instanceof Router))){
if(target != null && (time >= 1f || !(target.block() instanceof Router || target.block().instantTransfer))){
getTileTarget(lastItem, lastInput, true);
target.handleItem(this, lastItem);
items.remove(lastItem, 1);
@@ -76,7 +76,7 @@ public class Router extends Block{
for(int i = 0; i < proximity.size; i++){
Building other = proximity.get((i + counter) % proximity.size);
if(set) rotation = ((byte)((rotation + 1) % proximity.size));
if(other.tile() == from && from.block() == Blocks.overflowGate) continue;
if(other.tile == from && from.block() == Blocks.overflowGate) continue;
if(other.acceptItem(this, item)){
return other;
}

View File

@@ -133,10 +133,10 @@ public class LiquidModule extends BlockModule{
public void read(Reads read){
Arrays.fill(liquids, 0);
total = 0f;
byte count = read.b();
int count = read.ub();
for(int j = 0; j < count; j++){
int liquidid = read.b();
int liquidid = read.ub();
float amount = read.f();
liquids[liquidid] = amount;
if(amount > 0){