From 29bcb8e07c338886659166124d5bbb202bedcb6b Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 14 Aug 2018 10:29:45 -0400 Subject: [PATCH] Removed bars --- core/src/io/anuke/mindustry/graphics/OverlayRenderer.java | 4 ++-- .../io/anuke/mindustry/maps/generation/FortressGenerator.java | 2 +- .../anuke/mindustry/world/blocks/distribution/Conveyor.java | 2 +- .../src/io/anuke/mindustry/world/blocks/production/Drill.java | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/src/io/anuke/mindustry/graphics/OverlayRenderer.java b/core/src/io/anuke/mindustry/graphics/OverlayRenderer.java index 0127965d68..1fc853b729 100644 --- a/core/src/io/anuke/mindustry/graphics/OverlayRenderer.java +++ b/core/src/io/anuke/mindustry/graphics/OverlayRenderer.java @@ -180,8 +180,8 @@ public class OverlayRenderer{ y = (int) (y + 0.0001f); } - drawEncloser(x, y - 8f, 1f); - drawBar(Palette.healthstats, x, y - 8f, unit.healthf()); + //drawEncloser(x, y - 8f, 1f); + //drawBar(Palette.healthstats, x, y - 8f, unit.healthf()); } void drawBar(Color color, float x, float y, float finion){ diff --git a/core/src/io/anuke/mindustry/maps/generation/FortressGenerator.java b/core/src/io/anuke/mindustry/maps/generation/FortressGenerator.java index eeca7a94c5..725072d6f3 100644 --- a/core/src/io/anuke/mindustry/maps/generation/FortressGenerator.java +++ b/core/src/io/anuke/mindustry/maps/generation/FortressGenerator.java @@ -127,7 +127,7 @@ public class FortressGenerator{ int maxIndex = (int)(1 + ((float)gen.sector.difficulty / maxDifficulty * (structures.length-2))); for(int i = maxIndex/2; i < maxIndex; i++){ - selected.add(structures[i]); + selected.add(structures[Math.min(i, structures.length-1)]); } float baseChance = 0.8f / selected.size; diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java index 53bace015a..58dec89871 100644 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java +++ b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java @@ -98,7 +98,7 @@ public class Conveyor extends Block{ byte rotation = tile.getRotation(); int frame = entity.clogHeat <= 0.5f ? (int) ((Timers.time() / 4f) % 4) : 0; - Draw.rect(regions[entity.blendbits][frame], tile.drawx(), tile.drawy(), + Draw.rect(regions[Mathf.clamp(entity.blendbits, 0, regions.length - 1)][Mathf.clamp(frame, 0, regions[0].length - 1)], tile.drawx(), tile.drawy(), tilesize * entity.blendsclx, tilesize * entity.blendscly, rotation*90); } diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Drill.java b/core/src/io/anuke/mindustry/world/blocks/production/Drill.java index fdac8ab508..c98d273eed 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Drill.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Drill.java @@ -234,6 +234,7 @@ public class Drill extends Block{ } protected boolean isValid(Tile tile){ + if(tile == null) return false; ItemStack drops = tile.floor().drops; return drops != null && drops.item.hardness <= tier; }