Bridge fixes
This commit is contained in:
@@ -1162,7 +1162,7 @@ public class Blocks implements ContentList{
|
||||
requirements(Category.power, with(Items.lead, 100, Items.silicon, 75, Items.phasefabric, 25, Items.plastanium, 75, Items.thorium, 50));
|
||||
size = 2;
|
||||
powerProduction = 4.5f;
|
||||
itemDuration = 500f;
|
||||
itemDuration = 60 * 15f;
|
||||
}};
|
||||
|
||||
solarPanel = new SolarGenerator("solar-panel"){{
|
||||
|
||||
@@ -812,7 +812,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
|
||||
/** Called after the block is placed by this client. */
|
||||
@CallSuper
|
||||
public void playerPlaced(){
|
||||
public void playerPlaced(Object config){
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class CoreItemsDisplay extends Table{
|
||||
for(Item item : content.items()){
|
||||
if(usedItems.contains(item)){
|
||||
image(item.icon(Cicon.small)).padRight(3);
|
||||
label(() -> core == null ? "0" : UI.formatAmount(core.items.get(item))).padRight(3);
|
||||
label(() -> core == null ? "0" : UI.formatAmount(core.items.get(item))).padRight(3).left();
|
||||
|
||||
if(++i % 4 == 0){
|
||||
row();
|
||||
|
||||
@@ -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