Fixed derelict plastanium conveyor repairs

This commit is contained in:
Anuken
2025-09-27 20:25:57 -04:00
parent 6d2c0c3863
commit dbe67b056f
3 changed files with 8 additions and 5 deletions

View File

@@ -16,7 +16,6 @@ public class SerpuloTechTree{
Planets.serpulo.techTree = nodeRoot("serpulo", coreShard, () -> {
node(conveyor, () -> {
node(junction, () -> {
node(router, () -> {
node(advancedLaunchPad, Seq.with(new SectorComplete(extractionOutpost)), () -> {
@@ -73,7 +72,6 @@ public class SerpuloTechTree{
});
node(mechanicalDrill, () -> {
node(mechanicalPump, () -> {
node(conduit, () -> {
node(liquidJunction, () -> {

View File

@@ -96,6 +96,7 @@ public class Build{
tile.build.changeTeam(team);
tile.build.enabled = true;
tile.build.checkAllowUpdate();
tile.build.updateProximity();
tile.build.onRepaired();
if(unit != null && unit.getControllerName() != null) tile.build.lastAccessed = unit.getControllerName();

View File

@@ -193,7 +193,12 @@ public class StackConveyor extends Block implements Autotiler{
public void dropped(){
super.dropped();
var prev = Geometry.d4[(rotation + 2) % 4];
link = Point2.pack(tile.x + prev.x, tile.y + prev.y);
if(items.any()){
link = Point2.pack(tile.x + prev.x, tile.y + prev.y);
cooldown = 0f;
}else{
link = -1;
}
}
@Override
@@ -201,7 +206,7 @@ public class StackConveyor extends Block implements Autotiler{
Draw.z(Layer.block - 0.15f);
super.drawCracks();
}
@Override
public void payloadDraw(){
Draw.rect(block.fullIcon, x, y);
@@ -294,7 +299,6 @@ public class StackConveyor extends Block implements Autotiler{
}else{ //transfer
if(state != stateLoad || (items.total() >= getMaximumAccepted(lastItem))){
if(front() instanceof StackConveyorBuild e && e.team == team){
//sleep if its occupied
if(e.link == -1){
e.items.add(items);
e.lastItem = lastItem;