Bedshaped's Best Bugfixes #1 (#654)

Fixes #505 (again)
Fixes #626 
Fixes #647 
Resolves #509
This commit is contained in:
Bedshaped
2016-08-02 19:47:37 +01:00
committed by skull132
parent eba855d423
commit f0df1746f8
7 changed files with 32 additions and 9 deletions

View File

@@ -241,14 +241,12 @@
//creates a new stack with the specified amount
/obj/item/stack/proc/split(var/tamount)
if (!amount)
return null
if(uses_charge)
if (!get_amount())
return null
var/transfer = max(min(tamount, src.amount, initial(max_amount)), 0)
var/orig_amount = src.amount
var/orig_amount = src.get_amount()
if (transfer && src.use(transfer))
var/obj/item/stack/newstack = new src.type(loc, transfer)
newstack.color = color