mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 00:01:54 +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() {
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user