Bridge fixes
This commit is contained in:
BIN
core/assets/baseparts/4125616123544.msch
Normal file
BIN
core/assets/baseparts/4125616123544.msch
Normal file
Binary file not shown.
@@ -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));
|
requirements(Category.power, with(Items.lead, 100, Items.silicon, 75, Items.phasefabric, 25, Items.plastanium, 75, Items.thorium, 50));
|
||||||
size = 2;
|
size = 2;
|
||||||
powerProduction = 4.5f;
|
powerProduction = 4.5f;
|
||||||
itemDuration = 500f;
|
itemDuration = 60 * 15f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
solarPanel = new SolarGenerator("solar-panel"){{
|
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. */
|
/** Called after the block is placed by this client. */
|
||||||
@CallSuper
|
@CallSuper
|
||||||
public void playerPlaced(){
|
public void playerPlaced(Object config){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class CoreItemsDisplay extends Table{
|
|||||||
for(Item item : content.items()){
|
for(Item item : content.items()){
|
||||||
if(usedItems.contains(item)){
|
if(usedItems.contains(item)){
|
||||||
image(item.icon(Cicon.small)).padRight(3);
|
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){
|
if(++i % 4 == 0){
|
||||||
row();
|
row();
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ public class ConstructBlock extends Block{
|
|||||||
|
|
||||||
//last builder was this local client player, call placed()
|
//last builder was this local client player, call placed()
|
||||||
if(tile.build != null && !headless && builder == player.unit()){
|
if(tile.build != null && !headless && builder == player.unit()){
|
||||||
tile.build.playerPlaced();
|
tile.build.playerPlaced(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
Fx.placeBlock.at(tile.drawx(), tile.drawy(), block.size);
|
Fx.placeBlock.at(tile.drawx(), tile.drawy(), block.size);
|
||||||
|
|||||||
@@ -133,8 +133,10 @@ public class ItemBridge extends Block{
|
|||||||
public float cycleSpeed = 1f;
|
public float cycleSpeed = 1f;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void playerPlaced(){
|
public void playerPlaced(Object config){
|
||||||
super.playerPlaced();
|
super.playerPlaced(config);
|
||||||
|
|
||||||
|
if(config != null) return;
|
||||||
|
|
||||||
Tile link = findLink(tile.x, tile.y);
|
Tile link = findLink(tile.x, tile.y);
|
||||||
if(linkValid(tile, link)){
|
if(linkValid(tile, link)){
|
||||||
@@ -265,7 +267,7 @@ public class ItemBridge extends Block{
|
|||||||
Item item = items.take();
|
Item item = items.take();
|
||||||
if(item != null && other.acceptItem(this, item)){
|
if(item != null && other.acceptItem(this, item)){
|
||||||
other.handleItem(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{
|
}else{
|
||||||
cycleSpeed = Mathf.lerpDelta(cycleSpeed, 1f, 0.01f);
|
cycleSpeed = Mathf.lerpDelta(cycleSpeed, 1f, 0.01f);
|
||||||
if(item != null) items.add(item, 1);
|
if(item != null) items.add(item, 1);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import mindustry.type.*;
|
|||||||
import mindustry.world.blocks.distribution.*;
|
import mindustry.world.blocks.distribution.*;
|
||||||
import mindustry.world.meta.*;
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
import static mindustry.Vars.world;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
public class LiquidExtendingBridge extends ExtendingItemBridge{
|
public class LiquidExtendingBridge extends ExtendingItemBridge{
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ public class LiquidExtendingBridge extends ExtendingItemBridge{
|
|||||||
if(moveLiquid(other, liquids.current()) > 0.1f){
|
if(moveLiquid(other, liquids.current()) > 0.1f){
|
||||||
cycleSpeed = Mathf.lerpDelta(cycleSpeed, 4f, 0.05f);
|
cycleSpeed = Mathf.lerpDelta(cycleSpeed, 4f, 0.05f);
|
||||||
}else{
|
}else{
|
||||||
cycleSpeed = Mathf.lerpDelta(cycleSpeed, 1f, 0.01f);
|
cycleSpeed = Mathf.lerpDelta(cycleSpeed, 0f, 0.01f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user