mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 08:11:54 +08:00
Actually fixed the bug I thought I fixed ages ago. Turns out saving at
outposts is a stupid idea!
This commit is contained in:
@@ -911,8 +911,6 @@ var World = {
|
|||||||
useOutpost: function() {
|
useOutpost: function() {
|
||||||
Notifications.notify(null, 'water replenished');
|
Notifications.notify(null, 'water replenished');
|
||||||
World.setWater(World.getMaxWater());
|
World.setWater(World.getMaxWater());
|
||||||
// Save progress at outposts
|
|
||||||
$SM.setM('game.world', World.state);
|
|
||||||
// Mark this outpost as used
|
// Mark this outpost as used
|
||||||
World.usedOutposts[World.curPos[0] + ',' + World.curPos[1]] = true;
|
World.usedOutposts[World.curPos[0] + ',' + World.curPos[1]] = true;
|
||||||
},
|
},
|
||||||
@@ -921,8 +919,6 @@ var World = {
|
|||||||
Engine.keyLock = false;
|
Engine.keyLock = false;
|
||||||
// Explore in a temporary world-state. We'll commit the changes if you return home safe.
|
// Explore in a temporary world-state. We'll commit the changes if you return home safe.
|
||||||
World.state = $.extend(true, {}, $SM.get('game.world'));
|
World.state = $.extend(true, {}, $SM.get('game.world'));
|
||||||
// Some weirdness in jQuery's extend method is causing the map to not be deep copied...
|
|
||||||
World.state.map = $.extend(true, {}, World.state.map);
|
|
||||||
World.setWater(World.getMaxWater());
|
World.setWater(World.getMaxWater());
|
||||||
World.setHp(World.getMaxHealth());
|
World.setHp(World.getMaxHealth());
|
||||||
World.foodMove = 0;
|
World.foodMove = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user