This commit is contained in:
Ghommie
2020-01-10 02:26:19 +01:00
178 changed files with 10647 additions and 1134 deletions
+24 -1
View File
@@ -9,6 +9,7 @@
w_class = WEIGHT_CLASS_TINY
var/amount_per_transfer_from_this = 5
var/list/possible_transfer_amounts = list(5,10,15,20,25,30)
var/APTFT_altclick = TRUE //will the set amount_per_transfer_from_this proc be called on AltClick() ?
var/volume = 30
var/reagent_flags
var/list/list_reagents = null
@@ -23,14 +24,36 @@
. = ..()
if(isnum(vol) && vol > 0)
volume = vol
if(length(possible_transfer_amounts))
verbs += /obj/item/reagent_containers/proc/set_APTFT
create_reagents(volume, reagent_flags)
if(spawned_disease)
var/datum/disease/F = new spawned_disease()
var/list/data = list("blood_DNA" = "UNKNOWN DNA", "blood_type" = "SY","viruses"= list(F))
reagents.add_reagent(/datum/reagent/blood, disease_amount, data)
add_initial_reagents()
/obj/item/reagent_containers/examine(mob/user)
. = ..()
. += "Currently transferring [amount_per_transfer_from_this] units per use."
if(possible_transfer_amounts && user.Adjacent(src))
. += "<span class='notice'>Alt-click it to set its transfer amount.</span>"
/obj/item/reagent_containers/AltClick(mob/user)
. = ..()
if(APTFT_altclick && length(possible_transfer_amounts) > 1 && user.canUseTopic(src, BE_CLOSE, NO_DEXTERY))
set_APTFT()
return TRUE
/obj/item/reagent_containers/proc/set_APTFT(mob/user) //set amount_per_transfer_from_this
set name = "Set Transfer Amount"
set category = "Object"
set waitfor = FALSE
var/N = input("Amount per transfer from this:","[src]") as null|anything in possible_transfer_amounts
if(N)
amount_per_transfer_from_this = N
to_chat(user, "<span class='notice'>[src]'s transfer amount is now [amount_per_transfer_from_this] units.</span>")
/obj/item/reagent_containers/proc/add_initial_reagents()
if(list_reagents)
reagents.add_reagent_list(list_reagents)