started backup/loading mechanic

This commit is contained in:
Vermilingua
2013-10-13 11:53:11 +11:00
parent acc04d0780
commit 1be4d5edc5
3 changed files with 13 additions and 4 deletions
+7 -1
View File
@@ -11,7 +11,7 @@ var Prestige = {
},
save: function() {
prevStores = [ //g = goods, w = weapons, a = ammo
var prevStores = [ //g = goods, w = weapons, a = ammo
$SM.get('stores["wood"]'), // randGen('g'),
$SM.get('stores["fur"]'), // randGen('g'),
$SM.get('stores["meat"]'), // randGen('g'),
@@ -37,9 +37,15 @@ var Prestige = {
$SM.get('stores["grenade"]'), // randGen('a'),
$SM.get('stores["bolas"]') // randGen('a')
];
$SM.set('previous.stores', prevStores);
return prevStores;
},
load: function() {
var prevStores = $SM.get('previous.stores');
return prevStores;
}
/*randGen: function(storeType) {
if (storeType == 'g') {
divisor = Math.floor(Math.random()*10)