mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-31 01:31:53 +08:00
Update world.js
This commit is contained in:
+4
-2
@@ -201,7 +201,7 @@ var World = {
|
||||
y += dy;
|
||||
}
|
||||
}
|
||||
return World.VILLAGE_POS;
|
||||
return World.VILLAGE_POS;
|
||||
};
|
||||
var closestRoad = findClosestRoad(World.curPos);
|
||||
var xDist = World.curPos[0] - closestRoad[0];
|
||||
@@ -917,6 +917,8 @@ var World = {
|
||||
Engine.keyLock = false;
|
||||
// Explore in a temporary world-state. We'll commit the changes if you return home safe.
|
||||
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.setHp(World.getMaxHealth());
|
||||
World.foodMove = 0;
|
||||
@@ -944,4 +946,4 @@ var World = {
|
||||
handleStateUpdates: function(e){
|
||||
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user