mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 10:03:50 +01:00
File standardisation (#13131)
* Adds the check components * Adds in trailing newlines * Converts all CRLF to LF * Post merge EOF * Post merge line endings * Final commit
This commit is contained in:
@@ -1,116 +1,116 @@
|
||||
|
||||
/obj/item/reagent_containers/borghypo
|
||||
name = "Cyborg Hypospray"
|
||||
desc = "An advanced chemical synthesizer and injection system, designed for heavy-duty medical equipment."
|
||||
icon = 'icons/obj/hypo.dmi'
|
||||
item_state = "hypo"
|
||||
icon_state = "borghypo"
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = null
|
||||
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("salglu_solution", "epinephrine", "spaceacillin", "charcoal", "hydrocodone")
|
||||
//var/list/reagent_ids = list("salbutamol", "silver_sulfadiazine", "styptic_powder", "charcoal", "epinephrine", "spaceacillin", "hydrocodone")
|
||||
|
||||
/obj/item/reagent_containers/borghypo/surgeon
|
||||
reagent_ids = list("styptic_powder", "epinephrine", "salbutamol")
|
||||
|
||||
/obj/item/reagent_containers/borghypo/crisis
|
||||
reagent_ids = list("salglu_solution", "epinephrine", "sal_acid")
|
||||
|
||||
/obj/item/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 hydrocodone, for field surgery and pain relief."
|
||||
icon_state = "borghypo_s"
|
||||
charge_cost = 20
|
||||
recharge_time = 2
|
||||
reagent_ids = list("syndicate_nanites", "potass_iodide", "hydrocodone")
|
||||
bypass_protection = 1
|
||||
|
||||
/obj/item/reagent_containers/borghypo/New()
|
||||
..()
|
||||
for(var/R in reagent_ids)
|
||||
add_reagent(R)
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/reagent_containers/borghypo/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/borghypo/process() //Every [recharge_time] seconds, recharge some reagents for the cyborg
|
||||
charge_tick++
|
||||
if(charge_tick < recharge_time) return 0
|
||||
charge_tick = 0
|
||||
|
||||
if(isrobot(loc))
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
if(R && R.cell)
|
||||
var/datum/reagents/RG = reagent_list[mode]
|
||||
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[mode], 5) //And fill hypo with reagent.
|
||||
//update_icon()
|
||||
return 1
|
||||
|
||||
// Use this to add more chemicals for the borghypo to produce.
|
||||
/obj/item/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/reagent_containers/borghypo/attack(mob/living/M, mob/user)
|
||||
var/datum/reagents/R = reagent_list[mode]
|
||||
if(!R.total_volume)
|
||||
to_chat(user, "<span class='warning'>The injector is empty.</span>")
|
||||
return
|
||||
if(!istype(M))
|
||||
return
|
||||
if(R.total_volume && M.can_inject(user, TRUE, user.zone_selected, penetrate_thick = bypass_protection))
|
||||
to_chat(user, "<span class='notice'>You inject [M] with the injector.</span>")
|
||||
to_chat(M, "<span class='notice'>You feel a tiny prick!</span>")
|
||||
|
||||
R.add_reagent(M)
|
||||
if(M.reagents)
|
||||
var/datum/reagent/injected = GLOB.chemical_reagents_list[reagent_ids[mode]]
|
||||
var/contained = injected.name
|
||||
var/trans = R.trans_to(M, amount_per_transfer_from_this)
|
||||
add_attack_logs(user, M, "Injected with [name] containing [contained], transfered [trans] units", injected.harmless ? ATKLOG_ALMOSTALL : null)
|
||||
M.LAssailant = user
|
||||
to_chat(user, "<span class='notice'>[trans] units injected. [R.total_volume] units remaining.</span>")
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/borghypo/attack_self(mob/user)
|
||||
playsound(loc, 'sound/effects/pop.ogg', 50, 0) //Change the mode
|
||||
mode++
|
||||
if(mode > reagent_list.len)
|
||||
mode = 1
|
||||
|
||||
charge_tick = 0 //Prevents wasted chems/cell charge if you're cycling through modes.
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[reagent_ids[mode]]
|
||||
to_chat(user, "<span class='notice'>Synthesizer is now producing '[R.name]'.</span>")
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/borghypo/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2)
|
||||
var/empty = TRUE
|
||||
|
||||
for(var/datum/reagents/RS in reagent_list)
|
||||
var/datum/reagent/R = locate() in RS.reagent_list
|
||||
if(R)
|
||||
. += "<span class='notice'>It currently has [R.volume] units of [R.name] stored.</span>"
|
||||
empty = FALSE
|
||||
|
||||
if(empty)
|
||||
. += "<span class='notice'>It is currently empty. Allow some time for the internal syntheszier to produce more.</span>"
|
||||
|
||||
/obj/item/reagent_containers/borghypo
|
||||
name = "Cyborg Hypospray"
|
||||
desc = "An advanced chemical synthesizer and injection system, designed for heavy-duty medical equipment."
|
||||
icon = 'icons/obj/hypo.dmi'
|
||||
item_state = "hypo"
|
||||
icon_state = "borghypo"
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = null
|
||||
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("salglu_solution", "epinephrine", "spaceacillin", "charcoal", "hydrocodone")
|
||||
//var/list/reagent_ids = list("salbutamol", "silver_sulfadiazine", "styptic_powder", "charcoal", "epinephrine", "spaceacillin", "hydrocodone")
|
||||
|
||||
/obj/item/reagent_containers/borghypo/surgeon
|
||||
reagent_ids = list("styptic_powder", "epinephrine", "salbutamol")
|
||||
|
||||
/obj/item/reagent_containers/borghypo/crisis
|
||||
reagent_ids = list("salglu_solution", "epinephrine", "sal_acid")
|
||||
|
||||
/obj/item/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 hydrocodone, for field surgery and pain relief."
|
||||
icon_state = "borghypo_s"
|
||||
charge_cost = 20
|
||||
recharge_time = 2
|
||||
reagent_ids = list("syndicate_nanites", "potass_iodide", "hydrocodone")
|
||||
bypass_protection = 1
|
||||
|
||||
/obj/item/reagent_containers/borghypo/New()
|
||||
..()
|
||||
for(var/R in reagent_ids)
|
||||
add_reagent(R)
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/reagent_containers/borghypo/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/borghypo/process() //Every [recharge_time] seconds, recharge some reagents for the cyborg
|
||||
charge_tick++
|
||||
if(charge_tick < recharge_time) return 0
|
||||
charge_tick = 0
|
||||
|
||||
if(isrobot(loc))
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
if(R && R.cell)
|
||||
var/datum/reagents/RG = reagent_list[mode]
|
||||
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[mode], 5) //And fill hypo with reagent.
|
||||
//update_icon()
|
||||
return 1
|
||||
|
||||
// Use this to add more chemicals for the borghypo to produce.
|
||||
/obj/item/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/reagent_containers/borghypo/attack(mob/living/M, mob/user)
|
||||
var/datum/reagents/R = reagent_list[mode]
|
||||
if(!R.total_volume)
|
||||
to_chat(user, "<span class='warning'>The injector is empty.</span>")
|
||||
return
|
||||
if(!istype(M))
|
||||
return
|
||||
if(R.total_volume && M.can_inject(user, TRUE, user.zone_selected, penetrate_thick = bypass_protection))
|
||||
to_chat(user, "<span class='notice'>You inject [M] with the injector.</span>")
|
||||
to_chat(M, "<span class='notice'>You feel a tiny prick!</span>")
|
||||
|
||||
R.add_reagent(M)
|
||||
if(M.reagents)
|
||||
var/datum/reagent/injected = GLOB.chemical_reagents_list[reagent_ids[mode]]
|
||||
var/contained = injected.name
|
||||
var/trans = R.trans_to(M, amount_per_transfer_from_this)
|
||||
add_attack_logs(user, M, "Injected with [name] containing [contained], transfered [trans] units", injected.harmless ? ATKLOG_ALMOSTALL : null)
|
||||
M.LAssailant = user
|
||||
to_chat(user, "<span class='notice'>[trans] units injected. [R.total_volume] units remaining.</span>")
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/borghypo/attack_self(mob/user)
|
||||
playsound(loc, 'sound/effects/pop.ogg', 50, 0) //Change the mode
|
||||
mode++
|
||||
if(mode > reagent_list.len)
|
||||
mode = 1
|
||||
|
||||
charge_tick = 0 //Prevents wasted chems/cell charge if you're cycling through modes.
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[reagent_ids[mode]]
|
||||
to_chat(user, "<span class='notice'>Synthesizer is now producing '[R.name]'.</span>")
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/borghypo/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2)
|
||||
var/empty = TRUE
|
||||
|
||||
for(var/datum/reagents/RS in reagent_list)
|
||||
var/datum/reagent/R = locate() in RS.reagent_list
|
||||
if(R)
|
||||
. += "<span class='notice'>It currently has [R.volume] units of [R.name] stored.</span>"
|
||||
empty = FALSE
|
||||
|
||||
if(empty)
|
||||
. += "<span class='notice'>It is currently empty. Allow some time for the internal syntheszier to produce more.</span>"
|
||||
|
||||
@@ -392,4 +392,4 @@
|
||||
name = "BVAK bottle"
|
||||
desc = "A small bottle containing Bio Virus Antidote Kit."
|
||||
icon_state = "wide_bottle"
|
||||
list_reagents = list("atropine" = 5, "epinephrine" = 5, "salbutamol" = 10, "spaceacillin" = 10)
|
||||
list_reagents = list("atropine" = 5, "epinephrine" = 5, "salbutamol" = 10, "spaceacillin" = 10)
|
||||
|
||||
@@ -1,144 +1,144 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Droppers. ///
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/item/reagent_containers/dropper
|
||||
name = "dropper"
|
||||
desc = "A dropper. Transfers 5 units."
|
||||
icon_state = "dropper"
|
||||
item_state = "dropper"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list(1, 2, 3, 4, 5)
|
||||
volume = 5
|
||||
|
||||
/obj/item/reagent_containers/dropper/on_reagent_change()
|
||||
if(!reagents.total_volume)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
|
||||
/obj/item/reagent_containers/dropper/attack(mob/living/M, mob/living/user, def_zone)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/dropper/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
var/to_transfer = 0
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
if(!reagents.total_volume)
|
||||
return
|
||||
if(user != C)
|
||||
visible_message("<span class='danger'>[user] begins to drip something into [C]'s eyes!</span>")
|
||||
if(!do_mob(user, C, 30))
|
||||
return
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/obj/item/safe_thing = null
|
||||
|
||||
if(H.glasses)
|
||||
safe_thing = H.glasses
|
||||
if(H.wear_mask )
|
||||
if(H.wear_mask.flags_cover & MASKCOVERSEYES)
|
||||
safe_thing = H.wear_mask
|
||||
if(H.head)
|
||||
if(H.head.flags_cover & MASKCOVERSEYES)
|
||||
safe_thing = H.head
|
||||
|
||||
if(safe_thing)
|
||||
visible_message("<span class='danger'>[user] tries to drip something into [H]'s eyes, but fails!</span>")
|
||||
|
||||
reagents.reaction(safe_thing, REAGENT_TOUCH)
|
||||
to_transfer = reagents.remove_any(amount_per_transfer_from_this)
|
||||
|
||||
to_chat(user, "<span class='notice'>You transfer [to_transfer] units of the solution.</span>")
|
||||
return
|
||||
|
||||
visible_message("<span class='danger'>[user] drips something into [C]'s eyes!</span>")
|
||||
reagents.reaction(C, REAGENT_TOUCH)
|
||||
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/contained = english_list(injected)
|
||||
add_attack_logs(user, C, "Dripped with [src] containing ([contained]), transfering [to_transfer]")
|
||||
|
||||
to_transfer = reagents.trans_to(C, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [to_transfer] units of the solution.</span>")
|
||||
|
||||
if(isobj(target))
|
||||
if(!target.reagents)
|
||||
return
|
||||
|
||||
if(reagents.total_volume)
|
||||
if(!target.is_open_container() && !(istype(target, /obj/item/reagent_containers/food) && !istype(target, /obj/item/reagent_containers/food/pill)) && !istype(target, /obj/item/clothing/mask/cigarette))
|
||||
to_chat(user, "<span class='warning'>You cannot directly fill this object.</span>")
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
to_transfer = reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [to_transfer] units of the solution.</span>")
|
||||
|
||||
else
|
||||
if(!target.is_open_container() && !istype(target, /obj/structure/reagent_dispensers))
|
||||
to_chat(user, "<span class='warning'>You cannot directly remove reagents from [target].</span>")
|
||||
return
|
||||
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty.</span>")
|
||||
return
|
||||
|
||||
to_transfer = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [to_transfer] units of the solution.</span>")
|
||||
|
||||
/obj/item/reagent_containers/dropper/cyborg
|
||||
name = "Industrial Dropper"
|
||||
desc = "A larger dropper. Transfers 10 units."
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
|
||||
volume = 10
|
||||
|
||||
/obj/item/reagent_containers/dropper/precision
|
||||
name = "pipette"
|
||||
desc = "A high precision pippette. Holds 1 unit."
|
||||
icon_state = "pipette"
|
||||
amount_per_transfer_from_this = 1
|
||||
possible_transfer_amounts = list(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1)
|
||||
volume = 1
|
||||
|
||||
//Syndicate item. Virus transmitting mini hypospray
|
||||
/obj/item/reagent_containers/dropper/precision/viral_injector
|
||||
|
||||
/obj/item/reagent_containers/dropper/precision/viral_injector/attack(mob/living/M, mob/living/user, def_zone)
|
||||
if(M.can_inject(user, TRUE))
|
||||
to_chat(user, "<span class='warning'>You stab [M] with the [src].</span>")
|
||||
if(reagents.total_volume && M.reagents)
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/datum/reagent/blood/B = R
|
||||
|
||||
if(istype(B) && B.data["viruses"])
|
||||
var/virList = list()
|
||||
for(var/dis in B.data["viruses"])
|
||||
var/datum/disease/D = dis
|
||||
var/virusData = D.name
|
||||
var/english_symptoms = list()
|
||||
var/datum/disease/advance/A = D
|
||||
if(A)
|
||||
for(var/datum/symptom/S in A.symptoms)
|
||||
english_symptoms += S.name
|
||||
virusData += " ([english_list(english_symptoms)])"
|
||||
virList += virusData
|
||||
var/str = english_list(virList)
|
||||
add_attack_logs(user, M, "Infected with [str].")
|
||||
|
||||
reagents.reaction(M, REAGENT_INGEST, reagents.total_volume)
|
||||
reagents.trans_to(M, 1)
|
||||
|
||||
var/contained = english_list(injected)
|
||||
add_attack_logs(user, M, "Injected with [src] containing ([contained])")
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Droppers. ///
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/item/reagent_containers/dropper
|
||||
name = "dropper"
|
||||
desc = "A dropper. Transfers 5 units."
|
||||
icon_state = "dropper"
|
||||
item_state = "dropper"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list(1, 2, 3, 4, 5)
|
||||
volume = 5
|
||||
|
||||
/obj/item/reagent_containers/dropper/on_reagent_change()
|
||||
if(!reagents.total_volume)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
|
||||
/obj/item/reagent_containers/dropper/attack(mob/living/M, mob/living/user, def_zone)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/dropper/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
var/to_transfer = 0
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
if(!reagents.total_volume)
|
||||
return
|
||||
if(user != C)
|
||||
visible_message("<span class='danger'>[user] begins to drip something into [C]'s eyes!</span>")
|
||||
if(!do_mob(user, C, 30))
|
||||
return
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/obj/item/safe_thing = null
|
||||
|
||||
if(H.glasses)
|
||||
safe_thing = H.glasses
|
||||
if(H.wear_mask )
|
||||
if(H.wear_mask.flags_cover & MASKCOVERSEYES)
|
||||
safe_thing = H.wear_mask
|
||||
if(H.head)
|
||||
if(H.head.flags_cover & MASKCOVERSEYES)
|
||||
safe_thing = H.head
|
||||
|
||||
if(safe_thing)
|
||||
visible_message("<span class='danger'>[user] tries to drip something into [H]'s eyes, but fails!</span>")
|
||||
|
||||
reagents.reaction(safe_thing, REAGENT_TOUCH)
|
||||
to_transfer = reagents.remove_any(amount_per_transfer_from_this)
|
||||
|
||||
to_chat(user, "<span class='notice'>You transfer [to_transfer] units of the solution.</span>")
|
||||
return
|
||||
|
||||
visible_message("<span class='danger'>[user] drips something into [C]'s eyes!</span>")
|
||||
reagents.reaction(C, REAGENT_TOUCH)
|
||||
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/contained = english_list(injected)
|
||||
add_attack_logs(user, C, "Dripped with [src] containing ([contained]), transfering [to_transfer]")
|
||||
|
||||
to_transfer = reagents.trans_to(C, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [to_transfer] units of the solution.</span>")
|
||||
|
||||
if(isobj(target))
|
||||
if(!target.reagents)
|
||||
return
|
||||
|
||||
if(reagents.total_volume)
|
||||
if(!target.is_open_container() && !(istype(target, /obj/item/reagent_containers/food) && !istype(target, /obj/item/reagent_containers/food/pill)) && !istype(target, /obj/item/clothing/mask/cigarette))
|
||||
to_chat(user, "<span class='warning'>You cannot directly fill this object.</span>")
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
to_transfer = reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [to_transfer] units of the solution.</span>")
|
||||
|
||||
else
|
||||
if(!target.is_open_container() && !istype(target, /obj/structure/reagent_dispensers))
|
||||
to_chat(user, "<span class='warning'>You cannot directly remove reagents from [target].</span>")
|
||||
return
|
||||
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty.</span>")
|
||||
return
|
||||
|
||||
to_transfer = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [to_transfer] units of the solution.</span>")
|
||||
|
||||
/obj/item/reagent_containers/dropper/cyborg
|
||||
name = "Industrial Dropper"
|
||||
desc = "A larger dropper. Transfers 10 units."
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
|
||||
volume = 10
|
||||
|
||||
/obj/item/reagent_containers/dropper/precision
|
||||
name = "pipette"
|
||||
desc = "A high precision pippette. Holds 1 unit."
|
||||
icon_state = "pipette"
|
||||
amount_per_transfer_from_this = 1
|
||||
possible_transfer_amounts = list(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1)
|
||||
volume = 1
|
||||
|
||||
//Syndicate item. Virus transmitting mini hypospray
|
||||
/obj/item/reagent_containers/dropper/precision/viral_injector
|
||||
|
||||
/obj/item/reagent_containers/dropper/precision/viral_injector/attack(mob/living/M, mob/living/user, def_zone)
|
||||
if(M.can_inject(user, TRUE))
|
||||
to_chat(user, "<span class='warning'>You stab [M] with the [src].</span>")
|
||||
if(reagents.total_volume && M.reagents)
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/datum/reagent/blood/B = R
|
||||
|
||||
if(istype(B) && B.data["viruses"])
|
||||
var/virList = list()
|
||||
for(var/dis in B.data["viruses"])
|
||||
var/datum/disease/D = dis
|
||||
var/virusData = D.name
|
||||
var/english_symptoms = list()
|
||||
var/datum/disease/advance/A = D
|
||||
if(A)
|
||||
for(var/datum/symptom/S in A.symptoms)
|
||||
english_symptoms += S.name
|
||||
virusData += " ([english_list(english_symptoms)])"
|
||||
virList += virusData
|
||||
var/str = english_list(virList)
|
||||
add_attack_logs(user, M, "Infected with [str].")
|
||||
|
||||
reagents.reaction(M, REAGENT_INGEST, reagents.total_volume)
|
||||
reagents.trans_to(M, 1)
|
||||
|
||||
var/contained = english_list(injected)
|
||||
add_attack_logs(user, M, "Injected with [src] containing ([contained])")
|
||||
|
||||
@@ -397,4 +397,4 @@
|
||||
amount_per_transfer_from_this = 20
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/waterbottle/large/empty
|
||||
list_reagents = list()
|
||||
list_reagents = list()
|
||||
|
||||
@@ -1,175 +1,175 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// HYPOSPRAY
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/item/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/hypo.dmi'
|
||||
item_state = "hypo"
|
||||
icon_state = "hypo"
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = list(1,2,3,4,5,10,15,20,25,30)
|
||||
resistance_flags = ACID_PROOF
|
||||
container_type = OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
var/ignore_flags = FALSE
|
||||
var/emagged = FALSE
|
||||
var/safety_hypo = FALSE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/attack(mob/living/M, mob/user)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
if(!iscarbon(M))
|
||||
return
|
||||
|
||||
if(reagents.total_volume && (ignore_flags || M.can_inject(user, TRUE))) // Ignore flag should be checked first or there will be an error message.
|
||||
to_chat(M, "<span class='warning'>You feel a tiny prick!</span>")
|
||||
to_chat(user, "<span class='notice'>You inject [M] with [src].</span>")
|
||||
|
||||
if(M.reagents)
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
injected += R.name
|
||||
|
||||
var/primary_reagent_name = reagents.get_master_reagent_name()
|
||||
var/trans = reagents.trans_to(M, amount_per_transfer_from_this)
|
||||
|
||||
if(safety_hypo)
|
||||
visible_message("<span class='warning'>[user] injects [M] with [trans] units of [primary_reagent_name].</span>")
|
||||
playsound(loc, 'sound/goonstation/items/hypo.ogg', 80, 0)
|
||||
|
||||
to_chat(user, "<span class='notice'>[trans] unit\s injected. [reagents.total_volume] unit\s remaining in [src].</span>")
|
||||
|
||||
var/contained = english_list(injected)
|
||||
|
||||
add_attack_logs(user, M, "Injected with [src] containing ([contained])", reagents.harmless_helper() ? ATKLOG_ALMOSTALL : null)
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/on_reagent_change()
|
||||
if(safety_hypo && !emagged)
|
||||
var/found_forbidden_reagent = FALSE
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(!GLOB.safe_chem_list.Find(R.id))
|
||||
reagents.del_reagent(R.id)
|
||||
found_forbidden_reagent = TRUE
|
||||
if(found_forbidden_reagent)
|
||||
if(ismob(loc))
|
||||
to_chat(loc, "<span class='warning'>[src] identifies and removes a harmful substance.</span>")
|
||||
else
|
||||
visible_message("<span class='warning'>[src] identifies and removes a harmful substance.</span>")
|
||||
|
||||
/obj/item/reagent_containers/hypospray/emag_act(mob/user)
|
||||
if(safety_hypo && !emagged)
|
||||
emagged = TRUE
|
||||
ignore_flags = TRUE
|
||||
to_chat(user, "<span class='warning'>You short out the safeties on [src].</span>")
|
||||
|
||||
/obj/item/reagent_containers/hypospray/safety
|
||||
name = "medical hypospray"
|
||||
desc = "A general use medical hypospray for quick injection of chemicals. There is a safety button by the trigger."
|
||||
icon_state = "medivend_hypo"
|
||||
safety_hypo = TRUE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/safety/ert
|
||||
list_reagents = list("omnizine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/CMO
|
||||
list_reagents = list("omnizine" = 30)
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/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 = 15
|
||||
possible_transfer_amounts = list(15)
|
||||
icon_state = "combat_hypo"
|
||||
volume = 90
|
||||
ignore_flags = 1 // So they can heal their comrades.
|
||||
list_reagents = list("epinephrine" = 30, "weak_omnizine" = 30, "salglu_solution" = 30)
|
||||
|
||||
/obj/item/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" = 100)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector
|
||||
name = "emergency autoinjector"
|
||||
desc = "A rapid and safe way to stabilize patients in critical condition for personnel without advanced medical knowledge."
|
||||
icon_state = "autoinjector"
|
||||
item_state = "autoinjector"
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(10)
|
||||
volume = 10
|
||||
ignore_flags = TRUE //so you can medipen through hardsuits
|
||||
container_type = DRAWABLE
|
||||
flags = null
|
||||
list_reagents = list("epinephrine" = 10)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/attack(mob/M, mob/user)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
..()
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/update_icon()
|
||||
if(reagents.total_volume > 0)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]0"
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/examine()
|
||||
. = ..()
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
. += "<span class='notice'>It is currently loaded.</span>"
|
||||
else
|
||||
. += "<span class='notice'>It is spent.</span>"
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/teporone //basilisks
|
||||
name = "teporone autoinjector"
|
||||
desc = "A rapid way to regulate your body's temperature in the event of a hardsuit malfunction."
|
||||
icon_state = "lepopen"
|
||||
list_reagents = list("teporone" = 10)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/stimpack //goliath kiting
|
||||
name = "stimpack autoinjector"
|
||||
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("methamphetamine" = 10, "coffee" = 10)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/stimulants
|
||||
name = "Stimulants autoinjector"
|
||||
desc = "Rapidly stimulates and regenerates the body's organ system."
|
||||
icon_state = "stimpen"
|
||||
amount_per_transfer_from_this = 50
|
||||
possible_transfer_amounts = list(50)
|
||||
volume = 50
|
||||
list_reagents = list("stimulants" = 50)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/survival
|
||||
name = "survival medipen"
|
||||
desc = "A medipen for surviving in the harshest of environments, heals and protects from environmental hazards. <br><span class='boldwarning'>WARNING: Do not inject more than one pen in quick succession.</span>"
|
||||
icon_state = "stimpen"
|
||||
volume = 42
|
||||
amount_per_transfer_from_this = 42
|
||||
list_reagents = list("salbutamol" = 10, "teporone" = 15, "epinephrine" = 10, "lavaland_extract" = 2, "weak_omnizine" = 5) //Short burst of healing, followed by minor healing from the saline
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/nanocalcium
|
||||
name = "nanocalcium autoinjector"
|
||||
desc = "After a short period of time the nanites will slow the body's systems and assist with bone repair. Nanomachines son."
|
||||
icon_state = "bonepen"
|
||||
amount_per_transfer_from_this = 30
|
||||
possible_transfer_amounts = list(30)
|
||||
volume = 30
|
||||
list_reagents = list("nanocalcium" = 30)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/nanocalcium/attack(mob/living/M, mob/user)
|
||||
if(..())
|
||||
playsound(loc, 'sound/weapons/smg_empty_alarm.ogg', 20, 1)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// HYPOSPRAY
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/item/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/hypo.dmi'
|
||||
item_state = "hypo"
|
||||
icon_state = "hypo"
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = list(1,2,3,4,5,10,15,20,25,30)
|
||||
resistance_flags = ACID_PROOF
|
||||
container_type = OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
var/ignore_flags = FALSE
|
||||
var/emagged = FALSE
|
||||
var/safety_hypo = FALSE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/attack(mob/living/M, mob/user)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
if(!iscarbon(M))
|
||||
return
|
||||
|
||||
if(reagents.total_volume && (ignore_flags || M.can_inject(user, TRUE))) // Ignore flag should be checked first or there will be an error message.
|
||||
to_chat(M, "<span class='warning'>You feel a tiny prick!</span>")
|
||||
to_chat(user, "<span class='notice'>You inject [M] with [src].</span>")
|
||||
|
||||
if(M.reagents)
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
injected += R.name
|
||||
|
||||
var/primary_reagent_name = reagents.get_master_reagent_name()
|
||||
var/trans = reagents.trans_to(M, amount_per_transfer_from_this)
|
||||
|
||||
if(safety_hypo)
|
||||
visible_message("<span class='warning'>[user] injects [M] with [trans] units of [primary_reagent_name].</span>")
|
||||
playsound(loc, 'sound/goonstation/items/hypo.ogg', 80, 0)
|
||||
|
||||
to_chat(user, "<span class='notice'>[trans] unit\s injected. [reagents.total_volume] unit\s remaining in [src].</span>")
|
||||
|
||||
var/contained = english_list(injected)
|
||||
|
||||
add_attack_logs(user, M, "Injected with [src] containing ([contained])", reagents.harmless_helper() ? ATKLOG_ALMOSTALL : null)
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/on_reagent_change()
|
||||
if(safety_hypo && !emagged)
|
||||
var/found_forbidden_reagent = FALSE
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(!GLOB.safe_chem_list.Find(R.id))
|
||||
reagents.del_reagent(R.id)
|
||||
found_forbidden_reagent = TRUE
|
||||
if(found_forbidden_reagent)
|
||||
if(ismob(loc))
|
||||
to_chat(loc, "<span class='warning'>[src] identifies and removes a harmful substance.</span>")
|
||||
else
|
||||
visible_message("<span class='warning'>[src] identifies and removes a harmful substance.</span>")
|
||||
|
||||
/obj/item/reagent_containers/hypospray/emag_act(mob/user)
|
||||
if(safety_hypo && !emagged)
|
||||
emagged = TRUE
|
||||
ignore_flags = TRUE
|
||||
to_chat(user, "<span class='warning'>You short out the safeties on [src].</span>")
|
||||
|
||||
/obj/item/reagent_containers/hypospray/safety
|
||||
name = "medical hypospray"
|
||||
desc = "A general use medical hypospray for quick injection of chemicals. There is a safety button by the trigger."
|
||||
icon_state = "medivend_hypo"
|
||||
safety_hypo = TRUE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/safety/ert
|
||||
list_reagents = list("omnizine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/CMO
|
||||
list_reagents = list("omnizine" = 30)
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/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 = 15
|
||||
possible_transfer_amounts = list(15)
|
||||
icon_state = "combat_hypo"
|
||||
volume = 90
|
||||
ignore_flags = 1 // So they can heal their comrades.
|
||||
list_reagents = list("epinephrine" = 30, "weak_omnizine" = 30, "salglu_solution" = 30)
|
||||
|
||||
/obj/item/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" = 100)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector
|
||||
name = "emergency autoinjector"
|
||||
desc = "A rapid and safe way to stabilize patients in critical condition for personnel without advanced medical knowledge."
|
||||
icon_state = "autoinjector"
|
||||
item_state = "autoinjector"
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(10)
|
||||
volume = 10
|
||||
ignore_flags = TRUE //so you can medipen through hardsuits
|
||||
container_type = DRAWABLE
|
||||
flags = null
|
||||
list_reagents = list("epinephrine" = 10)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/attack(mob/M, mob/user)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
..()
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/update_icon()
|
||||
if(reagents.total_volume > 0)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]0"
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/examine()
|
||||
. = ..()
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
. += "<span class='notice'>It is currently loaded.</span>"
|
||||
else
|
||||
. += "<span class='notice'>It is spent.</span>"
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/teporone //basilisks
|
||||
name = "teporone autoinjector"
|
||||
desc = "A rapid way to regulate your body's temperature in the event of a hardsuit malfunction."
|
||||
icon_state = "lepopen"
|
||||
list_reagents = list("teporone" = 10)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/stimpack //goliath kiting
|
||||
name = "stimpack autoinjector"
|
||||
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("methamphetamine" = 10, "coffee" = 10)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/stimulants
|
||||
name = "Stimulants autoinjector"
|
||||
desc = "Rapidly stimulates and regenerates the body's organ system."
|
||||
icon_state = "stimpen"
|
||||
amount_per_transfer_from_this = 50
|
||||
possible_transfer_amounts = list(50)
|
||||
volume = 50
|
||||
list_reagents = list("stimulants" = 50)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/survival
|
||||
name = "survival medipen"
|
||||
desc = "A medipen for surviving in the harshest of environments, heals and protects from environmental hazards. <br><span class='boldwarning'>WARNING: Do not inject more than one pen in quick succession.</span>"
|
||||
icon_state = "stimpen"
|
||||
volume = 42
|
||||
amount_per_transfer_from_this = 42
|
||||
list_reagents = list("salbutamol" = 10, "teporone" = 15, "epinephrine" = 10, "lavaland_extract" = 2, "weak_omnizine" = 5) //Short burst of healing, followed by minor healing from the saline
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/nanocalcium
|
||||
name = "nanocalcium autoinjector"
|
||||
desc = "After a short period of time the nanites will slow the body's systems and assist with bone repair. Nanomachines son."
|
||||
icon_state = "bonepen"
|
||||
amount_per_transfer_from_this = 30
|
||||
possible_transfer_amounts = list(30)
|
||||
volume = 30
|
||||
list_reagents = list("nanocalcium" = 30)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/nanocalcium/attack(mob/living/M, mob/user)
|
||||
if(..())
|
||||
playsound(loc, 'sound/weapons/smg_empty_alarm.ogg', 20, 1)
|
||||
|
||||
@@ -1,155 +1,155 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Pills.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/obj/item/reagent_containers/food/pill
|
||||
name = "pill"
|
||||
desc = "a pill."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = null
|
||||
item_state = "pill"
|
||||
possible_transfer_amounts = null
|
||||
volume = 100
|
||||
consume_sound = null
|
||||
can_taste = FALSE
|
||||
antable = FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/pill/New()
|
||||
..()
|
||||
if(!icon_state)
|
||||
icon_state = "pill[rand(1,20)]"
|
||||
|
||||
/obj/item/reagent_containers/food/pill/attack_self(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/food/pill/attack(mob/living/carbon/M, mob/user, def_zone)
|
||||
if(!istype(M))
|
||||
return 0
|
||||
bitesize = reagents.total_volume
|
||||
if(M.eat(src, user))
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/reagent_containers/food/pill/afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(target.is_open_container() != 0 && target.reagents)
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty. Cant dissolve [src].</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notify'>You dissolve [src] in [target].</span>")
|
||||
reagents.trans_to(target, reagents.total_volume)
|
||||
for(var/mob/O in viewers(2, user))
|
||||
O.show_message("<span class='warning'>[user] puts something in [target].</span>", 1)
|
||||
spawn(5)
|
||||
qdel(src)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Pills. END
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//Pills
|
||||
/obj/item/reagent_containers/food/pill/tox
|
||||
name = "Toxins pill"
|
||||
desc = "Highly toxic."
|
||||
icon_state = "pill21"
|
||||
list_reagents = list("toxin" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/initropidril
|
||||
name = "initropidril pill"
|
||||
desc = "Don't swallow this."
|
||||
icon_state = "pill21"
|
||||
list_reagents = list("initropidril" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/fakedeath
|
||||
name = "fake death pill"
|
||||
desc = "Swallow then rest to appear dead, stand up to wake up. Also mutes the user's voice."
|
||||
icon_state = "pill4"
|
||||
list_reagents = list("capulettium_plus" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/adminordrazine
|
||||
name = "Adminordrazine pill"
|
||||
desc = "It's magic. We don't have to explain it."
|
||||
icon_state = "pill16"
|
||||
list_reagents = list("adminordrazine" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/morphine
|
||||
name = "Morphine pill"
|
||||
desc = "Commonly used to treat insomnia."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("morphine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/methamphetamine
|
||||
name = "Methamphetamine pill"
|
||||
desc = "Helps improve the ability to concentrate."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("methamphetamine" = 5)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/haloperidol
|
||||
name = "Haloperidol pill"
|
||||
desc = "Haloperidol is an anti-psychotic use to treat psychiatric problems."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("haloperidol" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/happy
|
||||
name = "Happy pill"
|
||||
desc = "Happy happy joy joy!"
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("space_drugs" = 15, "sugar" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/zoom
|
||||
name = "Zoom pill"
|
||||
desc = "Zoooom!"
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("synaptizine" = 5, "methamphetamine" = 5)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/charcoal
|
||||
name = "Charcoal pill"
|
||||
desc = "Neutralizes many common toxins."
|
||||
icon_state = "pill17"
|
||||
list_reagents = list("charcoal" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/epinephrine
|
||||
name = "Epinephrine pill"
|
||||
desc = "Used to provide shots of adrenaline."
|
||||
icon_state = "pill6"
|
||||
list_reagents = list("epinephrine" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/salicylic
|
||||
name = "Salicylic Acid pill"
|
||||
desc = "Commonly used to treat moderate pain and fevers."
|
||||
icon_state = "pill4"
|
||||
list_reagents = list("sal_acid" = 20)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/salbutamol
|
||||
name = "Salbutamol pill"
|
||||
desc = "Used to treat respiratory distress."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("salbutamol" = 20)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/hydrocodone
|
||||
name = "Hydrocodone pill"
|
||||
desc = "Used to treat extreme pain."
|
||||
icon_state = "pill6"
|
||||
list_reagents = list("hydrocodone" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/calomel
|
||||
name = "calomel pill"
|
||||
desc = "Can be used to purge impurities, but is highly toxic itself."
|
||||
icon_state = "pill3"
|
||||
list_reagents = list("calomel" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/mutadone
|
||||
name = "mutadone pill"
|
||||
desc = "Used to cure genetic abnormalities."
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("mutadone" = 20)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/mannitol
|
||||
name = "mannitol pill"
|
||||
desc = "Used to treat cranial swelling."
|
||||
icon_state = "pill19"
|
||||
list_reagents = list("mannitol" = 20)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Pills.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/obj/item/reagent_containers/food/pill
|
||||
name = "pill"
|
||||
desc = "a pill."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = null
|
||||
item_state = "pill"
|
||||
possible_transfer_amounts = null
|
||||
volume = 100
|
||||
consume_sound = null
|
||||
can_taste = FALSE
|
||||
antable = FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/pill/New()
|
||||
..()
|
||||
if(!icon_state)
|
||||
icon_state = "pill[rand(1,20)]"
|
||||
|
||||
/obj/item/reagent_containers/food/pill/attack_self(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/food/pill/attack(mob/living/carbon/M, mob/user, def_zone)
|
||||
if(!istype(M))
|
||||
return 0
|
||||
bitesize = reagents.total_volume
|
||||
if(M.eat(src, user))
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/reagent_containers/food/pill/afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(target.is_open_container() != 0 && target.reagents)
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty. Cant dissolve [src].</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notify'>You dissolve [src] in [target].</span>")
|
||||
reagents.trans_to(target, reagents.total_volume)
|
||||
for(var/mob/O in viewers(2, user))
|
||||
O.show_message("<span class='warning'>[user] puts something in [target].</span>", 1)
|
||||
spawn(5)
|
||||
qdel(src)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Pills. END
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//Pills
|
||||
/obj/item/reagent_containers/food/pill/tox
|
||||
name = "Toxins pill"
|
||||
desc = "Highly toxic."
|
||||
icon_state = "pill21"
|
||||
list_reagents = list("toxin" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/initropidril
|
||||
name = "initropidril pill"
|
||||
desc = "Don't swallow this."
|
||||
icon_state = "pill21"
|
||||
list_reagents = list("initropidril" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/fakedeath
|
||||
name = "fake death pill"
|
||||
desc = "Swallow then rest to appear dead, stand up to wake up. Also mutes the user's voice."
|
||||
icon_state = "pill4"
|
||||
list_reagents = list("capulettium_plus" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/adminordrazine
|
||||
name = "Adminordrazine pill"
|
||||
desc = "It's magic. We don't have to explain it."
|
||||
icon_state = "pill16"
|
||||
list_reagents = list("adminordrazine" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/morphine
|
||||
name = "Morphine pill"
|
||||
desc = "Commonly used to treat insomnia."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("morphine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/methamphetamine
|
||||
name = "Methamphetamine pill"
|
||||
desc = "Helps improve the ability to concentrate."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("methamphetamine" = 5)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/haloperidol
|
||||
name = "Haloperidol pill"
|
||||
desc = "Haloperidol is an anti-psychotic use to treat psychiatric problems."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("haloperidol" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/happy
|
||||
name = "Happy pill"
|
||||
desc = "Happy happy joy joy!"
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("space_drugs" = 15, "sugar" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/zoom
|
||||
name = "Zoom pill"
|
||||
desc = "Zoooom!"
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("synaptizine" = 5, "methamphetamine" = 5)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/charcoal
|
||||
name = "Charcoal pill"
|
||||
desc = "Neutralizes many common toxins."
|
||||
icon_state = "pill17"
|
||||
list_reagents = list("charcoal" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/epinephrine
|
||||
name = "Epinephrine pill"
|
||||
desc = "Used to provide shots of adrenaline."
|
||||
icon_state = "pill6"
|
||||
list_reagents = list("epinephrine" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/salicylic
|
||||
name = "Salicylic Acid pill"
|
||||
desc = "Commonly used to treat moderate pain and fevers."
|
||||
icon_state = "pill4"
|
||||
list_reagents = list("sal_acid" = 20)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/salbutamol
|
||||
name = "Salbutamol pill"
|
||||
desc = "Used to treat respiratory distress."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("salbutamol" = 20)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/hydrocodone
|
||||
name = "Hydrocodone pill"
|
||||
desc = "Used to treat extreme pain."
|
||||
icon_state = "pill6"
|
||||
list_reagents = list("hydrocodone" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/calomel
|
||||
name = "calomel pill"
|
||||
desc = "Can be used to purge impurities, but is highly toxic itself."
|
||||
icon_state = "pill3"
|
||||
list_reagents = list("calomel" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/mutadone
|
||||
name = "mutadone pill"
|
||||
desc = "Used to cure genetic abnormalities."
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("mutadone" = 20)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/mannitol
|
||||
name = "mannitol pill"
|
||||
desc = "Used to treat cranial swelling."
|
||||
icon_state = "pill19"
|
||||
list_reagents = list("mannitol" = 20)
|
||||
|
||||
@@ -1,217 +1,217 @@
|
||||
/obj/item/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 = NOBLUDGEON
|
||||
container_type = OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/spray_maxrange = 3 //what the sprayer will set spray_currentrange to in the attack_self.
|
||||
var/spray_currentrange = 3 //the range of tiles the sprayer will reach when in fixed mode.
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 250
|
||||
possible_transfer_amounts = null
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/afterattack(atom/A, mob/user)
|
||||
if(istype(A, /obj/item/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/rack) || istype(A, /obj/structure/closet) \
|
||||
|| istype(A, /obj/item/reagent_containers) || istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart) || istype(A, /obj/machinery/hydroponics))
|
||||
return
|
||||
|
||||
if(istype(A, /obj/effect/proc_holder/spell))
|
||||
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)
|
||||
to_chat(user, "<span class='notice'>[A] is empty.</span>")
|
||||
return
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = A.reagents.trans_to(src, 50) //This is a static amount, otherwise, it'll take forever to fill.
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the contents of [A].</span>")
|
||||
return
|
||||
|
||||
if(reagents.total_volume < amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>[src] is empty!</span>")
|
||||
return
|
||||
|
||||
var/contents_log = reagents.reagent_list.Join(", ")
|
||||
spray(A)
|
||||
|
||||
playsound(loc, 'sound/effects/spray2.ogg', 50, 1, -6)
|
||||
user.changeNext_move(CLICK_CD_RANGE*2)
|
||||
user.newtonian_move(get_dir(A, user))
|
||||
|
||||
if(reagents.reagent_list.len == 1 && reagents.has_reagent("cleaner")) // Only show space cleaner logs if it's burning people from being too hot or cold
|
||||
if(reagents.chem_temp < 300 && reagents.chem_temp > 280) // 280 is the cold threshold for slimes, 300 the hot threshold for drask
|
||||
return
|
||||
|
||||
var/attack_log_type = ATKLOG_MOST
|
||||
if(reagents.has_reagent("sacid") || reagents.has_reagent("facid") || reagents.has_reagent("lube"))
|
||||
attack_log_type = ATKLOG_FEW
|
||||
msg_admin_attack("[key_name_admin(user)] used a spray bottle at [COORD(user)] - Contents: [contents_log] - Temperature: [reagents.chem_temp]K", attack_log_type)
|
||||
log_game("[key_name(user)] used a spray bottle at [COORD(user)] - Contents: [contents_log] - Temperature: [reagents.chem_temp]K")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/proc/spray(var/atom/A)
|
||||
var/obj/effect/decal/chempuff/D = new /obj/effect/decal/chempuff(get_turf(src))
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
reagents.trans_to(D, amount_per_transfer_from_this, 1/spray_currentrange)
|
||||
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
|
||||
spawn(0)
|
||||
for(var/i=0, i<spray_currentrange, i++)
|
||||
step_towards(D,A)
|
||||
D.reagents.reaction(get_turf(D))
|
||||
for(var/atom/T in get_turf(D))
|
||||
D.reagents.reaction(T)
|
||||
sleep(3)
|
||||
qdel(D)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/attack_self(var/mob/user)
|
||||
|
||||
amount_per_transfer_from_this = (amount_per_transfer_from_this == 10 ? 5 : 10)
|
||||
spray_currentrange = (spray_currentrange == 1 ? spray_maxrange : 1)
|
||||
to_chat(user, "<span class='notice'>You [amount_per_transfer_from_this == 10 ? "remove" : "fix"] the nozzle. You'll now use [amount_per_transfer_from_this] units per spray.</span>")
|
||||
|
||||
/obj/item/reagent_containers/spray/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) && user == loc)
|
||||
. += "[round(reagents.total_volume)] units left."
|
||||
|
||||
/obj/item/reagent_containers/spray/verb/empty()
|
||||
|
||||
set name = "Empty Spray Bottle"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
if(alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", "Yes", "No") != "Yes")
|
||||
return
|
||||
if(isturf(usr.loc) && loc == usr)
|
||||
to_chat(usr, "<span class='notice'>You empty [src] onto the floor.</span>")
|
||||
reagents.reaction(usr.loc)
|
||||
reagents.clear_reagents()
|
||||
|
||||
//space cleaner
|
||||
/obj/item/reagent_containers/spray/cleaner
|
||||
name = "space cleaner"
|
||||
desc = "BLAM!-brand non-foaming space cleaner!"
|
||||
list_reagents = list("cleaner" = 250)
|
||||
|
||||
/obj/item/reagent_containers/spray/cleaner/drone
|
||||
name = "space cleaner"
|
||||
desc = "BLAM!-brand non-foaming space cleaner!"
|
||||
volume = 50
|
||||
list_reagents = list("cleaner" = 50)
|
||||
|
||||
//spray tan
|
||||
/obj/item/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/reagent_containers/spray/pepper
|
||||
name = "pepperspray"
|
||||
desc = "Manufactured by UhangInc, used to blind and down an opponent quickly."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "pepperspray"
|
||||
item_state = "pepperspray"
|
||||
volume = 40
|
||||
spray_maxrange = 4
|
||||
amount_per_transfer_from_this = 5
|
||||
list_reagents = list("condensedcapsaicin" = 40)
|
||||
|
||||
//water flower
|
||||
/obj/item/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/reagent_containers/spray/waterflower/attack_self(mob/user) //Don't allow changing how much the flower sprays
|
||||
return
|
||||
|
||||
//chemsprayer
|
||||
/obj/item/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 = WEIGHT_CLASS_NORMAL
|
||||
spray_maxrange = 7
|
||||
spray_currentrange = 7
|
||||
amount_per_transfer_from_this = 10
|
||||
volume = 600
|
||||
origin_tech = "combat=3;materials=3;engineering=3"
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/chemsprayer/spray(var/atom/A)
|
||||
var/Sprays[3]
|
||||
for(var/i=1, i<=3, i++) // intialize sprays
|
||||
if(reagents.total_volume < 1) break
|
||||
var/obj/effect/decal/chempuff/D = new/obj/effect/decal/chempuff(get_turf(src))
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
reagents.trans_to(D, amount_per_transfer_from_this)
|
||||
|
||||
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
|
||||
|
||||
Sprays[i] = D
|
||||
|
||||
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<=Sprays.len, i++)
|
||||
spawn()
|
||||
var/obj/effect/decal/chempuff/D = Sprays[i]
|
||||
if(!D) continue
|
||||
|
||||
// Spreads the sprays a little bit
|
||||
var/turf/my_target = pick(the_targets)
|
||||
the_targets -= my_target
|
||||
|
||||
for(var/j=0, j<=spray_currentrange, j++)
|
||||
step_towards(D, my_target)
|
||||
D.reagents.reaction(get_turf(D))
|
||||
for(var/atom/t in get_turf(D))
|
||||
D.reagents.reaction(t)
|
||||
sleep(2)
|
||||
qdel(D)
|
||||
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/chemsprayer/attack_self(var/mob/user)
|
||||
|
||||
amount_per_transfer_from_this = (amount_per_transfer_from_this == 10 ? 5 : 10)
|
||||
to_chat(user, "<span class='notice'>You adjust the output switch. You'll now use [amount_per_transfer_from_this] units per spray.</span>")
|
||||
|
||||
|
||||
// Plant-B-Gone
|
||||
/obj/item/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("glyphosate" = 100)
|
||||
/obj/item/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 = NOBLUDGEON
|
||||
container_type = OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/spray_maxrange = 3 //what the sprayer will set spray_currentrange to in the attack_self.
|
||||
var/spray_currentrange = 3 //the range of tiles the sprayer will reach when in fixed mode.
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 250
|
||||
possible_transfer_amounts = null
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/afterattack(atom/A, mob/user)
|
||||
if(istype(A, /obj/item/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/rack) || istype(A, /obj/structure/closet) \
|
||||
|| istype(A, /obj/item/reagent_containers) || istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart) || istype(A, /obj/machinery/hydroponics))
|
||||
return
|
||||
|
||||
if(istype(A, /obj/effect/proc_holder/spell))
|
||||
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)
|
||||
to_chat(user, "<span class='notice'>[A] is empty.</span>")
|
||||
return
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = A.reagents.trans_to(src, 50) //This is a static amount, otherwise, it'll take forever to fill.
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the contents of [A].</span>")
|
||||
return
|
||||
|
||||
if(reagents.total_volume < amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>[src] is empty!</span>")
|
||||
return
|
||||
|
||||
var/contents_log = reagents.reagent_list.Join(", ")
|
||||
spray(A)
|
||||
|
||||
playsound(loc, 'sound/effects/spray2.ogg', 50, 1, -6)
|
||||
user.changeNext_move(CLICK_CD_RANGE*2)
|
||||
user.newtonian_move(get_dir(A, user))
|
||||
|
||||
if(reagents.reagent_list.len == 1 && reagents.has_reagent("cleaner")) // Only show space cleaner logs if it's burning people from being too hot or cold
|
||||
if(reagents.chem_temp < 300 && reagents.chem_temp > 280) // 280 is the cold threshold for slimes, 300 the hot threshold for drask
|
||||
return
|
||||
|
||||
var/attack_log_type = ATKLOG_MOST
|
||||
if(reagents.has_reagent("sacid") || reagents.has_reagent("facid") || reagents.has_reagent("lube"))
|
||||
attack_log_type = ATKLOG_FEW
|
||||
msg_admin_attack("[key_name_admin(user)] used a spray bottle at [COORD(user)] - Contents: [contents_log] - Temperature: [reagents.chem_temp]K", attack_log_type)
|
||||
log_game("[key_name(user)] used a spray bottle at [COORD(user)] - Contents: [contents_log] - Temperature: [reagents.chem_temp]K")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/proc/spray(var/atom/A)
|
||||
var/obj/effect/decal/chempuff/D = new /obj/effect/decal/chempuff(get_turf(src))
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
reagents.trans_to(D, amount_per_transfer_from_this, 1/spray_currentrange)
|
||||
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
|
||||
spawn(0)
|
||||
for(var/i=0, i<spray_currentrange, i++)
|
||||
step_towards(D,A)
|
||||
D.reagents.reaction(get_turf(D))
|
||||
for(var/atom/T in get_turf(D))
|
||||
D.reagents.reaction(T)
|
||||
sleep(3)
|
||||
qdel(D)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/attack_self(var/mob/user)
|
||||
|
||||
amount_per_transfer_from_this = (amount_per_transfer_from_this == 10 ? 5 : 10)
|
||||
spray_currentrange = (spray_currentrange == 1 ? spray_maxrange : 1)
|
||||
to_chat(user, "<span class='notice'>You [amount_per_transfer_from_this == 10 ? "remove" : "fix"] the nozzle. You'll now use [amount_per_transfer_from_this] units per spray.</span>")
|
||||
|
||||
/obj/item/reagent_containers/spray/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) && user == loc)
|
||||
. += "[round(reagents.total_volume)] units left."
|
||||
|
||||
/obj/item/reagent_containers/spray/verb/empty()
|
||||
|
||||
set name = "Empty Spray Bottle"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
if(alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", "Yes", "No") != "Yes")
|
||||
return
|
||||
if(isturf(usr.loc) && loc == usr)
|
||||
to_chat(usr, "<span class='notice'>You empty [src] onto the floor.</span>")
|
||||
reagents.reaction(usr.loc)
|
||||
reagents.clear_reagents()
|
||||
|
||||
//space cleaner
|
||||
/obj/item/reagent_containers/spray/cleaner
|
||||
name = "space cleaner"
|
||||
desc = "BLAM!-brand non-foaming space cleaner!"
|
||||
list_reagents = list("cleaner" = 250)
|
||||
|
||||
/obj/item/reagent_containers/spray/cleaner/drone
|
||||
name = "space cleaner"
|
||||
desc = "BLAM!-brand non-foaming space cleaner!"
|
||||
volume = 50
|
||||
list_reagents = list("cleaner" = 50)
|
||||
|
||||
//spray tan
|
||||
/obj/item/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/reagent_containers/spray/pepper
|
||||
name = "pepperspray"
|
||||
desc = "Manufactured by UhangInc, used to blind and down an opponent quickly."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "pepperspray"
|
||||
item_state = "pepperspray"
|
||||
volume = 40
|
||||
spray_maxrange = 4
|
||||
amount_per_transfer_from_this = 5
|
||||
list_reagents = list("condensedcapsaicin" = 40)
|
||||
|
||||
//water flower
|
||||
/obj/item/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/reagent_containers/spray/waterflower/attack_self(mob/user) //Don't allow changing how much the flower sprays
|
||||
return
|
||||
|
||||
//chemsprayer
|
||||
/obj/item/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 = WEIGHT_CLASS_NORMAL
|
||||
spray_maxrange = 7
|
||||
spray_currentrange = 7
|
||||
amount_per_transfer_from_this = 10
|
||||
volume = 600
|
||||
origin_tech = "combat=3;materials=3;engineering=3"
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/chemsprayer/spray(var/atom/A)
|
||||
var/Sprays[3]
|
||||
for(var/i=1, i<=3, i++) // intialize sprays
|
||||
if(reagents.total_volume < 1) break
|
||||
var/obj/effect/decal/chempuff/D = new/obj/effect/decal/chempuff(get_turf(src))
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
reagents.trans_to(D, amount_per_transfer_from_this)
|
||||
|
||||
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
|
||||
|
||||
Sprays[i] = D
|
||||
|
||||
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<=Sprays.len, i++)
|
||||
spawn()
|
||||
var/obj/effect/decal/chempuff/D = Sprays[i]
|
||||
if(!D) continue
|
||||
|
||||
// Spreads the sprays a little bit
|
||||
var/turf/my_target = pick(the_targets)
|
||||
the_targets -= my_target
|
||||
|
||||
for(var/j=0, j<=spray_currentrange, j++)
|
||||
step_towards(D, my_target)
|
||||
D.reagents.reaction(get_turf(D))
|
||||
for(var/atom/t in get_turf(D))
|
||||
D.reagents.reaction(t)
|
||||
sleep(2)
|
||||
qdel(D)
|
||||
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/chemsprayer/attack_self(var/mob/user)
|
||||
|
||||
amount_per_transfer_from_this = (amount_per_transfer_from_this == 10 ? 5 : 10)
|
||||
to_chat(user, "<span class='notice'>You adjust the output switch. You'll now use [amount_per_transfer_from_this] units per spray.</span>")
|
||||
|
||||
|
||||
// Plant-B-Gone
|
||||
/obj/item/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("glyphosate" = 100)
|
||||
|
||||
@@ -1,234 +1,234 @@
|
||||
#define SYRINGE_DRAW 0
|
||||
#define SYRINGE_INJECT 1
|
||||
#define SYRINGE_BROKEN 2
|
||||
|
||||
/obj/item/reagent_containers/syringe
|
||||
name = "Syringe"
|
||||
desc = "A syringe."
|
||||
icon = 'icons/goonstation/objects/syringe.dmi'
|
||||
item_state = "syringe_0"
|
||||
icon_state = "0"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list()
|
||||
volume = 15
|
||||
sharp = TRUE
|
||||
var/busy = FALSE
|
||||
var/mode = SYRINGE_DRAW
|
||||
var/projectile_type = /obj/item/projectile/bullet/dart/syringe
|
||||
materials = list(MAT_METAL=10, MAT_GLASS=20)
|
||||
container_type = TRANSPARENT
|
||||
|
||||
/obj/item/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/reagent_containers/syringe/on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/pickup(mob/user)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/dropped(mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/attack_self(mob/user)
|
||||
mode = !mode
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/attack_hand()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/attack(mob/living/M, mob/living/user, def_zone)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/syringe/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/storage/bag))
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/syringe/afterattack(atom/target, mob/user , proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(!target.reagents)
|
||||
return
|
||||
|
||||
var/mob/living/L
|
||||
if(isliving(target))
|
||||
L = target
|
||||
if(!L.can_inject(user, TRUE))
|
||||
return
|
||||
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
|
||||
if(reagents.holder_full())
|
||||
to_chat(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 = TRUE
|
||||
if(!do_mob(user, target))
|
||||
busy = FALSE
|
||||
return
|
||||
if(reagents.holder_full())
|
||||
return
|
||||
busy = FALSE
|
||||
if(L.transfer_blood_to(src, drawn_amount))
|
||||
user.visible_message("<span class='notice'>[user] takes a blood sample from [L].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You are unable to draw any blood from [L]!</span>")
|
||||
|
||||
else //if not mob
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty!</span>")
|
||||
return
|
||||
|
||||
if(!target.is_drawable(user))
|
||||
to_chat(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?
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the solution. It now contains [reagents.total_volume] units.</span>")
|
||||
if(reagents.holder_full())
|
||||
mode = !mode
|
||||
update_icon()
|
||||
|
||||
if(SYRINGE_INJECT)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>[src] is empty.</span>")
|
||||
return
|
||||
|
||||
if(!L && !target.is_injectable(user)) //only checks on non-living mobs, due to how can_inject() handles
|
||||
to_chat(user, "<span class='warning'>You cannot directly fill [target]!</span>")
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
if(L) //living mob
|
||||
if(!L.can_inject(user, TRUE))
|
||||
return
|
||||
if(L != user)
|
||||
L.visible_message("<span class='danger'>[user] is trying to inject [L]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to inject you!</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)
|
||||
|
||||
add_attack_logs(user, L, "Injected with [name] containing [contained], transfered [amount_per_transfer_from_this] units", reagents.harmless_helper() ? ATKLOG_ALMOSTALL : null)
|
||||
|
||||
var/fraction = min(amount_per_transfer_from_this / reagents.total_volume, 1)
|
||||
reagents.reaction(L, REAGENT_INGEST, fraction)
|
||||
reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(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/reagent_containers/syringe/update_icon()
|
||||
cut_overlays()
|
||||
var/rounded_vol
|
||||
if(reagents && reagents.total_volume)
|
||||
rounded_vol = Clamp(round((reagents.total_volume / volume * 15), 5), 1, 15)
|
||||
var/image/filling_overlay = mutable_appearance('icons/obj/reagentfillings.dmi', "syringe[rounded_vol]")
|
||||
filling_overlay.icon += mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling_overlay)
|
||||
else
|
||||
rounded_vol = 0
|
||||
icon_state = "[rounded_vol]"
|
||||
item_state = "syringe_[rounded_vol]"
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
var/injoverlay
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
injoverlay = "draw"
|
||||
if(SYRINGE_INJECT)
|
||||
injoverlay = "inject"
|
||||
add_overlay(injoverlay)
|
||||
M.update_inv_l_hand()
|
||||
M.update_inv_r_hand()
|
||||
|
||||
/obj/item/reagent_containers/syringe/antiviral
|
||||
name = "Syringe (spaceacillin)"
|
||||
desc = "Contains antiviral agents."
|
||||
list_reagents = list("spaceacillin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/charcoal
|
||||
name = "Syringe (charcoal)"
|
||||
desc = "Contains charcoal - used to treat toxins and damage from toxins."
|
||||
list_reagents = list("charcoal" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/epinephrine
|
||||
name = "Syringe (Epinephrine)"
|
||||
desc = "Contains epinephrine - used to stabilize patients."
|
||||
list_reagents = list("epinephrine" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/insulin
|
||||
name = "Syringe (insulin)"
|
||||
desc = "Contains insulin - used to treat diabetes."
|
||||
list_reagents = list("insulin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/calomel
|
||||
name = "Syringe (calomel)"
|
||||
desc = "Contains calomel, which be used to purge impurities, but is highly toxic itself."
|
||||
list_reagents = list("calomel" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/heparin
|
||||
name = "Syringe (heparin)"
|
||||
desc = "Contains heparin, a blood anticoagulant."
|
||||
list_reagents = list("heparin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/bioterror
|
||||
name = "bioterror syringe"
|
||||
desc = "Contains several paralyzing reagents."
|
||||
list_reagents = list("neurotoxin" = 5, "capulettium_plus" = 5, "sodium_thiopental" = 5)
|
||||
|
||||
/obj/item/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/reagent_containers/syringe/capulettium_plus
|
||||
name = "capulettium plus syringe"
|
||||
desc = "For silencing targets. Allows for fake deaths."
|
||||
list_reagents = list("capulettium_plus" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/sarin
|
||||
name = "sarin syringe"
|
||||
desc = "A deadly neurotoxin, for killing."
|
||||
list_reagents = list("sarin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/pancuronium
|
||||
name = "pancuronium syringe"
|
||||
desc = "A powerful paralyzing poison."
|
||||
list_reagents = list("pancuronium" = 15)
|
||||
|
||||
/obj/item/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
|
||||
list_reagents = list("toxin" = 15, "pancuronium" = 10, "cyanide" = 5, "facid" = 10, "fluorine" = 10)
|
||||
#define SYRINGE_DRAW 0
|
||||
#define SYRINGE_INJECT 1
|
||||
#define SYRINGE_BROKEN 2
|
||||
|
||||
/obj/item/reagent_containers/syringe
|
||||
name = "Syringe"
|
||||
desc = "A syringe."
|
||||
icon = 'icons/goonstation/objects/syringe.dmi'
|
||||
item_state = "syringe_0"
|
||||
icon_state = "0"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list()
|
||||
volume = 15
|
||||
sharp = TRUE
|
||||
var/busy = FALSE
|
||||
var/mode = SYRINGE_DRAW
|
||||
var/projectile_type = /obj/item/projectile/bullet/dart/syringe
|
||||
materials = list(MAT_METAL=10, MAT_GLASS=20)
|
||||
container_type = TRANSPARENT
|
||||
|
||||
/obj/item/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/reagent_containers/syringe/on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/pickup(mob/user)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/dropped(mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/attack_self(mob/user)
|
||||
mode = !mode
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/attack_hand()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/attack(mob/living/M, mob/living/user, def_zone)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/syringe/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/storage/bag))
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/syringe/afterattack(atom/target, mob/user , proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(!target.reagents)
|
||||
return
|
||||
|
||||
var/mob/living/L
|
||||
if(isliving(target))
|
||||
L = target
|
||||
if(!L.can_inject(user, TRUE))
|
||||
return
|
||||
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
|
||||
if(reagents.holder_full())
|
||||
to_chat(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 = TRUE
|
||||
if(!do_mob(user, target))
|
||||
busy = FALSE
|
||||
return
|
||||
if(reagents.holder_full())
|
||||
return
|
||||
busy = FALSE
|
||||
if(L.transfer_blood_to(src, drawn_amount))
|
||||
user.visible_message("<span class='notice'>[user] takes a blood sample from [L].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You are unable to draw any blood from [L]!</span>")
|
||||
|
||||
else //if not mob
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty!</span>")
|
||||
return
|
||||
|
||||
if(!target.is_drawable(user))
|
||||
to_chat(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?
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the solution. It now contains [reagents.total_volume] units.</span>")
|
||||
if(reagents.holder_full())
|
||||
mode = !mode
|
||||
update_icon()
|
||||
|
||||
if(SYRINGE_INJECT)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>[src] is empty.</span>")
|
||||
return
|
||||
|
||||
if(!L && !target.is_injectable(user)) //only checks on non-living mobs, due to how can_inject() handles
|
||||
to_chat(user, "<span class='warning'>You cannot directly fill [target]!</span>")
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
if(L) //living mob
|
||||
if(!L.can_inject(user, TRUE))
|
||||
return
|
||||
if(L != user)
|
||||
L.visible_message("<span class='danger'>[user] is trying to inject [L]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to inject you!</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)
|
||||
|
||||
add_attack_logs(user, L, "Injected with [name] containing [contained], transfered [amount_per_transfer_from_this] units", reagents.harmless_helper() ? ATKLOG_ALMOSTALL : null)
|
||||
|
||||
var/fraction = min(amount_per_transfer_from_this / reagents.total_volume, 1)
|
||||
reagents.reaction(L, REAGENT_INGEST, fraction)
|
||||
reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(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/reagent_containers/syringe/update_icon()
|
||||
cut_overlays()
|
||||
var/rounded_vol
|
||||
if(reagents && reagents.total_volume)
|
||||
rounded_vol = Clamp(round((reagents.total_volume / volume * 15), 5), 1, 15)
|
||||
var/image/filling_overlay = mutable_appearance('icons/obj/reagentfillings.dmi', "syringe[rounded_vol]")
|
||||
filling_overlay.icon += mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling_overlay)
|
||||
else
|
||||
rounded_vol = 0
|
||||
icon_state = "[rounded_vol]"
|
||||
item_state = "syringe_[rounded_vol]"
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
var/injoverlay
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
injoverlay = "draw"
|
||||
if(SYRINGE_INJECT)
|
||||
injoverlay = "inject"
|
||||
add_overlay(injoverlay)
|
||||
M.update_inv_l_hand()
|
||||
M.update_inv_r_hand()
|
||||
|
||||
/obj/item/reagent_containers/syringe/antiviral
|
||||
name = "Syringe (spaceacillin)"
|
||||
desc = "Contains antiviral agents."
|
||||
list_reagents = list("spaceacillin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/charcoal
|
||||
name = "Syringe (charcoal)"
|
||||
desc = "Contains charcoal - used to treat toxins and damage from toxins."
|
||||
list_reagents = list("charcoal" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/epinephrine
|
||||
name = "Syringe (Epinephrine)"
|
||||
desc = "Contains epinephrine - used to stabilize patients."
|
||||
list_reagents = list("epinephrine" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/insulin
|
||||
name = "Syringe (insulin)"
|
||||
desc = "Contains insulin - used to treat diabetes."
|
||||
list_reagents = list("insulin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/calomel
|
||||
name = "Syringe (calomel)"
|
||||
desc = "Contains calomel, which be used to purge impurities, but is highly toxic itself."
|
||||
list_reagents = list("calomel" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/heparin
|
||||
name = "Syringe (heparin)"
|
||||
desc = "Contains heparin, a blood anticoagulant."
|
||||
list_reagents = list("heparin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/bioterror
|
||||
name = "bioterror syringe"
|
||||
desc = "Contains several paralyzing reagents."
|
||||
list_reagents = list("neurotoxin" = 5, "capulettium_plus" = 5, "sodium_thiopental" = 5)
|
||||
|
||||
/obj/item/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/reagent_containers/syringe/capulettium_plus
|
||||
name = "capulettium plus syringe"
|
||||
desc = "For silencing targets. Allows for fake deaths."
|
||||
list_reagents = list("capulettium_plus" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/sarin
|
||||
name = "sarin syringe"
|
||||
desc = "A deadly neurotoxin, for killing."
|
||||
list_reagents = list("sarin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/pancuronium
|
||||
name = "pancuronium syringe"
|
||||
desc = "A powerful paralyzing poison."
|
||||
list_reagents = list("pancuronium" = 15)
|
||||
|
||||
/obj/item/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
|
||||
list_reagents = list("toxin" = 15, "pancuronium" = 10, "cyanide" = 5, "facid" = 10, "fluorine" = 10)
|
||||
|
||||
Reference in New Issue
Block a user