diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Alchemy.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Alchemy.java index 803f094cc..0a517edda 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Alchemy.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Alchemy.java @@ -37,12 +37,13 @@ public class Alchemy extends Blob { public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); - for (int i=0; i < cur.length; i++) { - if (cur[i] > 0) { - pos = i; - break; + if (volume > 0) + for (int i=0; i < cur.length; i++) { + if (cur[i] > 0) { + pos = i; + break; + } } - } } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Blob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Blob.java index 943ce21f8..8ae024bab 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Blob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Blob.java @@ -245,7 +245,7 @@ public class Blob extends Actor { public static int volumeAt( int cell, Class type){ Blob gas = Dungeon.level.blobs.get( type ); - if (gas == null) { + if (gas == null || gas.volume == 0) { return 0; } else { return gas.cur[cell]; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WellWater.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WellWater.java index ff64da9e4..234c511c3 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WellWater.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WellWater.java @@ -41,12 +41,13 @@ public class WellWater extends Blob { public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); - for (int i=0; i < cur.length; i++) { - if (cur[i] > 0) { - pos = i; - break; + if (volume > 0) + for (int i=0; i < cur.length; i++) { + if (cur[i] > 0) { + pos = i; + break; + } } - } } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfPurity.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfPurity.java index 11da1dead..5f6b4e6af 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfPurity.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfPurity.java @@ -66,7 +66,7 @@ public class PotionOfPurity extends Potion { for (int j=0; j < blobs.length; j++) { Blob blob = blobs[j]; - if (blob == null) { + if (blob == null || blob.volume == 0) { continue; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoCell.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoCell.java index a6fd313c6..781bd03bd 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoCell.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoCell.java @@ -89,7 +89,7 @@ public class WndInfoCell extends Window { add(info); for (Blob blob:Dungeon.level.blobs.values()) { - if (blob.cur[cell] > 0 && blob.tileDesc() != null) { + if (blob.volume > 0 && blob.cur[cell] > 0 && blob.tileDesc() != null) { if (desc.length() > 0) { desc += "\n\n"; }