This commit is contained in:
Neerti
2015-11-08 10:09:14 -05:00
parent 6c3dfb960d
commit 4f77afece1
235 changed files with 8451 additions and 9025 deletions

View File

@@ -137,7 +137,6 @@
if (istype(O, /obj/item/stack))
var/obj/item/stack/S = O
S.amount = produced
S.add_to_stacks(user)
if (istype(O, /obj/item/weapon/storage)) //BubbleWrap - so newly formed boxes are empty
for (var/obj/item/I in O)
@@ -192,7 +191,7 @@
else
if(get_amount() < used)
return 0
for(var/i = 1 to charge_costs.len)
for(var/i = 1 to uses_charge)
var/datum/matter_synth/S = synths[i]
S.use_charge(charge_costs[i] * used) // Doesn't need to be deleted
return 1
@@ -265,8 +264,8 @@
return 0
var/datum/matter_synth/S = synths[1]
. = round(S.get_charge() / charge_costs[1])
if(charge_costs.len > 1)
for(var/i = 2 to charge_costs.len)
if(uses_charge > 1)
for(var/i = 2 to uses_charge)
S = synths[i]
. = min(., round(S.get_charge() / charge_costs[i]))
return
@@ -285,13 +284,13 @@
return
return max_amount
/obj/item/stack/proc/add_to_stacks(mob/user as mob)
for (var/obj/item/stack/item in user.loc)
/obj/item/stack/proc/add_to_stacks(mob/usr as mob)
for (var/obj/item/stack/item in usr.loc)
if (item==src)
continue
var/transfer = src.transfer_to(item)
if (transfer)
user << "<span class='notice'>You add a new [item.singular_name] to the stack. It now contains [item.amount] [item.singular_name]\s.</span>"
usr << "You add a new [item.singular_name] to the stack. It now contains [item.amount] [item.singular_name]\s."
if(!amount)
break