mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 00:01:54 +08:00
made store collection routine in SM, and updated everything to suit
This commit is contained in:
@@ -190,6 +190,41 @@ var StateManager = {
|
||||
};
|
||||
},
|
||||
|
||||
getStores: function() {
|
||||
var stores = [
|
||||
$SM.get('stores["wood"]'),
|
||||
$SM.get('stores["fur"]'),
|
||||
$SM.get('stores["meat"]'),
|
||||
$SM.get('stores["iron"]'),
|
||||
$SM.get('stores["coal"]'),
|
||||
$SM.get('stores["sulphur"]'),
|
||||
$SM.get('stores["steel"]'),
|
||||
$SM.get('stores["cured meat"]'),
|
||||
$SM.get('stores["scales"]'),
|
||||
$SM.get('stores["teeth"]'),
|
||||
$SM.get('stores["leather"]'),
|
||||
$SM.get('stores["bait"]'),
|
||||
$SM.get('stores["torch"]'),
|
||||
$SM.get('stores["cloth"]'),
|
||||
$SM.get('stores["bone spear"]'),
|
||||
$SM.get('stores["iron sword"]'),
|
||||
$SM.get('stores["steel sword"]'),
|
||||
$SM.get('stores["bayonet"]'),
|
||||
$SM.get('stores["rifle"]'),
|
||||
$SM.get('stores["laser rifle"]'),
|
||||
$SM.get('stores["bullets"]'),
|
||||
$SM.get('stores["energy cell"]'),
|
||||
$SM.get('stores["grenade"]'),
|
||||
$SM.get('stores["bolas"]')
|
||||
];
|
||||
for (var n = 0; n <= 23; n++) {
|
||||
if (isNaN(stores[n])) {
|
||||
stores[n] = 0;
|
||||
}
|
||||
}
|
||||
return stores;
|
||||
},
|
||||
|
||||
//creates full reference from input
|
||||
//hopefully this won't ever need to be more complicated
|
||||
buildPath: function(input){
|
||||
|
||||
Reference in New Issue
Block a user