Optimalisations

This commit is contained in:
Atlantiscze
2014-12-31 01:53:53 +01:00
parent 7ceade9320
commit 3c41d77b1a
2 changed files with 14 additions and 8 deletions

View File

@@ -14,6 +14,9 @@
if(drain_check)
return 1
if(charge <= 0)
return 0
var/cell_amt = min((amount * CELLRATE), charge)
use(cell_amt)
return cell_amt / CELLRATE