mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-06-04 03:27:13 +08:00
started backup/loading mechanic
This commit is contained in:
+7
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user