Removed WallOre class

This commit is contained in:
Anuken
2022-01-19 23:23:05 -05:00
parent 698e89e796
commit 9593765742
9 changed files with 18 additions and 36 deletions

View File

@@ -529,7 +529,7 @@ public class Tile implements Position, QuadTreeObject, Displayable{
public @Nullable Item wallDrop(){
return block.solid ?
block.itemDrop != null ? block.itemDrop :
overlay instanceof WallOreBlock ? overlay.itemDrop :
overlay.wallOre ? overlay.itemDrop :
null : null;
}

View File

@@ -65,6 +65,8 @@ public class Floor extends Block{
public boolean canShadow = true;
/** Whether this overlay needs a surface to be on. False for floating blocks, like spawns. */
public boolean needsSurface = true;
/** If true, this ore is allowed on walls. */
public boolean wallOre = false;
protected TextureRegion[][] edges;
protected Seq<Block> blenders = new Seq<>();

View File

@@ -35,7 +35,7 @@ public class OreBlock extends OverlayFloor{
}
public void setup(Item ore){
this.localizedName = ore.localizedName;
this.localizedName = ore.localizedName + (wallOre ? " " + Core.bundle.get("wallore") : "");
this.itemDrop = ore;
this.mapColor.set(ore.color);
}

View File

@@ -36,8 +36,8 @@ public class StaticWall extends Prop{
}
//draw ore on top
if(tile.overlay() instanceof WallOreBlock ore){
ore.drawBase(tile);
if(tile.overlay().wallOre){
tile.overlay().drawBase(tile);
}
}

View File

@@ -1,24 +0,0 @@
package mindustry.world.blocks.environment;
import arc.*;
import mindustry.type.*;
/**An overlay ore that draws on top of walls. */
public class WallOreBlock extends OreBlock{
public WallOreBlock(Item ore){
super("ore-wall-" + ore.name, ore);
}
//mods only
public WallOreBlock(String name){
super(name);
}
@Override
public void init(){
super.init();
this.localizedName = this.localizedName + " " + Core.bundle.get("wallore");
}
}