Ore renaming

This commit is contained in:
Anuken
2022-01-18 10:48:27 -05:00
parent 51aa374225
commit f3811d6710
37 changed files with 20 additions and 12 deletions
@@ -44,7 +44,11 @@ public class OreBlock extends OverlayFloor{
@OverrideCallSuper
public void createIcons(MultiPacker packer){
for(int i = 0; i < variants; i++){
PixmapRegion shadow = Core.atlas.getPixmap(itemDrop.name + (i + 1));
//use name (e.g. "ore-copper1"), fallback to "copper1" as per the old naming system
PixmapRegion shadow = Core.atlas.has(name + (i + 1)) ?
Core.atlas.getPixmap(name + (i + 1)) :
Core.atlas.getPixmap(itemDrop.name + (i + 1));
Pixmap image = shadow.crop();
int offset = image.width / tilesize - 1;
@@ -6,7 +6,7 @@ import mindustry.type.*;
public class WallOreBlock extends OreBlock{
public WallOreBlock(Item ore){
super("wall-ore-" + ore.name, ore);
super("ore-wall-" + ore.name, ore);
}
//mods only