Skip to content

Commit

Permalink
tabs to spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Nov 2, 2014
1 parent c9833c3 commit 427ca15
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tradecalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,17 +238,17 @@ def _fitCombos(offset, cr, cap):

# Adjust for age for "M"/"H" items with low units.
if item.stock < maxQty and item.stock > 0: # -1 = unknown
level = item.stockLevel
if level > 1:
# Assume 2 units per 10 minutes for high,
# 1 unit per 15 minutes for medium
units = level - 1
interval = (30 / level) * 60
speculativeRecovery = units * math.floor(item.srcAge / interval)
else:
# Low / Unknown - don't try to guess
speculativeRecovery = 0
maxQty = min(maxQty, item.stock + speculativeRecovery)
level = item.stockLevel
if level > 1:
# Assume 2 units per 10 minutes for high,
# 1 unit per 15 minutes for medium
units = level - 1
interval = (30 / level) * 60
speculativeRecovery = units * math.floor(item.srcAge / interval)
else:
# Low / Unknown - don't try to guess
speculativeRecovery = 0
maxQty = min(maxQty, item.stock + speculativeRecovery)

if maxQty > 0:
loadItems = [[item, maxQty]]
Expand Down

0 comments on commit 427ca15

Please sign in to comment.