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