initial commit - cross reference with 5th port - obviously has compile errors
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
/obj/item/weapon/reagent_containers/blood
|
||||
name = "blood pack"
|
||||
desc = "Contains blood used for transfusion. Must be attached to an IV drip."
|
||||
icon = 'icons/obj/bloodpack.dmi'
|
||||
icon_state = "empty"
|
||||
volume = 200
|
||||
var/blood_type = null
|
||||
var/labelled = 0
|
||||
|
||||
/obj/item/weapon/reagent_containers/blood/New()
|
||||
..()
|
||||
if(blood_type != null)
|
||||
reagents.add_reagent("blood", 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=blood_type,"resistances"=null,"trace_chem"=null))
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/blood/on_reagent_change()
|
||||
if(reagents)
|
||||
var/datum/reagent/blood/B = reagents.has_reagent("blood")
|
||||
if(B && B.data && B.data["blood_type"])
|
||||
blood_type = B.data["blood_type"]
|
||||
else
|
||||
blood_type = null
|
||||
update_pack_name()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/blood/proc/update_pack_name()
|
||||
if(!labelled)
|
||||
if(volume)
|
||||
if(blood_type)
|
||||
name = "blood pack [blood_type]"
|
||||
else
|
||||
name = "blood pack"
|
||||
else
|
||||
name = "empty blood pack"
|
||||
|
||||
/obj/item/weapon/reagent_containers/blood/update_icon()
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
if(0 to 9)
|
||||
icon_state = "empty"
|
||||
if(10 to 50)
|
||||
icon_state = "half"
|
||||
if(51 to INFINITY)
|
||||
icon_state = "full"
|
||||
|
||||
/obj/item/weapon/reagent_containers/blood/random/New()
|
||||
blood_type = pick("A+", "A-", "B+", "B-", "O+", "O-", "L")
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/blood/APlus
|
||||
blood_type = "A+"
|
||||
|
||||
/obj/item/weapon/reagent_containers/blood/AMinus
|
||||
blood_type = "A-"
|
||||
|
||||
/obj/item/weapon/reagent_containers/blood/BPlus
|
||||
blood_type = "B+"
|
||||
|
||||
/obj/item/weapon/reagent_containers/blood/BMinus
|
||||
blood_type = "B-"
|
||||
|
||||
/obj/item/weapon/reagent_containers/blood/OPlus
|
||||
blood_type = "O+"
|
||||
|
||||
/obj/item/weapon/reagent_containers/blood/OMinus
|
||||
blood_type = "O-"
|
||||
|
||||
/obj/item/weapon/reagent_containers/blood/lizard
|
||||
blood_type = "L"
|
||||
|
||||
/obj/item/weapon/reagent_containers/blood/empty
|
||||
name = "empty blood pack"
|
||||
icon_state = "empty"
|
||||
|
||||
/obj/item/weapon/reagent_containers/blood/attackby(obj/item/I, mob/user, params)
|
||||
if (istype(I, /obj/item/weapon/pen) || istype(I, /obj/item/toy/crayon))
|
||||
|
||||
var/t = stripped_input(user, "What would you like to label the blood pack?", name, null, 53)
|
||||
if(!user.canUseTopic(src))
|
||||
return
|
||||
if(user.get_active_hand() != I)
|
||||
return
|
||||
if(loc != user)
|
||||
return
|
||||
if(t)
|
||||
labelled = 1
|
||||
name = "blood pack - [t]"
|
||||
else
|
||||
labelled = 0
|
||||
update_pack_name()
|
||||
else
|
||||
return ..()
|
||||
@@ -0,0 +1,228 @@
|
||||
/*
|
||||
Contains:
|
||||
Borg Hypospray
|
||||
Borg Shaker
|
||||
Nothing to do with hydroponics in here. Sorry to dissapoint you.
|
||||
*/
|
||||
|
||||
/*
|
||||
Borg Hypospray
|
||||
*/
|
||||
/obj/item/weapon/reagent_containers/borghypo
|
||||
name = "cyborg hypospray"
|
||||
desc = "An advanced chemical synthesizer and injection system, designed for heavy-duty medical equipment."
|
||||
icon = 'icons/obj/syringe.dmi'
|
||||
item_state = "hypo"
|
||||
icon_state = "borghypo"
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = list()
|
||||
var/mode = 1
|
||||
var/charge_cost = 50
|
||||
var/charge_tick = 0
|
||||
var/recharge_time = 5 //Time it takes for shots to recharge (in seconds)
|
||||
var/bypass_protection = 0 //If the hypospray can go through armor or thick material
|
||||
|
||||
var/list/datum/reagents/reagent_list = list()
|
||||
var/list/reagent_ids = list("dexalin", "kelotane", "bicaridine", "antitoxin", "epinephrine", "spaceacillin")
|
||||
var/list/modes = list() //Basically the inverse of reagent_ids. Instead of having numbers as "keys" and strings as values it has strings as keys and numbers as values.
|
||||
//Used as list for input() in shakers.
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/New()
|
||||
..()
|
||||
|
||||
var/iteration = 1
|
||||
for(var/R in reagent_ids)
|
||||
add_reagent(R)
|
||||
modes[R] = iteration
|
||||
iteration++
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/process() //Every [recharge_time] seconds, recharge some reagents for the cyborg
|
||||
charge_tick++
|
||||
if(charge_tick >= recharge_time)
|
||||
regenerate_reagents()
|
||||
charge_tick = 0
|
||||
|
||||
//update_icon()
|
||||
return 1
|
||||
|
||||
// Purely for testing purposes I swear~ //don't lie to me
|
||||
/*
|
||||
/obj/item/weapon/reagent_containers/borghypo/verb/add_cyanide()
|
||||
set src in world
|
||||
add_reagent("cyanide")
|
||||
*/
|
||||
|
||||
|
||||
// Use this to add more chemicals for the borghypo to produce.
|
||||
/obj/item/weapon/reagent_containers/borghypo/proc/add_reagent(reagent)
|
||||
reagent_ids |= reagent
|
||||
var/datum/reagents/RG = new(30)
|
||||
RG.my_atom = src
|
||||
reagent_list += RG
|
||||
|
||||
var/datum/reagents/R = reagent_list[reagent_list.len]
|
||||
R.add_reagent(reagent, 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/proc/regenerate_reagents()
|
||||
if(isrobot(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(R && R.cell)
|
||||
for(var/i in 1 to reagent_ids.len)
|
||||
var/datum/reagents/RG = reagent_list[i]
|
||||
if(RG.total_volume < RG.maximum_volume) //Don't recharge reagents and drain power if the storage is full.
|
||||
R.cell.use(charge_cost) //Take power from borg...
|
||||
RG.add_reagent(reagent_ids[i], 5) //And fill hypo with reagent.
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/attack(mob/living/carbon/M, mob/user)
|
||||
var/datum/reagents/R = reagent_list[mode]
|
||||
if(!R.total_volume)
|
||||
user << "<span class='notice'>The injector is empty.</span>"
|
||||
return
|
||||
if(!istype(M))
|
||||
return
|
||||
if(R.total_volume && M.can_inject(user, 1, bypass_protection))
|
||||
M << "<span class='warning'>You feel a tiny prick!</span>"
|
||||
user << "<span class='notice'>You inject [M] with the injector.</span>"
|
||||
var/fraction = min(amount_per_transfer_from_this/R.total_volume, 1)
|
||||
R.reaction(M, INJECT, fraction)
|
||||
if(M.reagents)
|
||||
var/trans = R.trans_to(M, amount_per_transfer_from_this)
|
||||
user << "<span class='notice'>[trans] unit\s injected. [R.total_volume] unit\s remaining.</span>"
|
||||
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/RG in R.reagent_list)
|
||||
injected += RG.name
|
||||
add_logs(user, M, "injected", src, "(CHEMICALS: [english_list(injected)])")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/attack_self(mob/user)
|
||||
var/chosen_reagent = modes[input(user, "What reagent do you want to dispense?") as null|anything in reagent_ids]
|
||||
if(!chosen_reagent)
|
||||
return
|
||||
mode = chosen_reagent
|
||||
playsound(loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
var/datum/reagent/R = chemical_reagents_list[reagent_ids[mode]]
|
||||
user << "<span class='notice'>[src] is now dispensing '[R.name]'.</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/examine(mob/user)
|
||||
usr = user
|
||||
..()
|
||||
DescribeContents() //Because using the standardized reagents datum was just too cool for whatever fuckwit wrote this
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/proc/DescribeContents()
|
||||
var/empty = 1
|
||||
|
||||
for(var/datum/reagents/RS in reagent_list)
|
||||
var/datum/reagent/R = locate() in RS.reagent_list
|
||||
if(R)
|
||||
usr << "<span class='notice'>It currently has [R.volume] unit\s of [R.name] stored.</span>"
|
||||
empty = 0
|
||||
|
||||
if(empty)
|
||||
usr << "<span class='warning'>It is currently empty! Allow some time for the internal syntheszier to produce more.</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/hacked
|
||||
icon_state = "borghypo_s"
|
||||
reagent_ids = list ("facid", "mutetoxin", "cyanide", "sodium_thiopental", "heparin", "lexorin")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/syndicate
|
||||
name = "syndicate cyborg hypospray"
|
||||
desc = "An experimental piece of Syndicate technology used to produce powerful restorative nanites used to very quickly restore injuries of all types. Also metabolizes potassium iodide, for radiation poisoning, and morphine, for offense."
|
||||
icon_state = "borghypo_s"
|
||||
charge_cost = 20
|
||||
recharge_time = 2
|
||||
reagent_ids = list("syndicate_nanites", "potass_iodide", "morphine")
|
||||
bypass_protection = 1
|
||||
|
||||
/*
|
||||
Borg Shaker
|
||||
*/
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker
|
||||
name = "cyborg shaker"
|
||||
desc = "An advanced drink synthesizer and mixer."
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = "shaker"
|
||||
possible_transfer_amounts = list(5,10,20)
|
||||
charge_cost = 20 //Lots of reagents all regenerating at once, so the charge cost is lower. They also regenerate faster.
|
||||
recharge_time = 3
|
||||
|
||||
reagent_ids = list("beer", "orangejuice", "limejuice", "tomatojuice", "cola", "tonic", "sodawater", "ice", "cream", "whiskey", "vodka", "rum", "gin", "tequila", "vermouth", "wine", "kahlua", "cognac", "ale")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker/attack(mob/M, mob/user)
|
||||
return //Can't inject stuff with a shaker, can we? //not with that attitude
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker/regenerate_reagents()
|
||||
if(isrobot(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(R && R.cell)
|
||||
for(var/i in modes) //Lots of reagents in this one, so it's best to regenrate them all at once to keep it from being tedious.
|
||||
var/valueofi = modes[i]
|
||||
var/datum/reagents/RG = reagent_list[valueofi]
|
||||
if(RG.total_volume < RG.maximum_volume)
|
||||
R.cell.use(charge_cost)
|
||||
RG.add_reagent(reagent_ids[valueofi], 5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker/afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
else if(target.is_open_container() && target.reagents)
|
||||
var/datum/reagents/R = reagent_list[mode]
|
||||
if(!R.total_volume)
|
||||
user << "<span class='warning'>[src] is currently out of this ingredient! Please allow some time for the synthesizer to produce more.</span>"
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
user << "<span class='notice'>[target] is full.</span>"
|
||||
return
|
||||
|
||||
var/trans = R.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "<span class='notice'>You transfer [trans] unit\s of the solution to [target].</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker/DescribeContents()
|
||||
var/empty = 1
|
||||
|
||||
var/datum/reagents/RS = reagent_list[mode]
|
||||
var/datum/reagent/R = locate() in RS.reagent_list
|
||||
if(R)
|
||||
usr << "<span class='notice'>It currently has [R.volume] unit\s of [R.name] stored.</span>"
|
||||
empty = 0
|
||||
|
||||
if(empty)
|
||||
usr << "<span class='warning'>It is currently empty! Please allow some time for the synthesizer to produce more.</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker/hacked
|
||||
..()
|
||||
name = "cyborg shaker"
|
||||
desc = "Will mix drinks that knock them dead."
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = "threemileislandglass"
|
||||
possible_transfer_amounts = list(5,10,20)
|
||||
charge_cost = 20 //Lots of reagents all regenerating at once, so the charge cost is lower. They also regenerate faster.
|
||||
recharge_time = 3
|
||||
|
||||
reagent_ids = list("beer2")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/peace
|
||||
name = "Peace Hypospray"
|
||||
|
||||
reagent_ids = list("dizzysolution","tiresolution")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/peace/hacked
|
||||
desc = "Everything's peaceful in death!"
|
||||
icon_state = "borghypo_s"
|
||||
reagent_ids = list("dizzysolution","tiresolution","tirizene","sulfonal","sodium_thiopental","cyanide","neurotoxin2")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/epi
|
||||
name = "epinephrine injector"
|
||||
desc = "An advanced chemical synthesizer and injection system, designed to stabilize patients.."
|
||||
reagent_ids = list("epinephrine")
|
||||
@@ -0,0 +1,338 @@
|
||||
//Not to be confused with /obj/item/weapon/reagent_containers/food/drinks/bottle
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle
|
||||
name = "bottle"
|
||||
desc = "A small bottle."
|
||||
icon_state = "bottle"
|
||||
item_state = "atoxinbottle"
|
||||
possible_transfer_amounts = list(5,10,15,25,30)
|
||||
volume = 30
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/New()
|
||||
..()
|
||||
if(!icon_state)
|
||||
icon_state = "bottle"
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/update_icon()
|
||||
overlays.Cut()
|
||||
if(reagents.total_volume)
|
||||
var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]-10")
|
||||
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
if(0 to 9)
|
||||
filling.icon_state = "[icon_state]-10"
|
||||
if(10 to 29)
|
||||
filling.icon_state = "[icon_state]25"
|
||||
if(30 to 49)
|
||||
filling.icon_state = "[icon_state]50"
|
||||
if(50 to 69)
|
||||
filling.icon_state = "[icon_state]75"
|
||||
if(70 to INFINITY)
|
||||
filling.icon_state = "[icon_state]100"
|
||||
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
overlays += filling
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/epinephrine
|
||||
name = "epinephrine bottle"
|
||||
desc = "A small bottle. Contains epinephrine - used to stabilize patients."
|
||||
icon_state = "bottle16"
|
||||
list_reagents = list("epinephrine" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/toxin
|
||||
name = "toxin bottle"
|
||||
desc = "A small bottle of toxins. Do not drink, it is poisonous."
|
||||
icon_state = "bottle12"
|
||||
list_reagents = list("toxin" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/cyanide
|
||||
name = "cyanide bottle"
|
||||
desc = "A small bottle of cyanide. Bitter almonds?"
|
||||
icon_state = "bottle12"
|
||||
list_reagents = list("cyanide" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/morphine
|
||||
name = "morphine bottle"
|
||||
desc = "A small bottle of morphine."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle20"
|
||||
list_reagents = list("morphine" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/chloralhydrate
|
||||
name = "Chloral Hydrate Bottle"
|
||||
desc = "A small bottle of Choral Hydrate. Mickey's Favorite!"
|
||||
icon_state = "bottle20"
|
||||
list_reagents = list("chloralhydrate" = 15)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/charcoal
|
||||
name = "antitoxin bottle"
|
||||
desc = "A small bottle of charcoal."
|
||||
icon_state = "bottle17"
|
||||
list_reagents = list("charcoal" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/mutagen
|
||||
name = "unstable mutagen bottle"
|
||||
desc = "A small bottle of unstable mutagen. Randomly changes the DNA structure of whoever comes in contact."
|
||||
icon_state = "bottle20"
|
||||
list_reagents = list("mutagen" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/plasma
|
||||
name = "liquid plasma bottle"
|
||||
desc = "A small bottle of liquid plasma. Extremely toxic and reacts with micro-organisms inside blood."
|
||||
icon_state = "bottle8"
|
||||
list_reagents = list("plasma" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/synaptizine
|
||||
name = "synaptizine bottle"
|
||||
desc = "A small bottle of synaptizine."
|
||||
icon_state = "bottle20"
|
||||
list_reagents = list("synaptizine" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/ammonia
|
||||
name = "ammonia bottle"
|
||||
desc = "A small bottle of ammonia."
|
||||
icon_state = "bottle20"
|
||||
list_reagents = list("ammonia" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/diethylamine
|
||||
name = "diethylamine bottle"
|
||||
desc = "A small bottle of diethylamine."
|
||||
icon_state = "bottle17"
|
||||
list_reagents = list("diethylamine" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/facid
|
||||
name = "Fluorosulfuric Acid Bottle"
|
||||
desc = "A small bottle. Contains a small amount of Fluorosulfuric Acid"
|
||||
icon_state = "bottle17"
|
||||
list_reagents = list("facid" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/adminordrazine
|
||||
name = "Adminordrazine Bottle"
|
||||
desc = "A small bottle. Contains the liquid essence of the gods."
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = "holyflask"
|
||||
list_reagents = list("adminordrazine" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/capsaicin
|
||||
name = "Capsaicin Bottle"
|
||||
desc = "A small bottle. Contains hot sauce."
|
||||
icon_state = "bottle3"
|
||||
list_reagents = list("capsaicin" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/frostoil
|
||||
name = "Frost Oil Bottle"
|
||||
desc = "A small bottle. Contains cold sauce."
|
||||
icon_state = "bottle17"
|
||||
list_reagents = list("frostoil" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/traitor
|
||||
name = "syndicate bottle"
|
||||
desc = "A small bottle. Contains a random nasty chemical."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle16"
|
||||
var/extra_reagent = null
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/traitor/New()
|
||||
..()
|
||||
extra_reagent = pick("polonium", "histamine", "formaldehyde", "venom", "neurotoxin2", "cyanide")
|
||||
reagents.add_reagent("[extra_reagent]", 3)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/polonium
|
||||
name = "polonium bottle"
|
||||
desc = "A small bottle. Contains Polonium."
|
||||
icon_state = "bottle16"
|
||||
list_reagents = list("polonium" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/venom
|
||||
name = "venom bottle"
|
||||
desc = "A small bottle. Contains Venom."
|
||||
icon_state = "bottle16"
|
||||
list_reagents = list("venom" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/neurotoxin2
|
||||
name = "neurotoxin bottle"
|
||||
desc = "A small bottle. Contains Neurotoxin."
|
||||
icon_state = "bottle16"
|
||||
list_reagents = list("neurotoxin2" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/formaldehyde
|
||||
name = "formaldehyde bottle"
|
||||
desc = "A small bottle. Contains Formaldehyde."
|
||||
icon_state = "bottle16"
|
||||
list_reagents = list("formaldehyde" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/initropidril
|
||||
name = "initropidril bottle"
|
||||
desc = "A small bottle. Contains initropidril."
|
||||
icon_state = "bottle16"
|
||||
list_reagents = list("initropidril" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/pancuronium
|
||||
name = "pancuronium bottle"
|
||||
desc = "A small bottle. Contains pancuronium."
|
||||
icon_state = "bottle16"
|
||||
list_reagents = list("pancuronium" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/sodium_thiopental
|
||||
name = "sodium thiopental bottle"
|
||||
desc = "A small bottle. Contains sodium thiopental."
|
||||
icon_state = "bottle16"
|
||||
list_reagents = list("sodium_thiopental" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/coniine
|
||||
name = "coniine bottle"
|
||||
desc = "A small bottle. Contains coniine."
|
||||
icon_state = "bottle16"
|
||||
list_reagents = list("coniine" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/curare
|
||||
name = "curare bottle"
|
||||
desc = "A small bottle. Contains curare."
|
||||
icon_state = "bottle16"
|
||||
list_reagents = list("curare" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/amanitin
|
||||
name = "amanitin bottle"
|
||||
desc = "A small bottle. Contains amanitin."
|
||||
icon_state = "bottle16"
|
||||
list_reagents = list("amanitin" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/histamine
|
||||
name = "histamine bottle"
|
||||
desc = "A small bottle. Contains Histamine."
|
||||
icon_state = "bottle16"
|
||||
list_reagents = list("histamine" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/diphenhydramine
|
||||
name = "antihistamine bottle"
|
||||
desc = "A small bottle of diphenhydramine."
|
||||
icon_state = "bottle20"
|
||||
list_reagents = list("diphenhydramine" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/potass_iodide
|
||||
name = "anti-radiation bottle"
|
||||
desc = "A small bottle of potassium iodide."
|
||||
icon_state = "bottle11"
|
||||
list_reagents = list("potass_iodide" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/salglu_solution
|
||||
name = "saline-glucose solution bottle"
|
||||
desc = "A small bottle of saline-glucose solution."
|
||||
icon_state = "bottle1"
|
||||
list_reagents = list("salglu_solution" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/atropine
|
||||
name = "atropine bottle"
|
||||
desc = "A small bottle of atropine."
|
||||
icon_state = "bottle12"
|
||||
list_reagents = list("atropine" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/flu_virion
|
||||
name = "Flu virion culture bottle"
|
||||
desc = "A small bottle. Contains H13N1 flu virion culture in synthblood medium."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/advance/flu
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/epiglottis_virion
|
||||
name = "Epiglottis virion culture bottle"
|
||||
desc = "A small bottle. Contains Epiglottis virion culture in synthblood medium."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/advance/voice_change
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/liver_enhance_virion
|
||||
name = "Liver enhancement virion culture bottle"
|
||||
desc = "A small bottle. Contains liver enhancement virion culture in synthblood medium."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/advance/heal
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/hullucigen_virion
|
||||
name = "Hullucigen virion culture bottle"
|
||||
desc = "A small bottle. Contains hullucigen virion culture in synthblood medium."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/advance/hullucigen
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/pierrot_throat
|
||||
name = "Pierrot's Throat culture bottle"
|
||||
desc = "A small bottle. Contains H0NI<42 virion culture in synthblood medium."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/pierrot_throat
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/cold
|
||||
name = "Rhinovirus culture bottle"
|
||||
desc = "A small bottle. Contains XY-rhinovirus culture in synthblood medium."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/advance/cold
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/retrovirus
|
||||
name = "Retrovirus culture bottle"
|
||||
desc = "A small bottle. Contains a retrovirus culture in a synthblood medium."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/dna_retrovirus
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/gbs
|
||||
name = "GBS culture bottle"
|
||||
desc = "A small bottle. Contains Gravitokinetic Bipotential SADS+ culture in synthblood medium."//Or simply - General BullShit
|
||||
icon_state = "bottle3"
|
||||
amount_per_transfer_from_this = 5
|
||||
spawned_disease = /datum/disease/gbs
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/fake_gbs
|
||||
name = "GBS culture bottle"
|
||||
desc = "A small bottle. Contains Gravitokinetic Bipotential SADS- culture in synthblood medium."//Or simply - General BullShit
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/fake_gbs
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/brainrot
|
||||
name = "Brainrot culture bottle"
|
||||
desc = "A small bottle. Contains Cryptococcus Cosmosis culture in synthblood medium."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/brainrot
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/magnitis
|
||||
name = "Magnitis culture bottle"
|
||||
desc = "A small bottle. Contains a small dosage of Fukkos Miracos."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/magnitis
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/wizarditis
|
||||
name = "Wizarditis culture bottle"
|
||||
desc = "A small bottle. Contains a sample of Rincewindus Vulgaris."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/wizarditis
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/anxiety
|
||||
name = "Severe Anxiety culture bottle"
|
||||
desc = "A small bottle. Contains a sample of Lepidopticides."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/anxiety
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/beesease
|
||||
name = "Beesease culture bottle"
|
||||
desc = "A small bottle. Contains a sample of invasive Apidae."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/beesease
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/fluspanish
|
||||
name = "Spanish flu culture bottle"
|
||||
desc = "A small bottle. Contains a sample of Inquisitius."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/fluspanish
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/tuberculosis
|
||||
name = "Fungal Tuberculosis culture bottle"
|
||||
desc = "A small bottle. Contains a sample of Fungal Tubercle bacillus."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/tuberculosis
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/tuberculosiscure
|
||||
name = "BVAK bottle"
|
||||
desc = "A small bottle containing Bio Virus Antidote Kit."
|
||||
icon_state = "bottle5"
|
||||
list_reagents = list("atropine" = 5, "epinephrine" = 5, "salbutamol" = 10, "spaceacillin" = 10)
|
||||
@@ -0,0 +1,95 @@
|
||||
/obj/item/weapon/reagent_containers/dropper
|
||||
name = "dropper"
|
||||
desc = "A dropper. Holds up to 5 units."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "dropper0"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list(1, 2, 3, 4, 5)
|
||||
volume = 5
|
||||
|
||||
/obj/item/weapon/reagent_containers/dropper/afterattack(obj/target, mob/user , proximity)
|
||||
if(!proximity) return
|
||||
if(!target.reagents) return
|
||||
|
||||
if(reagents.total_volume > 0)
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
user << "<span class='notice'>[target] is full.</span>"
|
||||
return
|
||||
|
||||
if(!target.is_open_container() && !ismob(target) && !istype(target,/obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/clothing/mask/cigarette)) //You can inject humans and food but you cant remove the shit.
|
||||
user << "<span class='warning'>You cannot directly fill [target]!</span>"
|
||||
return
|
||||
|
||||
var/trans = 0
|
||||
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
|
||||
|
||||
if(ismob(target))
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/victim = target
|
||||
|
||||
var/obj/item/safe_thing = null
|
||||
if(victim.wear_mask)
|
||||
if(victim.wear_mask.flags_cover & MASKCOVERSEYES)
|
||||
safe_thing = victim.wear_mask
|
||||
if(victim.head)
|
||||
if(victim.head.flags_cover & MASKCOVERSEYES)
|
||||
safe_thing = victim.head
|
||||
if(victim.glasses)
|
||||
if(!safe_thing)
|
||||
safe_thing = victim.glasses
|
||||
|
||||
if(safe_thing)
|
||||
if(!safe_thing.reagents)
|
||||
safe_thing.create_reagents(100)
|
||||
|
||||
reagents.reaction(safe_thing, TOUCH, fraction)
|
||||
trans = reagents.trans_to(safe_thing, amount_per_transfer_from_this)
|
||||
|
||||
target.visible_message("<span class='danger'>[user] tries to squirt something into [target]'s eyes, but fails!</span>", \
|
||||
"<span class='userdanger'>[user] tries to squirt something into [target]'s eyes, but fails!</span>")
|
||||
|
||||
user << "<span class='notice'>You transfer [trans] unit\s of the solution.</span>"
|
||||
update_icon()
|
||||
return
|
||||
else if(isalien(target)) //hiss-hiss has no eyes!
|
||||
target << "<span class='danger'>[target] does not seem to have any eyes!</span>"
|
||||
return
|
||||
|
||||
target.visible_message("<span class='danger'>[user] squirts something into [target]'s eyes!</span>", \
|
||||
"<span class='userdanger'>[user] squirts something into [target]'s eyes!</span>")
|
||||
|
||||
reagents.reaction(target, TOUCH, fraction)
|
||||
var/mob/M = target
|
||||
var/R
|
||||
if(reagents)
|
||||
for(var/datum/reagent/A in src.reagents.reagent_list)
|
||||
R += A.id + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
add_logs(user, M, "squirted", R)
|
||||
|
||||
trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "<span class='notice'>You transfer [trans] unit\s of the solution.</span>"
|
||||
update_icon()
|
||||
|
||||
else
|
||||
|
||||
if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers))
|
||||
user << "<span class='notice'>You cannot directly remove reagents from [target].</span>"
|
||||
return
|
||||
|
||||
if(!target.reagents.total_volume)
|
||||
user << "<span class='warning'>[target] is empty!</span>"
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
|
||||
user << "<span class='notice'>You fill [src] with [trans] unit\s of the solution.</span>"
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/dropper/update_icon()
|
||||
cut_overlays()
|
||||
if(reagents.total_volume)
|
||||
var/image/filling = image('icons/obj/reagentfillings.dmi', src, "dropper")
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
@@ -0,0 +1,273 @@
|
||||
/obj/item/weapon/reagent_containers/glass
|
||||
name = "glass"
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5, 10, 15, 20, 25, 30, 50)
|
||||
volume = 50
|
||||
flags = OPENCONTAINER
|
||||
spillable = 1
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/attack(mob/M, mob/user, obj/target)
|
||||
if(!canconsume(M, user))
|
||||
return
|
||||
|
||||
if(!spillable)
|
||||
return
|
||||
|
||||
if(!reagents || !reagents.total_volume)
|
||||
user << "<span class='warning'>[src] is empty!</span>"
|
||||
return
|
||||
|
||||
if(istype(M))
|
||||
if(user.a_intent == "harm")
|
||||
var/R
|
||||
M.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [M]!</span>", \
|
||||
"<span class='userdanger'>[user] splashes the contents of [src] onto [M]!</span>")
|
||||
if(reagents)
|
||||
for(var/datum/reagent/A in reagents.reagent_list)
|
||||
R += A.id + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
reagents.reaction(M, TOUCH)
|
||||
add_logs(user, M, "splashed", R)
|
||||
reagents.clear_reagents()
|
||||
else
|
||||
if(M != user)
|
||||
M.visible_message("<span class='danger'>[user] attempts to feed something to [M].</span>", \
|
||||
"<span class='userdanger'>[user] attempts to feed something to you.</span>")
|
||||
if(!do_mob(user, M))
|
||||
return
|
||||
if(!reagents || !reagents.total_volume)
|
||||
return // The drink might be empty after the delay, such as by spam-feeding
|
||||
M.visible_message("<span class='danger'>[user] feeds something to [M].</span>", "<span class='userdanger'>[user] feeds something to you.</span>")
|
||||
add_logs(user, M, "fed", reagentlist(src))
|
||||
else
|
||||
user << "<span class='notice'>You swallow a gulp of [src].</span>"
|
||||
var/fraction = min(5/reagents.total_volume, 1)
|
||||
reagents.reaction(M, INGEST, fraction)
|
||||
spawn(5)
|
||||
reagents.trans_to(M, 5)
|
||||
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/afterattack(obj/target, mob/user, proximity)
|
||||
if((!proximity) || !check_allowed_items(target,target_self=1)) return
|
||||
|
||||
else if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
|
||||
|
||||
if(target.reagents && !target.reagents.total_volume)
|
||||
user << "<span class='warning'>[target] is empty and can't be refilled!</span>"
|
||||
return
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
user << "<span class='notice'>[src] is full.</span>"
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
user << "<span class='notice'>You fill [src] with [trans] unit\s of the contents of [target].</span>"
|
||||
|
||||
else if(target.is_open_container() && target.reagents) //Something like a glass. Player probably wants to transfer TO it.
|
||||
if(!reagents.total_volume)
|
||||
user << "<span class='warning'>[src] is empty!</span>"
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
user << "<span class='notice'>[target] is full.</span>"
|
||||
return
|
||||
|
||||
|
||||
var/trans = reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "<span class='notice'>You transfer [trans] unit\s of the solution to [target].</span>"
|
||||
|
||||
else if(reagents.total_volume)
|
||||
if(user.a_intent == "harm")
|
||||
user.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [target]!</span>", \
|
||||
"<span class='notice'>You splash the contents of [src] onto [target].</span>")
|
||||
reagents.reaction(target, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/attackby(obj/item/I, mob/user, params)
|
||||
var/hotness = I.is_hot()
|
||||
if(hotness)
|
||||
var/added_heat = (hotness / 100) //ishot returns a temperature
|
||||
if(reagents)
|
||||
if(reagents.chem_temp < hotness) //can't be heated to be hotter than the source
|
||||
reagents.chem_temp += added_heat
|
||||
user << "<span class='notice'>You heat [src] with [I].</span>"
|
||||
reagents.handle_reactions()
|
||||
else
|
||||
user << "<span class='warning'>[src] is already hotter than [I]!</span>"
|
||||
|
||||
if(istype(I,/obj/item/weapon/reagent_containers/food/snacks/egg)) //breaking eggs
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/egg/E = I
|
||||
if(reagents)
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
user << "<span class='notice'>[src] is full.</span>"
|
||||
else
|
||||
user << "<span class='notice'>You break [E] in [src].</span>"
|
||||
reagents.add_reagent("eggyolk", 5)
|
||||
qdel(E)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker
|
||||
name = "beaker"
|
||||
desc = "A beaker. It can hold up to 50 units."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "beaker"
|
||||
item_state = "beaker"
|
||||
materials = list(MAT_GLASS=500)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
if(reagents.total_volume)
|
||||
var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]10")
|
||||
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
if(0 to 9)
|
||||
filling.icon_state = "[icon_state]-10"
|
||||
if(10 to 24)
|
||||
filling.icon_state = "[icon_state]10"
|
||||
if(25 to 49)
|
||||
filling.icon_state = "[icon_state]25"
|
||||
if(50 to 74)
|
||||
filling.icon_state = "[icon_state]50"
|
||||
if(75 to 79)
|
||||
filling.icon_state = "[icon_state]75"
|
||||
if(80 to 90)
|
||||
filling.icon_state = "[icon_state]80"
|
||||
if(91 to INFINITY)
|
||||
filling.icon_state = "[icon_state]100"
|
||||
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large
|
||||
name = "large beaker"
|
||||
desc = "A large beaker. Can hold up to 100 units."
|
||||
icon_state = "beakerlarge"
|
||||
materials = list(MAT_GLASS=2500)
|
||||
volume = 100
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100)
|
||||
flags = OPENCONTAINER
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/noreact
|
||||
name = "cryostasis beaker"
|
||||
desc = "A cryostasis beaker that allows for chemical storage without \
|
||||
reactions. Can hold up to 50 units."
|
||||
icon_state = "beakernoreact"
|
||||
materials = list(MAT_METAL=3000)
|
||||
volume = 50
|
||||
amount_per_transfer_from_this = 10
|
||||
origin_tech = "materials=2;engineering=3;plasmatech=3"
|
||||
flags = OPENCONTAINER
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/noreact/New()
|
||||
..()
|
||||
reagents.set_reacting(FALSE)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/bluespace
|
||||
name = "bluespace beaker"
|
||||
desc = "A bluespace beaker, powered by experimental bluespace technology \
|
||||
and Element Cuban combined with the Compound Pete. Can hold up to \
|
||||
300 units."
|
||||
icon_state = "beakerbluespace"
|
||||
materials = list(MAT_GLASS=3000)
|
||||
volume = 300
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100,300)
|
||||
flags = OPENCONTAINER
|
||||
origin_tech = "bluespace=5;materials=4;plasmatech=4"
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/cryoxadone
|
||||
list_reagents = list("cryoxadone" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/sulphuric
|
||||
list_reagents = list("sacid" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/slime
|
||||
list_reagents = list("slimejelly" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large/styptic
|
||||
name = "styptic reserve tank"
|
||||
list_reagents = list("styptic_powder" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large/silver_sulfadiazine
|
||||
name = "silver sulfadiazine reserve tank"
|
||||
list_reagents = list("silver_sulfadiazine" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large/charcoal
|
||||
name = "antitoxin reserve tank"
|
||||
list_reagents = list("charcoal" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large/epinephrine
|
||||
name = "epinephrine reserve tank"
|
||||
list_reagents = list("epinephrine" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bucket
|
||||
name = "bucket"
|
||||
desc = "It's a bucket."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "bucket"
|
||||
item_state = "bucket"
|
||||
materials = list(MAT_METAL=200)
|
||||
w_class = 3
|
||||
amount_per_transfer_from_this = 20
|
||||
possible_transfer_amounts = list(10,15,20,25,30,50,70)
|
||||
volume = 70
|
||||
flags = OPENCONTAINER
|
||||
flags_inv = HIDEHAIR
|
||||
slot_flags = SLOT_HEAD
|
||||
armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) //Weak melee protection, because you can wear it on your head
|
||||
slot_equipment_priority = list( \
|
||||
slot_back, slot_wear_id,\
|
||||
slot_w_uniform, slot_wear_suit,\
|
||||
slot_wear_mask, slot_head,\
|
||||
slot_shoes, slot_gloves,\
|
||||
slot_ears, slot_glasses,\
|
||||
slot_belt, slot_s_store,\
|
||||
slot_l_store, slot_r_store,\
|
||||
slot_drone_storage
|
||||
)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bucket/attackby(obj/O, mob/user, params)
|
||||
if(istype(O, /obj/item/weapon/mop))
|
||||
if(reagents.total_volume < 1)
|
||||
user << "<span class='warning'>[src] is out of water!</span>"
|
||||
else
|
||||
reagents.trans_to(O, 5)
|
||||
user << "<span class='notice'>You wet [O] in [src].</span>"
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
else if(isprox(O))
|
||||
user << "<span class='notice'>You add [O] to [src].</span>"
|
||||
qdel(O)
|
||||
user.unEquip(src)
|
||||
qdel(src)
|
||||
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bucket/equipped(mob/user, slot)
|
||||
..()
|
||||
if(slot == slot_head && reagents.total_volume)
|
||||
user << "<span class='userdanger'>[src]'s contents spill all over you!</span>"
|
||||
reagents.reaction(user, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bucket/equip_to_best_slot(var/mob/M)
|
||||
if(reagents.total_volume) //If there is water in a bucket, don't quick equip it to the head
|
||||
var/index = slot_equipment_priority.Find(slot_head)
|
||||
slot_equipment_priority.Remove(slot_head)
|
||||
. = ..()
|
||||
slot_equipment_priority.Insert(index, slot_head)
|
||||
return
|
||||
return ..()
|
||||
@@ -0,0 +1,143 @@
|
||||
/obj/item/weapon/reagent_containers/hypospray
|
||||
name = "hypospray"
|
||||
desc = "The DeForest Medical Corporation hypospray is a sterile, air-needle autoinjector for rapid administration of drugs to patients."
|
||||
icon = 'icons/obj/syringe.dmi'
|
||||
item_state = "hypo"
|
||||
icon_state = "hypo"
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = list()
|
||||
flags = OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
var/ignore_flags = 0
|
||||
var/infinite = FALSE
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/attack(mob/living/M, mob/user)
|
||||
if(!reagents.total_volume)
|
||||
user << "<span class='warning'>[src] is empty!</span>"
|
||||
return
|
||||
if(!iscarbon(M))
|
||||
return
|
||||
|
||||
if(reagents.total_volume && (ignore_flags || M.can_inject(user, 1))) // Ignore flag should be checked first or there will be an error message.
|
||||
M << "<span class='warning'>You feel a tiny prick!</span>"
|
||||
user << "<span class='notice'>You inject [M] with [src].</span>"
|
||||
|
||||
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
|
||||
reagents.reaction(M, INJECT, fraction)
|
||||
if(M.reagents)
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/trans = 0
|
||||
if(!infinite)
|
||||
trans = reagents.trans_to(M, amount_per_transfer_from_this)
|
||||
else
|
||||
trans = reagents.copy_to(M, amount_per_transfer_from_this)
|
||||
|
||||
user << "<span class='notice'>[trans] unit\s injected. [reagents.total_volume] unit\s remaining in [src].</span>"
|
||||
|
||||
var/contained = english_list(injected)
|
||||
|
||||
add_logs(user, M, "injected", src, "([contained])")
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/CMO
|
||||
list_reagents = list("omnizine" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/combat
|
||||
name = "combat stimulant injector"
|
||||
desc = "A modified air-needle autoinjector, used by support operatives to quickly heal injuries in combat."
|
||||
amount_per_transfer_from_this = 10
|
||||
icon_state = "combat_hypo"
|
||||
volume = 90
|
||||
ignore_flags = 1 // So they can heal their comrades.
|
||||
list_reagents = list("epinephrine" = 30, "omnizine" = 30, "leporazine" = 15, "atropine" = 15)
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/combat/nanites
|
||||
desc = "A modified air-needle autoinjector for use in combat situations. Prefilled with expensive medical nanites for rapid healing."
|
||||
volume = 100
|
||||
list_reagents = list("nanites" = 80, "synaptizine" = 20)
|
||||
|
||||
//MediPens
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/medipen
|
||||
name = "epinephrine medipen"
|
||||
desc = "A rapid and safe way to stabilize patients in critical condition for personnel without advanced medical knowledge."
|
||||
icon_state = "medipen"
|
||||
item_state = "medipen"
|
||||
amount_per_transfer_from_this = 10
|
||||
volume = 10
|
||||
ignore_flags = 1 //so you can medipen through hardsuits
|
||||
flags = null
|
||||
list_reagents = list("epinephrine" = 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/medipen/attack(mob/M, mob/user)
|
||||
if(!reagents.total_volume)
|
||||
user << "<span class='warning'>[src] is empty!</span>"
|
||||
return
|
||||
..()
|
||||
update_icon()
|
||||
spawn(80)
|
||||
if(isrobot(user) && !reagents.total_volume)
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.cell.use(100))
|
||||
reagents.add_reagent_list(list_reagents)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/medipen/update_icon()
|
||||
if(reagents.total_volume > 0)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]0"
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/medipen/examine()
|
||||
..()
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
usr << "<span class='notice'>It is currently loaded.</span>"
|
||||
else
|
||||
usr << "<span class='notice'>It is spent.</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/medipen/stimpack //goliath kiting
|
||||
name = "stimpack medipen"
|
||||
desc = "A rapid way to stimulate your body's adrenaline, allowing for freer movement in restrictive armor."
|
||||
icon_state = "stimpen"
|
||||
volume = 20
|
||||
amount_per_transfer_from_this = 20
|
||||
list_reagents = list("ephedrine" = 10, "coffee" = 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/medipen/stimpack/traitor
|
||||
desc = "A modified stimulants autoinjector for use in combat situations. Has a mild healing effect."
|
||||
list_reagents = list("stimulants" = 10, "omnizine" = 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/medipen/morphine
|
||||
name = "morphine medipen"
|
||||
desc = "A rapid way to get you out of a tight situation and fast! You'll feel rather drowsy, though."
|
||||
list_reagents = list("morphine" = 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/medipen/tuberculosiscure
|
||||
name = "BVAK autoinjector"
|
||||
desc = "Bio Virus Antidote Kit autoinjector. Has a two use system for yourself, and someone else. Inject when infected."
|
||||
icon_state = "stimpen"
|
||||
volume = 60
|
||||
amount_per_transfer_from_this = 30
|
||||
list_reagents = list("atropine" = 10, "epinephrine" = 10, "salbutamol" = 20, "spaceacillin" = 20)
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/medipen/survival
|
||||
name = "survival medipen"
|
||||
desc = "A medipen for surviving in the harshest of environments, heals and protects from environmental hazards. "
|
||||
icon_state = "stimpen"
|
||||
volume = 82
|
||||
amount_per_transfer_from_this = 82
|
||||
list_reagents = list("nanites" = 2, "salbutamol" = 10, "coffee" = 20, "leporazine" = 20, "tricordrazine" = 15, "epinephrine" = 10, "omnizine" = 5, "stimulants" = 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/medipen/species_mutator
|
||||
name = "species mutator medipen"
|
||||
desc = "Embark on a whirlwind tour of racial insensitivity by \
|
||||
literally appropriating other races."
|
||||
volume = 1
|
||||
amount_per_transfer_from_this = 1
|
||||
list_reagents = list("unstablemutationtoxin" = 1)
|
||||
@@ -0,0 +1,31 @@
|
||||
/obj/item/weapon/reagent_containers/pill/patch
|
||||
name = "chemical patch"
|
||||
desc = "A chemical patch for touch based applications."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bandaid"
|
||||
item_state = "bandaid"
|
||||
possible_transfer_amounts = list()
|
||||
volume = 40
|
||||
apply_type = PATCH
|
||||
apply_method = "apply"
|
||||
self_delay = 30 // three seconds
|
||||
|
||||
/obj/item/weapon/reagent_containers/pill/patch/afterattack(obj/target, mob/user , proximity)
|
||||
return // thanks inheritance again
|
||||
|
||||
/obj/item/weapon/reagent_containers/pill/patch/canconsume(mob/eater, mob/user)
|
||||
if(!iscarbon(eater))
|
||||
return 0
|
||||
return 1 // Masks were stopping people from "eating" patches. Thanks, inheritance.
|
||||
|
||||
/obj/item/weapon/reagent_containers/pill/patch/styptic
|
||||
name = "brute patch"
|
||||
desc = "Helps with brute injuries."
|
||||
list_reagents = list("styptic_powder" = 20)
|
||||
icon_state = "bandaid_brute"
|
||||
|
||||
/obj/item/weapon/reagent_containers/pill/patch/silver_sulf
|
||||
name = "burn patch"
|
||||
desc = "Helps with burn injuries."
|
||||
list_reagents = list("silver_sulfadiazine" = 20)
|
||||
icon_state = "bandaid_burn"
|
||||
@@ -0,0 +1,152 @@
|
||||
/obj/item/weapon/reagent_containers/pill
|
||||
name = "pill"
|
||||
desc = "A tablet or capsule."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "pill"
|
||||
item_state = "pill"
|
||||
possible_transfer_amounts = list()
|
||||
volume = 50
|
||||
var/apply_type = INGEST
|
||||
var/apply_method = "swallow"
|
||||
var/roundstart = 0
|
||||
var/self_delay = 0 //pills are instant, this is because patches inheret their aplication from pills
|
||||
|
||||
/obj/item/weapon/reagent_containers/pill/New()
|
||||
..()
|
||||
if(!icon_state)
|
||||
icon_state = "pill[rand(1,20)]"
|
||||
if(reagents.total_volume && roundstart)
|
||||
name += " ([reagents.total_volume]u)"
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/pill/attack_self(mob/user)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/pill/attack(mob/M, mob/user, def_zone, self_delay)
|
||||
if(!canconsume(M, user))
|
||||
return 0
|
||||
|
||||
if(M == user)
|
||||
M.visible_message("<span class='notice'>[user] attempts to [apply_method] [src].</span>")
|
||||
if(self_delay)
|
||||
if(!do_mob(user, M, self_delay))
|
||||
return 0
|
||||
M << "<span class='notice'>You [apply_method] [src].</span>"
|
||||
|
||||
else
|
||||
M.visible_message("<span class='danger'>[user] attempts to force [M] to [apply_method] [src].</span>", \
|
||||
"<span class='userdanger'>[user] attempts to force [M] to [apply_method] [src].</span>")
|
||||
if(!do_mob(user, M))
|
||||
return 0
|
||||
M.visible_message("<span class='danger'>[user] forces [M] to [apply_method] [src].</span>", \
|
||||
"<span class='userdanger'>[user] forces [M] to [apply_method] [src].</span>")
|
||||
|
||||
|
||||
user.unEquip(src) //icon update
|
||||
add_logs(user, M, "fed", reagentlist(src))
|
||||
loc = M //Put the pill inside the mob. This fixes the issue where the pill appears to drop to the ground after someone eats it.
|
||||
|
||||
if(reagents.total_volume)
|
||||
reagents.reaction(M, apply_type)
|
||||
reagents.trans_to(M, reagents.total_volume)
|
||||
qdel(src)
|
||||
return 1
|
||||
else
|
||||
qdel(src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/pill/afterattack(obj/target, mob/user , proximity)
|
||||
if(!proximity) return
|
||||
if(target.is_open_container() != 0 && target.reagents)
|
||||
if(!target.reagents.total_volume)
|
||||
user << "<span class='warning'>[target] is empty! There's nothing to dissolve [src] in.</span>"
|
||||
return
|
||||
user << "<span class='notice'>You dissolve [src] in [target].</span>"
|
||||
for(var/mob/O in viewers(2, user)) //viewers is necessary here because of the small radius
|
||||
O << "<span class='warning'>[user] slips something into [target]!</span>"
|
||||
reagents.trans_to(target, reagents.total_volume)
|
||||
spawn(5)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/reagent_containers/pill/tox
|
||||
name = "toxins pill"
|
||||
desc = "Highly toxic."
|
||||
icon_state = "pill5"
|
||||
list_reagents = list("toxin" = 50)
|
||||
roundstart = 1
|
||||
/obj/item/weapon/reagent_containers/pill/cyanide
|
||||
name = "cyanide pill"
|
||||
desc = "Don't swallow this."
|
||||
icon_state = "pill5"
|
||||
list_reagents = list("cyanide" = 50)
|
||||
roundstart = 1
|
||||
/obj/item/weapon/reagent_containers/pill/adminordrazine
|
||||
name = "adminordrazine pill"
|
||||
desc = "It's magic. We don't have to explain it."
|
||||
icon_state = "pill16"
|
||||
list_reagents = list("adminordrazine" = 50)
|
||||
roundstart = 1
|
||||
/obj/item/weapon/reagent_containers/pill/morphine
|
||||
name = "morphine pill"
|
||||
desc = "Commonly used to treat insomnia."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("morphine" = 30)
|
||||
roundstart = 1
|
||||
/obj/item/weapon/reagent_containers/pill/stimulant
|
||||
name = "stimulant pill"
|
||||
desc = "Often taken by overworked employees, athletes, and the inebriated. You'll snap to attention immediately!"
|
||||
icon_state = "pill19"
|
||||
list_reagents = list("ephedrine" = 10, "antihol" = 10, "coffee" = 30)
|
||||
roundstart = 1
|
||||
/obj/item/weapon/reagent_containers/pill/salbutamol
|
||||
name = "salbutamol pill"
|
||||
desc = "Used to treat oxygen deprivation."
|
||||
icon_state = "pill16"
|
||||
list_reagents = list("salbutamol" = 30)
|
||||
roundstart = 1
|
||||
/obj/item/weapon/reagent_containers/pill/charcoal
|
||||
name = "antitoxin pill"
|
||||
desc = "Neutralizes many common toxins."
|
||||
icon_state = "pill17"
|
||||
list_reagents = list("charcoal" = 50)
|
||||
roundstart = 1
|
||||
/obj/item/weapon/reagent_containers/pill/epinephrine
|
||||
name = "epinephrine pill"
|
||||
desc = "Used to stabilize patients."
|
||||
icon_state = "pill5"
|
||||
list_reagents = list("epinephrine" = 15)
|
||||
roundstart = 1
|
||||
/obj/item/weapon/reagent_containers/pill/mannitol
|
||||
name = "mannitol pill"
|
||||
desc = "Used to treat brain damage."
|
||||
icon_state = "pill17"
|
||||
list_reagents = list("mannitol" = 50)
|
||||
roundstart = 1
|
||||
/obj/item/weapon/reagent_containers/pill/mutadone
|
||||
name = "mutadone pill"
|
||||
desc = "Used to treat genetic damage."
|
||||
icon_state = "pill20"
|
||||
list_reagents = list("mutadone" = 50)
|
||||
roundstart = 1
|
||||
/obj/item/weapon/reagent_containers/pill/salicyclic
|
||||
name = "salicylic acid pill"
|
||||
desc = "Used to dull pain."
|
||||
icon_state = "pill9"
|
||||
list_reagents = list("sal_acid" = 24)
|
||||
roundstart = 1
|
||||
/obj/item/weapon/reagent_containers/pill/oxandrolone
|
||||
name = "oxandrolone pill"
|
||||
desc = "Used to stimulate burn healing."
|
||||
icon_state = "pill11"
|
||||
list_reagents = list("oxandrolone" = 24)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/pill/insulin
|
||||
name = "insulin pill"
|
||||
desc = "Handles hyperglycaemic coma."
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("insulin" = 50)
|
||||
roundstart = 1
|
||||
@@ -0,0 +1,213 @@
|
||||
/obj/item/weapon/reagent_containers/spray
|
||||
name = "spray bottle"
|
||||
desc = "A spray bottle, with an unscrewable top."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "cleaner"
|
||||
item_state = "cleaner"
|
||||
flags = OPENCONTAINER | NOBLUDGEON
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = 2
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/stream_mode = 0 //whether we use the more focused mode
|
||||
var/current_range = 3 //the range of tiles the sprayer will reach.
|
||||
var/spray_range = 3 //the range of tiles the sprayer will reach when in spray mode.
|
||||
var/stream_range = 1 //the range of tiles the sprayer will reach when in stream mode.
|
||||
var/stream_amount = 10 //the amount of reagents transfered when in stream mode.
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 250
|
||||
possible_transfer_amounts = list()
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/afterattack(atom/A as mob|obj, mob/user)
|
||||
if(istype(A, /obj/item/weapon/reagent_containers) || istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart) || istype(A, /obj/machinery/hydroponics))
|
||||
return
|
||||
|
||||
if(istype(A, /obj/structure/reagent_dispensers) && get_dist(src,A) <= 1) //this block copypasted from reagent_containers/glass, for lack of a better solution
|
||||
if(!A.reagents.total_volume && A.reagents)
|
||||
user << "<span class='notice'>\The [A] is empty.</span>"
|
||||
return
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
user << "<span class='notice'>\The [src] is full.</span>"
|
||||
return
|
||||
|
||||
var/trans = A.reagents.trans_to(src, 50) //transfer 50u , using the spray's transfer amount would take too long to refill
|
||||
user << "<span class='notice'>You fill \the [src] with [trans] units of the contents of \the [A].</span>"
|
||||
return
|
||||
|
||||
if(reagents.total_volume < amount_per_transfer_from_this)
|
||||
user << "<span class='warning'>\The [src] is empty!</span>"
|
||||
return
|
||||
|
||||
spray(A)
|
||||
|
||||
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
|
||||
user.changeNext_move(CLICK_CD_RANGE*2)
|
||||
user.newtonian_move(get_dir(A, user))
|
||||
var/turf/T = get_turf(src)
|
||||
if(reagents.has_reagent("sacid"))
|
||||
message_admins("[key_name_admin(user)] fired sulphuric acid from \a [src] at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[get_area(src)] ([T.x], [T.y], [T.z])</a>).")
|
||||
log_game("[key_name(user)] fired sulphuric acid from \a [src] at [get_area(src)] ([T.x], [T.y], [T.z]).")
|
||||
if(reagents.has_reagent("facid"))
|
||||
message_admins("[key_name_admin(user)] fired Fluacid from \a [src] at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[get_area(src)] ([T.x], [T.y], [T.z])</a>).")
|
||||
log_game("[key_name(user)] fired Fluacid from \a [src] at [get_area(src)] ([T.x], [T.y], [T.z]).")
|
||||
if(reagents.has_reagent("lube"))
|
||||
message_admins("[key_name_admin(user)] fired Space lube from \a [src] at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[get_area(src)] ([T.x], [T.y], [T.z])</a>).")
|
||||
log_game("[key_name(user)] fired Space lube from \a [src] at [get_area(src)] ([T.x], [T.y], [T.z]).")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/proc/spray(atom/A)
|
||||
var/range = max(min(spray_range, get_dist(src, A)), 1)
|
||||
var/obj/effect/decal/chempuff/D = new /obj/effect/decal/chempuff(get_turf(src))
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
var/puff_reagent_left = range //how many turf, mob or dense objet we can react with before we consider the chem puff consumed
|
||||
if(stream_mode)
|
||||
reagents.trans_to(D, amount_per_transfer_from_this)
|
||||
puff_reagent_left = 1
|
||||
else
|
||||
reagents.trans_to(D, amount_per_transfer_from_this, 1/range)
|
||||
D.color = mix_color_from_reagents(D.reagents.reagent_list)
|
||||
var/wait_step = max(round(2+3/range), 2)
|
||||
spawn(0)
|
||||
var/range_left = range
|
||||
for(var/i=0, i<range, i++)
|
||||
range_left--
|
||||
step_towards(D,A)
|
||||
sleep(wait_step)
|
||||
|
||||
for(var/atom/T in get_turf(D))
|
||||
if(T == D || T.invisibility) //we ignore the puff itself and stuff below the floor
|
||||
continue
|
||||
if(puff_reagent_left <= 0)
|
||||
break
|
||||
|
||||
if(stream_mode)
|
||||
if(ismob(T))
|
||||
var/mob/M = T
|
||||
if(!M.lying || !range_left)
|
||||
D.reagents.reaction(M, VAPOR)
|
||||
puff_reagent_left -= 1
|
||||
else if(!range_left)
|
||||
D.reagents.reaction(T, VAPOR)
|
||||
else
|
||||
D.reagents.reaction(T, VAPOR)
|
||||
if(ismob(T))
|
||||
puff_reagent_left -= 1
|
||||
|
||||
if(puff_reagent_left > 0 && (!stream_mode || !range_left))
|
||||
D.reagents.reaction(get_turf(D), VAPOR)
|
||||
puff_reagent_left -= 1
|
||||
|
||||
if(puff_reagent_left <= 0) // we used all the puff so we delete it.
|
||||
qdel(D)
|
||||
return
|
||||
qdel(D)
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/attack_self(mob/user)
|
||||
stream_mode = !stream_mode
|
||||
if(stream_mode)
|
||||
amount_per_transfer_from_this = stream_amount
|
||||
current_range = stream_range
|
||||
else
|
||||
amount_per_transfer_from_this = initial(amount_per_transfer_from_this)
|
||||
current_range = spray_range
|
||||
user << "<span class='notice'>You switch the nozzle setting to [stream_mode ? "\"stream\"":"\"spray\""]. You'll now use [amount_per_transfer_from_this] units per use.</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/verb/empty()
|
||||
|
||||
set name = "Empty Spray Bottle"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
if (alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", "Yes", "No") != "Yes")
|
||||
return
|
||||
if(isturf(usr.loc) && src.loc == usr)
|
||||
usr << "<span class='notice'>You empty \the [src] onto the floor.</span>"
|
||||
reagents.reaction(usr.loc)
|
||||
src.reagents.clear_reagents()
|
||||
|
||||
//space cleaner
|
||||
/obj/item/weapon/reagent_containers/spray/cleaner
|
||||
name = "space cleaner"
|
||||
desc = "BLAM!-brand non-foaming space cleaner!"
|
||||
list_reagents = list("cleaner" = 250)
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/spraytan
|
||||
name = "spray tan"
|
||||
volume = 50
|
||||
desc = "Gyaro brand spray tan. Do not spray near eyes or other orifices."
|
||||
list_reagents = list("spraytan" = 50)
|
||||
|
||||
|
||||
//pepperspray
|
||||
/obj/item/weapon/reagent_containers/spray/pepper
|
||||
name = "pepperspray"
|
||||
desc = "Manufactured by UhangInc, used to blind and down an opponent quickly."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "pepperspray"
|
||||
item_state = "pepperspray"
|
||||
volume = 40
|
||||
stream_range = 4
|
||||
amount_per_transfer_from_this = 5
|
||||
list_reagents = list("condensedcapsaicin" = 40)
|
||||
|
||||
//water flower
|
||||
/obj/item/weapon/reagent_containers/spray/waterflower
|
||||
name = "water flower"
|
||||
desc = "A seemingly innocent sunflower...with a twist."
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "sunflower"
|
||||
item_state = "sunflower"
|
||||
amount_per_transfer_from_this = 1
|
||||
volume = 10
|
||||
list_reagents = list("water" = 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/waterflower/attack_self(mob/user) //Don't allow changing how much the flower sprays
|
||||
return
|
||||
|
||||
//chemsprayer
|
||||
/obj/item/weapon/reagent_containers/spray/chemsprayer
|
||||
name = "chem sprayer"
|
||||
desc = "A utility used to spray large amounts of reagents in a given area."
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
icon_state = "chemsprayer"
|
||||
item_state = "chemsprayer"
|
||||
throwforce = 0
|
||||
w_class = 3
|
||||
stream_mode = 1
|
||||
current_range = 7
|
||||
spray_range = 4
|
||||
stream_range = 7
|
||||
amount_per_transfer_from_this = 10
|
||||
volume = 600
|
||||
origin_tech = "combat=3;materials=3;engineering=3"
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/chemsprayer/spray(atom/A)
|
||||
var/direction = get_dir(src, A)
|
||||
var/turf/T = get_turf(A)
|
||||
var/turf/T1 = get_step(T,turn(direction, 90))
|
||||
var/turf/T2 = get_step(T,turn(direction, -90))
|
||||
var/list/the_targets = list(T,T1,T2)
|
||||
|
||||
for(var/i=1, i<=3, i++) // intialize sprays
|
||||
if(reagents.total_volume < 1)
|
||||
return
|
||||
..(the_targets[i])
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/chemsprayer/bioterror
|
||||
list_reagents = list("sodium_thiopental" = 100, "coniine" = 100, "venom" = 100, "condensedcapsaicin" = 100, "initropidril" = 100, "polonium" = 100)
|
||||
|
||||
// Plant-B-Gone
|
||||
/obj/item/weapon/reagent_containers/spray/plantbgone // -- Skie
|
||||
name = "Plant-B-Gone"
|
||||
desc = "Kills those pesky weeds!"
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "plantbgone"
|
||||
item_state = "plantbgone"
|
||||
volume = 100
|
||||
list_reagents = list("plantbgone" = 100)
|
||||
@@ -0,0 +1,246 @@
|
||||
#define SYRINGE_DRAW 0
|
||||
#define SYRINGE_INJECT 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe
|
||||
name = "syringe"
|
||||
desc = "A syringe that can hold up to 15 units."
|
||||
icon = 'icons/obj/syringe.dmi'
|
||||
item_state = "syringe_0"
|
||||
icon_state = "0"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list()
|
||||
volume = 15
|
||||
var/mode = SYRINGE_DRAW
|
||||
var/busy = 0 // needed for delayed drawing of blood
|
||||
var/projectile_type = /obj/item/projectile/bullet/dart/syringe
|
||||
materials = list(MAT_METAL=10, MAT_GLASS=20)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/New()
|
||||
..()
|
||||
if(list_reagents) //syringe starts in inject mode if its already got something inside
|
||||
mode = SYRINGE_INJECT
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/pickup(mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/dropped(mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/attack_self(mob/user)
|
||||
mode = !mode
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/attack_hand()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/attack_paw()
|
||||
return attack_hand()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/attackby(obj/item/I, mob/user, params)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/afterattack(atom/target, mob/user , proximity)
|
||||
if(busy)
|
||||
return
|
||||
if(!proximity)
|
||||
return
|
||||
if(!target.reagents)
|
||||
return
|
||||
|
||||
var/mob/living/L
|
||||
if(isliving(target))
|
||||
L = target
|
||||
if(!L.can_inject(user, 1))
|
||||
return
|
||||
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
user << "<span class='notice'>The syringe is full.</span>"
|
||||
return
|
||||
|
||||
if(L) //living mob
|
||||
var/drawn_amount = reagents.maximum_volume - reagents.total_volume
|
||||
if(target != user)
|
||||
target.visible_message("<span class='danger'>[user] is trying to take a blood sample from [target]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to take a blood sample from [target]!</span>")
|
||||
busy = 1
|
||||
if(!do_mob(user, target))
|
||||
busy = 0
|
||||
return
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
return
|
||||
busy = 0
|
||||
if(L.transfer_blood_to(src, drawn_amount))
|
||||
user.visible_message("[user] takes a blood sample from [L].")
|
||||
else
|
||||
user << "<span class='warning'>You are unable to draw any blood from [L]!</span>"
|
||||
|
||||
else //if not mob
|
||||
if(!target.reagents.total_volume)
|
||||
user << "<span class='warning'>[target] is empty!</span>"
|
||||
return
|
||||
|
||||
if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers) && !istype(target,/obj/item/slime_extract))
|
||||
user << "<span class='warning'>You cannot directly remove reagents from [target]!</span>"
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) // transfer from, transfer to - who cares?
|
||||
|
||||
user << "<span class='notice'>You fill [src] with [trans] units of the solution.</span>"
|
||||
if (reagents.total_volume >= reagents.maximum_volume)
|
||||
mode=!mode
|
||||
update_icon()
|
||||
|
||||
if(SYRINGE_INJECT)
|
||||
if(!reagents.total_volume)
|
||||
user << "<span class='notice'>[src] is empty.</span>"
|
||||
return
|
||||
|
||||
if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/slime_extract) && !istype(target, /obj/item/clothing/mask/cigarette) && !istype(target, /obj/item/weapon/storage/fancy/cigarettes))
|
||||
user << "<span class='warning'>You cannot directly fill [target]!</span>"
|
||||
return
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
user << "<span class='notice'>[target] is full.</span>"
|
||||
return
|
||||
|
||||
if(L) //living mob
|
||||
if(L != user)
|
||||
L.visible_message("<span class='danger'>[user] is trying to inject [L]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to inject [L]!</span>")
|
||||
if(!do_mob(user, L))
|
||||
return
|
||||
if(!reagents.total_volume)
|
||||
return
|
||||
if(L.reagents.total_volume >= L.reagents.maximum_volume)
|
||||
return
|
||||
|
||||
L.visible_message("<span class='danger'>[user] injects [L] with the syringe!", \
|
||||
"<span class='userdanger'>[user] injects [L] with the syringe!")
|
||||
|
||||
var/list/rinject = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
rinject += R.name
|
||||
var/contained = english_list(rinject)
|
||||
|
||||
if(L != user)
|
||||
add_logs(user, L, "injected", src, addition="which had [contained]")
|
||||
else
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) injected [L.name] ([L.ckey]) with [src.name], which had [contained] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
L.attack_log += "\[[time_stamp()]\] <font color='orange'>Injected themselves ([contained]) with [src.name].</font>"
|
||||
|
||||
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
|
||||
reagents.reaction(L, INJECT, fraction)
|
||||
reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "<span class='notice'>You inject [amount_per_transfer_from_this] units of the solution. The syringe now contains [reagents.total_volume] units.</span>"
|
||||
if (reagents.total_volume <= 0 && mode==SYRINGE_INJECT)
|
||||
mode = SYRINGE_DRAW
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/update_icon()
|
||||
var/rounded_vol = Clamp(round((reagents.total_volume / volume * 15),5), 0, 15)
|
||||
cut_overlays()
|
||||
if(ismob(loc))
|
||||
var/injoverlay
|
||||
switch(mode)
|
||||
if (SYRINGE_DRAW)
|
||||
injoverlay = "draw"
|
||||
if (SYRINGE_INJECT)
|
||||
injoverlay = "inject"
|
||||
add_overlay(injoverlay)
|
||||
icon_state = "[rounded_vol]"
|
||||
item_state = "syringe_[rounded_vol]"
|
||||
|
||||
if(reagents.total_volume)
|
||||
var/image/filling = image('icons/obj/reagentfillings.dmi', src, "syringe10")
|
||||
filling.icon_state = "syringe[rounded_vol]"
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/epinephrine
|
||||
name = "syringe (epinephrine)"
|
||||
desc = "Contains epinephrine - used to stabilize patients."
|
||||
list_reagents = list("epinephrine" = 15)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/charcoal
|
||||
name = "syringe (charcoal)"
|
||||
desc = "Contains charcoal."
|
||||
list_reagents = list("charcoal" = 15)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/antiviral
|
||||
name = "syringe (spaceacillin)"
|
||||
desc = "Contains antiviral agents."
|
||||
list_reagents = list("spaceacillin" = 15)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/bioterror
|
||||
name = "bioterror syringe"
|
||||
desc = "Contains several paralyzing reagents."
|
||||
list_reagents = list("neurotoxin" = 5, "mutetoxin" = 5, "sodium_thiopental" = 5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/stimulants
|
||||
name = "Stimpack"
|
||||
desc = "Contains stimulants."
|
||||
amount_per_transfer_from_this = 50
|
||||
volume = 50
|
||||
list_reagents = list("stimulants" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/calomel
|
||||
name = "syringe (calomel)"
|
||||
desc = "Contains calomel."
|
||||
list_reagents = list("calomel" = 15)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/lethal
|
||||
name = "lethal injection syringe"
|
||||
desc = "A syringe used for lethal injections. It can hold up to 50 units."
|
||||
amount_per_transfer_from_this = 50
|
||||
volume = 50
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/lethal/choral
|
||||
list_reagents = list("chloralhydrate" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/mulligan
|
||||
name = "Mulligan"
|
||||
desc = "A syringe used to completely change the users identity."
|
||||
amount_per_transfer_from_this = 1
|
||||
volume = 1
|
||||
list_reagents = list("mulligan" = 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/gluttony
|
||||
name = "Gluttony's Blessing"
|
||||
desc = "A syringe recovered from a dread place. It probably isn't wise to use."
|
||||
amount_per_transfer_from_this = 1
|
||||
volume = 1
|
||||
list_reagents = list("gluttonytoxin" = 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/bluespace
|
||||
name = "bluespace syringe"
|
||||
desc = "An advanced syringe that can hold 60 units of chemicals"
|
||||
amount_per_transfer_from_this = 20
|
||||
volume = 60
|
||||
origin_tech = "bluespace=4;materials=4;biotech=4"
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/noreact
|
||||
name = "cryo syringe"
|
||||
desc = "An advanced syringe that stops reagents inside from reacting. It can hold up to 20 units."
|
||||
volume = 20
|
||||
origin_tech = "materials=3;engineering=3"
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/noreact/New()
|
||||
. = ..()
|
||||
reagents.set_reacting(FALSE)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/piercing
|
||||
name = "piercing syringe"
|
||||
desc = "A diamond-tipped syringe that pierces armor when launched at high velocity. It can hold up to 10 units."
|
||||
volume = 10
|
||||
projectile_type = /obj/item/projectile/bullet/dart/syringe/piercing
|
||||
origin_tech = "combat=3;materials=4;engineering=5"
|
||||
Reference in New Issue
Block a user