Update world map on return

World.seenAll must be updated only when committing state changes (i.e., on return home safe), not during exploration.
This commit is contained in:
Andrea Rendine
2016-02-14 16:09:15 +01:00
parent 3b66f5cad5
commit 28cdca6003
+2 -1
View File
@@ -618,7 +618,6 @@ var World = {
}
}
}
World.seenAll = World.testMap();
},
testMap: function() {
@@ -898,6 +897,8 @@ var World = {
goHome: function() {
// Home safe! Commit the changes.
$SM.setM('game.world', World.state);
World.seenAll = World.testMap();
if(World.state.sulphurmine && $SM.get('game.buildings["sulphur mine"]', true) === 0) {
$SM.add('game.buildings["sulphur mine"]', 1);
Engine.event('progress', 'sulphur mine');