Fixed packet spam on sector capture
This commit is contained in:
@@ -2,6 +2,7 @@ package mindustry.world.blocks.environment;
|
||||
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.world.*;
|
||||
|
||||
/**A type of floor that is overlaid on top of other floors.*/
|
||||
@@ -12,6 +13,11 @@ public class OverlayFloor extends Floor{
|
||||
useColor = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceOn(Tile tile, Team team, int rotation){
|
||||
return !wallOre || tile.block().solid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBase(Tile tile){
|
||||
Draw.rect(variantRegions[Mathf.randomSeed(tile.pos(), 0, Math.max(0, variantRegions.length - 1))], tile.worldx(), tile.worldy());
|
||||
|
||||
@@ -45,6 +45,9 @@ public class RemoveWall extends Block{
|
||||
@Override
|
||||
public void placeEnded(Tile tile, @Nullable Unit builder){
|
||||
tile.setBlock(Blocks.air);
|
||||
if(tile.overlay().wallOre){
|
||||
tile.setOverlay(Blocks.air);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user