Fixed packet spam on sector capture

This commit is contained in:
Anuken
2024-10-06 10:05:51 -04:00
parent 20a0afd280
commit 304ad74084
6 changed files with 38 additions and 23 deletions
@@ -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);
}
}
}