Implemented #3486 with some minor changes

This commit is contained in:
Anuken
2020-12-11 11:48:20 -05:00
parent c54f398063
commit daaea591e4
7 changed files with 51 additions and 27 deletions

View File

@@ -69,12 +69,6 @@ public class Wall extends Block{
return new TextureRegion[]{Core.atlas.find(Core.atlas.has(name) ? name : name + "1")};
}
@Override
public boolean canReplace(Block other){
if(other.alwaysReplace) return true;
return (other != this || rotate) && this.group != BlockGroup.none && other.group == this.group && other != this && size >= other.size;
}
public class WallBuild extends Building{
public float hit;

View File

@@ -23,12 +23,6 @@ public class Router extends Block{
noUpdateDisabled = true;
}
@Override
public boolean canReplace(Block other){
if(other.alwaysReplace) return true;
return (other != this || rotate) && this.group != BlockGroup.none && other.group == this.group && size >= other.size;
}
public class RouterBuild extends Building implements ControlBlock{
public Item lastItem;
public Tile lastInput;

View File

@@ -254,7 +254,7 @@ public class CoreBlock extends StorageBlock{
for(Building other : state.teams.cores(team)){
if(other.tile() == tile) continue;
storageCapacity += other.block.itemCapacity + other.proximity().sum(e -> owns(e) && owns(other, e) ? e.block.itemCapacity : 0);
storageCapacity += other.block.itemCapacity + other.proximity().sum(e -> owns(other, e) ? e.block.itemCapacity : 0);
}
//Team.sharded.core().items.set(Items.surgeAlloy, 12000)