More map submission testing / Desktop editor pick tile support

This commit is contained in:
Anuken
2024-10-02 12:29:26 -04:00
parent aaa27a0b69
commit 939b8a9ed8
10 changed files with 63 additions and 5 deletions

View File

@@ -92,6 +92,7 @@ public class Floor extends Block{
placeableLiquid = true;
allowRectanglePlacement = true;
instantBuild = true;
ignoreBuildDarkness = true;
placeEffect = Fx.rotateBlock;
}

View File

@@ -5,6 +5,7 @@ import arc.graphics.g2d.*;
import arc.math.*;
import arc.math.geom.*;
import mindustry.annotations.Annotations.*;
import mindustry.content.*;
import mindustry.graphics.*;
import mindustry.world.*;
@@ -21,7 +22,10 @@ public class StaticWall extends Prop{
variants = 2;
cacheLayer = CacheLayer.walls;
allowRectanglePlacement = true;
placeEffect = Fx.rotateBlock;
instantBuild = true;
ignoreBuildDarkness = true;
placeableLiquid = true;
}
@Override
@@ -49,6 +53,11 @@ public class StaticWall extends Prop{
split = large.split(32, 32);
}
@Override
public boolean canReplace(Block other){
return other instanceof StaticWall || super.canReplace(other);
}
boolean eq(int rx, int ry){
return rx < world.width() - 1 && ry < world.height() - 1
&& world.tile(rx + 1, ry).block() == this