From 3b66f5cad5bca107e4b1b8d749eb27a3b90aff29 Mon Sep 17 00:00:00 2001 From: Andrea Rendine Date: Sun, 14 Feb 2016 15:54:59 +0100 Subject: [PATCH] Buy map when needed Buy map button availability depends on the fact that there are still unexplored parts of the map. --- script/events/room.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/script/events/room.js b/script/events/room.js index 32f766a..6710b25 100644 --- a/script/events/room.js +++ b/script/events/room.js @@ -434,18 +434,7 @@ Events.Room = [ text: _('buy map'), cost: { 'fur': 200, 'scales': 10 }, available: function() { - var mask = $SM.get('game.world.mask'); - var dark = false; - loop: - for(var i = 0; i < mask.length; i++) { - for(var j = 0; j < mask[i].length; j++) { - if(!mask[i][j]) { - dark = true; - break loop; - } - } - } - return dark; + return !World.seenAll; }, notification: _('the map uncovers a bit of the world'), onChoose: World.applyMap