Decreased throughput of instant transfer blocks chained to routers
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user