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

View File

@@ -96,6 +96,7 @@ public class Build{
tile.build.changeTeam(team); tile.build.changeTeam(team);
tile.build.enabled = true; tile.build.enabled = true;
tile.build.checkAllowUpdate(); tile.build.checkAllowUpdate();
tile.build.updateProximity();
tile.build.onRepaired(); tile.build.onRepaired();
if(unit != null && unit.getControllerName() != null) tile.build.lastAccessed = unit.getControllerName(); 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(){ public void dropped(){
super.dropped(); super.dropped();
var prev = Geometry.d4[(rotation + 2) % 4]; 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 @Override
@@ -294,7 +299,6 @@ public class StackConveyor extends Block implements Autotiler{
}else{ //transfer }else{ //transfer
if(state != stateLoad || (items.total() >= getMaximumAccepted(lastItem))){ if(state != stateLoad || (items.total() >= getMaximumAccepted(lastItem))){
if(front() instanceof StackConveyorBuild e && e.team == team){ if(front() instanceof StackConveyorBuild e && e.team == team){
//sleep if its occupied
if(e.link == -1){ if(e.link == -1){
e.items.add(items); e.items.add(items);
e.lastItem = lastItem; e.lastItem = lastItem;