Removed WallOre class
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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<>();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user