v3.0.0: fixed very specific cases where high grass could affect shops
This commit is contained in:
+6
@@ -56,6 +56,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts.Tipp
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.watabou.utils.Point;
|
import com.watabou.utils.Point;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
@@ -188,6 +189,11 @@ public class ShopRoom extends SpecialRoom {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int cell = level.pointToCell(curItemPlace);
|
int cell = level.pointToCell(curItemPlace);
|
||||||
|
//prevents high grass from being trampled, potentially dropping dew/seeds onto shop items
|
||||||
|
if (level.map[cell] == Terrain.HIGH_GRASS){
|
||||||
|
Level.set(cell, Terrain.GRASS, level);
|
||||||
|
GameScene.updateMap(cell);
|
||||||
|
}
|
||||||
level.drop( item, cell ).type = Heap.Type.FOR_SALE;
|
level.drop( item, cell ).type = Heap.Type.FOR_SALE;
|
||||||
itemsToSpawn.remove(item);
|
itemsToSpawn.remove(item);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user