v0.6.1b: examining a tile that has never been seen no longer shows text

This is to fix an exploit where players could search none-visible areas to determine where the map is.
This commit is contained in:
Evan Debenham 2017-08-21 05:02:04 -04:00
parent e2750832c6
commit 04e575bd23

View File

@ -912,12 +912,10 @@ public class GameScene extends PixelScene {
} }
public static void examineCell( Integer cell ) { public static void examineCell( Integer cell ) {
if (cell == null) { if (cell == null
return; || cell < 0
} || cell > Dungeon.level.length()
|| (!Dungeon.level.visited[cell] && !Dungeon.level.mapped[cell])) {
if (cell < 0 || cell > Dungeon.level.length() || (!Dungeon.level.visited[cell] && !Dungeon.level.mapped[cell])) {
GameScene.show( new WndMessage( Messages.get(GameScene.class, "dont_know") ) ) ;
return; return;
} }