mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-06-08 21:47:13 +08:00
Fixed whitespace conformity in path.js
This commit is contained in:
+5
-5
@@ -258,15 +258,15 @@ var Path = {
|
|||||||
return row;
|
return row;
|
||||||
},
|
},
|
||||||
|
|
||||||
increaseSupply: function(btn) {
|
increaseSupply: function(btn) {
|
||||||
var supply = $(this).closest('.outfitRow').attr('key');
|
var supply = $(this).closest('.outfitRow').attr('key');
|
||||||
Engine.log('increasing ' + supply + ' by up to ' + btn.data);
|
Engine.log('increasing ' + supply + ' by up to ' + btn.data);
|
||||||
var cur = Path.outfit[supply];
|
var cur = Path.outfit[supply];
|
||||||
cur = typeof cur == 'number' ? cur : 0;
|
cur = typeof cur == 'number' ? cur : 0;
|
||||||
if(Path.getFreeSpace() >= Path.getWeight(supply) && cur < $SM.get('stores["'+supply+'"]', true)) {
|
if(Path.getFreeSpace() >= Path.getWeight(supply) && cur < $SM.get('stores["'+supply+'"]', true)) {
|
||||||
var maxExtraByWeight = Math.floor(Path.getFreeSpace() / Path.getWeight(supply));
|
var maxExtraByWeight = Math.floor(Path.getFreeSpace() / Path.getWeight(supply));
|
||||||
var maxExtraByStore = $SM.get('stores["'+supply+'"]', true) - cur;
|
var maxExtraByStore = $SM.get('stores["'+supply+'"]', true) - cur;
|
||||||
var maxExtraByBtn = btn.data;
|
var maxExtraByBtn = btn.data;
|
||||||
Path.outfit[supply] = cur + Math.min(maxExtraByBtn, Math.min(maxExtraByWeight, maxExtraByStore));
|
Path.outfit[supply] = cur + Math.min(maxExtraByBtn, Math.min(maxExtraByWeight, maxExtraByStore));
|
||||||
Path.updateOutfitting();
|
Path.updateOutfitting();
|
||||||
}
|
}
|
||||||
@@ -309,4 +309,4 @@ var Path = {
|
|||||||
Path.updatePerks();
|
Path.updatePerks();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user