mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-06-26 22:32:30 +08:00
Buy map when needed
Buy map button availability depends on the fact that there are still unexplored parts of the map.
This commit is contained in:
+1
-12
@@ -434,18 +434,7 @@ Events.Room = [
|
|||||||
text: _('buy map'),
|
text: _('buy map'),
|
||||||
cost: { 'fur': 200, 'scales': 10 },
|
cost: { 'fur': 200, 'scales': 10 },
|
||||||
available: function() {
|
available: function() {
|
||||||
var mask = $SM.get('game.world.mask');
|
return !World.seenAll;
|
||||||
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;
|
|
||||||
},
|
},
|
||||||
notification: _('the map uncovers a bit of the world'),
|
notification: _('the map uncovers a bit of the world'),
|
||||||
onChoose: World.applyMap
|
onChoose: World.applyMap
|
||||||
|
|||||||
Reference in New Issue
Block a user