Fixed saving.
This commit is contained in:
parent
9c63b8e4b0
commit
7601a60842
|
@ -186,7 +186,7 @@ G.LoadGame = function () {
|
||||||
G.stats.illness = loadObject.stats.illness;
|
G.stats.illness = loadObject.stats.illness;
|
||||||
G.economy.innCost = loadObject.economy.innCost;
|
G.economy.innCost = loadObject.economy.innCost;
|
||||||
G.economy.innStays = loadObject.economy.innStays;
|
G.economy.innStays = loadObject.economy.innStays;
|
||||||
G.economy.itemWorth = loadObject.economy.itemWorth.slice();
|
G.economy.cargoItemWorth = loadObject.economy.itemWorth.slice();
|
||||||
G.economy.cargoSold = loadObject.economy.cargoSold.slice();
|
G.economy.cargoSold = loadObject.economy.cargoSold.slice();
|
||||||
G.economy.cargoBought = loadObject.economy.cargoBought.slice();
|
G.economy.cargoBought = loadObject.economy.cargoBought.slice();
|
||||||
|
|
||||||
|
|
|
@ -103,12 +103,13 @@ rm_Ocean.RunClock = function () {
|
||||||
if (rm_Ocean.clockTimerCount > rm_Ocean.clockTimerCutoff) {
|
if (rm_Ocean.clockTimerCount > rm_Ocean.clockTimerCutoff) {
|
||||||
rm_Ocean.clockTimerCount = 0;
|
rm_Ocean.clockTimerCount = 0;
|
||||||
// Play New_Day sound.
|
// Play New_Day sound.
|
||||||
G.SaveGame();
|
|
||||||
G.economy.UpdateEconomy();
|
G.economy.UpdateEconomy();
|
||||||
|
|
||||||
for (var i = 0; i < G.map.length; i++) {
|
for (var i = 0; i < G.map.length; i++) {
|
||||||
G.map[i].island.NewDay();
|
G.map[i].island.NewDay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G.SaveGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rm_Ocean.clockTimerCount == 0 ||
|
if (rm_Ocean.clockTimerCount == 0 ||
|
||||||
|
|
Loading…
Reference in New Issue