Bridge fixes
This commit is contained in:
@@ -75,7 +75,7 @@ public class ConstructBlock extends Block{
|
||||
|
||||
//last builder was this local client player, call placed()
|
||||
if(tile.build != null && !headless && builder == player.unit()){
|
||||
tile.build.playerPlaced();
|
||||
tile.build.playerPlaced(config);
|
||||
}
|
||||
|
||||
Fx.placeBlock.at(tile.drawx(), tile.drawy(), block.size);
|
||||
|
||||
@@ -133,8 +133,10 @@ public class ItemBridge extends Block{
|
||||
public float cycleSpeed = 1f;
|
||||
|
||||
@Override
|
||||
public void playerPlaced(){
|
||||
super.playerPlaced();
|
||||
public void playerPlaced(Object config){
|
||||
super.playerPlaced(config);
|
||||
|
||||
if(config != null) return;
|
||||
|
||||
Tile link = findLink(tile.x, tile.y);
|
||||
if(linkValid(tile, link)){
|
||||
@@ -265,7 +267,7 @@ public class ItemBridge extends Block{
|
||||
Item item = items.take();
|
||||
if(item != null && other.acceptItem(this, item)){
|
||||
other.handleItem(this, item);
|
||||
cycleSpeed = Mathf.lerpDelta(cycleSpeed, 4f, 0.05f);
|
||||
cycleSpeed = Mathf.lerpDelta(cycleSpeed, 4f, 0.05f); //TODO this is kinda broken, because lerping only happens on a timer
|
||||
}else{
|
||||
cycleSpeed = Mathf.lerpDelta(cycleSpeed, 1f, 0.01f);
|
||||
if(item != null) items.add(item, 1);
|
||||
|
||||
@@ -6,7 +6,7 @@ import mindustry.type.*;
|
||||
import mindustry.world.blocks.distribution.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
import static mindustry.Vars.world;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class LiquidExtendingBridge extends ExtendingItemBridge{
|
||||
|
||||
@@ -42,7 +42,7 @@ public class LiquidExtendingBridge extends ExtendingItemBridge{
|
||||
if(moveLiquid(other, liquids.current()) > 0.1f){
|
||||
cycleSpeed = Mathf.lerpDelta(cycleSpeed, 4f, 0.05f);
|
||||
}else{
|
||||
cycleSpeed = Mathf.lerpDelta(cycleSpeed, 1f, 0.01f);
|
||||
cycleSpeed = Mathf.lerpDelta(cycleSpeed, 0f, 0.01f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user