Fixed derelict plastanium conveyor repairs
This commit is contained in:
@@ -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, () -> {
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -201,7 +206,7 @@ public class StackConveyor extends Block implements Autotiler{
|
|||||||
Draw.z(Layer.block - 0.15f);
|
Draw.z(Layer.block - 0.15f);
|
||||||
super.drawCracks();
|
super.drawCracks();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void payloadDraw(){
|
public void payloadDraw(){
|
||||||
Draw.rect(block.fullIcon, x, y);
|
Draw.rect(block.fullIcon, x, y);
|
||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user