mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-06-09 14:07:14 +08:00
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:
+2
-1
@@ -618,7 +618,6 @@ var World = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
World.seenAll = World.testMap();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
testMap: function() {
|
testMap: function() {
|
||||||
@@ -898,6 +897,8 @@ var World = {
|
|||||||
goHome: function() {
|
goHome: function() {
|
||||||
// Home safe! Commit the changes.
|
// Home safe! Commit the changes.
|
||||||
$SM.setM('game.world', World.state);
|
$SM.setM('game.world', World.state);
|
||||||
|
World.seenAll = World.testMap();
|
||||||
|
|
||||||
if(World.state.sulphurmine && $SM.get('game.buildings["sulphur mine"]', true) === 0) {
|
if(World.state.sulphurmine && $SM.get('game.buildings["sulphur mine"]', true) === 0) {
|
||||||
$SM.add('game.buildings["sulphur mine"]', 1);
|
$SM.add('game.buildings["sulphur mine"]', 1);
|
||||||
Engine.event('progress', 'sulphur mine');
|
Engine.event('progress', 'sulphur mine');
|
||||||
|
|||||||
Reference in New Issue
Block a user