diff --git a/code/_globalvars/lists/reagents.dm b/code/_globalvars/lists/reagents.dm index 20620d60800..abd878ff936 100644 --- a/code/_globalvars/lists/reagents.dm +++ b/code/_globalvars/lists/reagents.dm @@ -64,3 +64,5 @@ GLOBAL_LIST_INIT(safe_chem_list, list("antihol", "charcoal", "epinephrine", "ins "omnizine", "stimulants", "synaptizine", "potass_iodide", "oculine", "mannitol", "styptic_powder", "spaceacillin", "salglu_solution", "sal_acid", "cryoxadone", "blood", "synthflesh", "hydrocodone", "mitocholide", "rezadone")) + +GLOBAL_LIST_INIT(safe_chem_applicator_list, list("silver_sulfadiazine", "styptic_powder", "synthflesh")) diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm index 259afa12c9e..2d1b091a10d 100644 --- a/code/game/jobs/job/medical.dm +++ b/code/game/jobs/job/medical.dm @@ -30,7 +30,7 @@ l_ear = /obj/item/radio/headset/heads/cmo id = /obj/item/card/id/cmo suit_store = /obj/item/flashlight/pen - l_hand = /obj/item/storage/firstaid/adv + l_hand = /obj/item/storage/firstaid/doctor pda = /obj/item/pda/heads/cmo backpack_contents = list( /obj/item/melee/classic_baton/telescopic = 1 @@ -68,7 +68,7 @@ l_ear = /obj/item/radio/headset/headset_med id = /obj/item/card/id/medical suit_store = /obj/item/flashlight/pen - l_hand = /obj/item/storage/firstaid/adv + l_hand = /obj/item/storage/firstaid/doctor pda = /obj/item/pda/medical backpack = /obj/item/storage/backpack/medic @@ -315,4 +315,3 @@ satchel = /obj/item/storage/backpack/satchel_med dufflebag = /obj/item/storage/backpack/duffel/medical box = /obj/item/storage/box/engineer - diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index 64e69e89765..a32656598df 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -217,7 +217,7 @@ glasses = /obj/item/clothing/glasses/hud/health/sunglasses id = /obj/item/card/id/security suit_store = /obj/item/flashlight/pen - l_hand = /obj/item/storage/firstaid/adv + l_hand = /obj/item/storage/firstaid/doctor pda = /obj/item/pda/medical implants = list(/obj/item/implant/mindshield) backpack = /obj/item/storage/backpack/medic diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index e3b1322f34b..6813333033c 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -1172,7 +1172,7 @@ icon_deny = "med-deny" product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?;Ping!" req_access_txt = "5" - products = list(/obj/item/reagent_containers/syringe = 12, /obj/item/reagent_containers/food/pill/patch/styptic = 10, /obj/item/reagent_containers/food/pill/patch/silver_sulf = 10, + products = list(/obj/item/reagent_containers/syringe = 12, /obj/item/reagent_containers/food/pill/patch/styptic = 4, /obj/item/reagent_containers/food/pill/patch/silver_sulf = 4, /obj/item/reagent_containers/applicator/brute = 3, /obj/item/reagent_containers/applicator/burn = 3, /obj/item/reagent_containers/glass/bottle/charcoal = 4, /obj/item/reagent_containers/glass/bottle/epinephrine = 4, /obj/item/reagent_containers/glass/bottle/diphenhydramine = 4, /obj/item/reagent_containers/glass/bottle/salicylic = 4, /obj/item/reagent_containers/glass/bottle/potassium_iodide =3, /obj/item/reagent_containers/glass/bottle/saline = 5, /obj/item/reagent_containers/glass/bottle/morphine = 4, /obj/item/reagent_containers/glass/bottle/ether = 4, /obj/item/reagent_containers/glass/bottle/atropine = 3, diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 755b0076c3c..403088e2b71 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -134,7 +134,8 @@ /obj/item/rad_laser, /obj/item/sensor_device, /obj/item/wrench/medical, - /obj/item/handheld_defibrillator + /obj/item/handheld_defibrillator, + /obj/item/reagent_containers/applicator ) /obj/item/storage/belt/medical/surgery diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm index a9da4a69241..4ff769a7d3f 100644 --- a/code/game/objects/items/weapons/storage/firstaid.dm +++ b/code/game/objects/items/weapons/storage/firstaid.dm @@ -14,7 +14,7 @@ icon_state = "firstaid" throw_speed = 2 throw_range = 8 - var/empty = 0 + var/empty = FALSE req_one_access =list(ACCESS_MEDICAL, ACCESS_ROBOTICS) //Access and treatment are utilized for medbots. var/treatment_brute = "salglu_solution" var/treatment_oxy = "salbutamol" @@ -33,39 +33,51 @@ item_state = "firstaid-ointment" med_bot_skin = "ointment" - New() - ..() - if(empty) return - - icon_state = pick("ointment","firefirstaid") - - new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src ) - new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src ) - new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src ) - new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src ) - new /obj/item/healthanalyzer( src ) - new /obj/item/reagent_containers/hypospray/autoinjector( src ) - new /obj/item/reagent_containers/food/pill/salicylic( src ) +/obj/item/storage/firstaid/fire/New() + ..() + if(empty) return + icon_state = pick("ointment", "firefirstaid") + new /obj/item/reagent_containers/applicator/burn(src) + new /obj/item/reagent_containers/food/pill/patch/silver_sulf/small(src) + new /obj/item/healthanalyzer(src) + new /obj/item/reagent_containers/hypospray/autoinjector(src) + new /obj/item/reagent_containers/food/pill/salicylic(src) /obj/item/storage/firstaid/fire/empty - empty = 1 + empty = TRUE /obj/item/storage/firstaid/regular desc = "A general medical kit that contains medical patches for both brute damage and burn damage. Also contains an epinephrine syringe for emergency use and a health analyzer" icon_state = "firstaid" - New() - ..() - if(empty) return - new /obj/item/reagent_containers/food/pill/patch/styptic( src ) - new /obj/item/reagent_containers/food/pill/patch/styptic( src ) - new /obj/item/reagent_containers/food/pill/salicylic( src ) - new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src ) - new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src ) - new /obj/item/healthanalyzer( src ) - new /obj/item/reagent_containers/hypospray/autoinjector( src ) +/obj/item/storage/firstaid/regular/New() + ..() + if(empty) return + new /obj/item/reagent_containers/food/pill/patch/styptic(src) + new /obj/item/reagent_containers/food/pill/patch/styptic(src) + new /obj/item/reagent_containers/food/pill/salicylic(src) + new /obj/item/reagent_containers/food/pill/patch/silver_sulf(src) + new /obj/item/reagent_containers/food/pill/patch/silver_sulf(src) + new /obj/item/healthanalyzer(src) + new /obj/item/reagent_containers/hypospray/autoinjector(src) + +/obj/item/storage/firstaid/doctor + desc = "A general medical kit that contains medical patches for both brute damage and burn damage. Also contains an epinephrine syringe for emergency use and a health analyzer" + icon_state = "firstaid" + +/obj/item/storage/firstaid/doctor/New() + ..() + if(empty) + return + new /obj/item/reagent_containers/applicator/brute(src) + new /obj/item/reagent_containers/applicator/burn(src) + new /obj/item/reagent_containers/food/pill/patch/styptic(src) + new /obj/item/reagent_containers/food/pill/patch/silver_sulf(src) + new /obj/item/reagent_containers/food/pill/salicylic(src) + new /obj/item/healthanalyzer/advanced(src) + new /obj/item/reagent_containers/hypospray/autoinjector(src) /obj/item/storage/firstaid/toxin name = "toxin first aid kit" @@ -74,23 +86,21 @@ item_state = "firstaid-toxin" med_bot_skin = "tox" - New() - ..() - if(empty) return - - icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3") - - new /obj/item/reagent_containers/syringe/charcoal( src ) - new /obj/item/reagent_containers/syringe/charcoal( src ) - new /obj/item/reagent_containers/syringe/charcoal( src ) - new /obj/item/reagent_containers/food/pill/charcoal( src ) - new /obj/item/reagent_containers/food/pill/charcoal( src ) - new /obj/item/reagent_containers/food/pill/charcoal( src ) - new /obj/item/healthanalyzer( src ) +/obj/item/storage/firstaid/toxin/New() + ..() + if(empty) return + icon_state = pick("antitoxin", "antitoxfirstaid", "antitoxfirstaid2", "antitoxfirstaid3") + new /obj/item/reagent_containers/syringe/charcoal(src) + new /obj/item/reagent_containers/syringe/charcoal(src) + new /obj/item/reagent_containers/syringe/charcoal(src) + new /obj/item/reagent_containers/food/pill/charcoal(src) + new /obj/item/reagent_containers/food/pill/charcoal(src) + new /obj/item/reagent_containers/food/pill/charcoal(src) + new /obj/item/healthanalyzer(src) /obj/item/storage/firstaid/toxin/empty - empty = 1 + empty = TRUE /obj/item/storage/firstaid/o2 name = "oxygen deprivation first aid kit" @@ -99,18 +109,18 @@ item_state = "firstaid-o2" med_bot_skin = "o2" - New() - ..() - if(empty) return - new /obj/item/reagent_containers/food/pill/salbutamol( src ) - new /obj/item/reagent_containers/food/pill/salbutamol( src ) - new /obj/item/reagent_containers/food/pill/salbutamol( src ) - new /obj/item/reagent_containers/food/pill/salbutamol( src ) - new /obj/item/healthanalyzer( src ) +/obj/item/storage/firstaid/o2/New() + ..() + if(empty) return + new /obj/item/reagent_containers/food/pill/salbutamol(src) + new /obj/item/reagent_containers/food/pill/salbutamol(src) + new /obj/item/reagent_containers/food/pill/salbutamol(src) + new /obj/item/reagent_containers/food/pill/salbutamol(src) + new /obj/item/healthanalyzer(src) /obj/item/storage/firstaid/o2/empty - empty = 1 + empty = TRUE /obj/item/storage/firstaid/brute name = "brute trauma treatment kit" @@ -119,23 +129,19 @@ item_state = "firstaid-brute" med_bot_skin = "brute" - New() - ..() - if(empty) return - - icon_state = pick("brute","brute2") - - new /obj/item/reagent_containers/food/pill/patch/styptic(src) - new /obj/item/reagent_containers/food/pill/patch/styptic(src) - new /obj/item/reagent_containers/food/pill/patch/styptic(src) - new /obj/item/reagent_containers/food/pill/patch/styptic(src) - new /obj/item/healthanalyzer(src) - new /obj/item/reagent_containers/hypospray/autoinjector(src) - new /obj/item/stack/medical/bruise_pack(src) +/obj/item/storage/firstaid/brute/New() + ..() + if(empty) return + icon_state = pick("brute", "brute2") + new /obj/item/reagent_containers/applicator/brute(src) + new /obj/item/reagent_containers/food/pill/patch/styptic/small(src) + new /obj/item/healthanalyzer(src) + new /obj/item/reagent_containers/hypospray/autoinjector(src) + new /obj/item/stack/medical/bruise_pack(src) /obj/item/storage/firstaid/brute/empty - empty = 1 + empty = TRUE /obj/item/storage/firstaid/adv name = "advanced first-aid kit" @@ -157,7 +163,7 @@ new /obj/item/healthanalyzer(src) /obj/item/storage/firstaid/adv/empty - empty = 1 + empty = TRUE /obj/item/storage/firstaid/machine name = "machine repair kit" @@ -178,7 +184,7 @@ new /obj/item/robotanalyzer(src) /obj/item/storage/firstaid/machine/empty - empty = 1 + empty = TRUE /obj/item/storage/firstaid/tactical @@ -196,18 +202,15 @@ /obj/item/storage/firstaid/tactical/New() ..() - if(empty) return + if(empty) + return new /obj/item/reagent_containers/hypospray/combat(src) - new /obj/item/reagent_containers/food/pill/patch/synthflesh(src) // Because you ain't got no time to look at what damage dey taking yo - new /obj/item/reagent_containers/food/pill/patch/synthflesh(src) - new /obj/item/reagent_containers/food/pill/patch/synthflesh(src) - new /obj/item/reagent_containers/food/pill/patch/synthflesh(src) + new /obj/item/reagent_containers/applicator/dual(src) // Because you ain't got no time to look at what damage dey taking yo new /obj/item/defibrillator/compact/combat/loaded(src) new /obj/item/clothing/glasses/hud/health/night(src) - return /obj/item/storage/firstaid/tactical/empty - empty =1 + empty = TRUE /obj/item/storage/firstaid/surgery name = "field surgery kit" @@ -347,15 +350,15 @@ desc = "Contains pills used to counter toxins." wrapper_color = COLOR_GREEN - New() - ..() - new /obj/item/reagent_containers/food/pill/charcoal( src ) - new /obj/item/reagent_containers/food/pill/charcoal( src ) - new /obj/item/reagent_containers/food/pill/charcoal( src ) - new /obj/item/reagent_containers/food/pill/charcoal( src ) - new /obj/item/reagent_containers/food/pill/charcoal( src ) - new /obj/item/reagent_containers/food/pill/charcoal( src ) - new /obj/item/reagent_containers/food/pill/charcoal( src ) +/obj/item/storage/pill_bottle/charcoal/New() + ..() + new /obj/item/reagent_containers/food/pill/charcoal(src) + new /obj/item/reagent_containers/food/pill/charcoal(src) + new /obj/item/reagent_containers/food/pill/charcoal(src) + new /obj/item/reagent_containers/food/pill/charcoal(src) + new /obj/item/reagent_containers/food/pill/charcoal(src) + new /obj/item/reagent_containers/food/pill/charcoal(src) + new /obj/item/reagent_containers/food/pill/charcoal(src) /obj/item/storage/pill_bottle/painkillers name = "Pill Bottle (Salicylic Acid)" diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index bcb71edf356..d926730942e 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -7,7 +7,7 @@ desc = "A hazard vest used in the recovery of bodies." icon_state = "paramedic-vest" item_state = "paramedic-vest" - allowed = list(/obj/item/stack/medical, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/syringe, \ + allowed = list(/obj/item/stack/medical, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator, /obj/item/reagent_containers/syringe, /obj/item/healthanalyzer, /obj/item/flashlight, /obj/item/radio, /obj/item/tank/emergency_oxygen,/obj/item/rad_laser) armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 10, fire = 50, acid = 50) @@ -21,7 +21,7 @@ desc = "A vest often worn by doctors caring for inmates." icon_state = "brigphysician-vest" item_state = "brigphysician-vest" - allowed = list(/obj/item/stack/medical, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/syringe, \ + allowed = list(/obj/item/stack/medical, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator, /obj/item/reagent_containers/syringe, /obj/item/healthanalyzer, /obj/item/flashlight, \ /obj/item/radio, /obj/item/tank/emergency_oxygen,/obj/item/rad_laser) armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0, fire = 50, acid = 50) @@ -341,7 +341,7 @@ icon_state = "fr_jacket_open" item_state = "fr_jacket_open" blood_overlay_type = "armor" - allowed = list(/obj/item/stack/medical, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/syringe, \ + allowed = list(/obj/item/stack/medical, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator, /obj/item/reagent_containers/syringe, /obj/item/healthanalyzer, /obj/item/flashlight, /obj/item/radio, /obj/item/tank/emergency_oxygen,/obj/item/rad_laser) ignore_suitadjust = 0 suit_adjusted = 1 @@ -381,5 +381,5 @@ desc = "A tweed mantle, worn by the Research Director. Smells like science." icon_state = "rdmantle" item_state = "rdmantle" - allowed = list(/obj/item/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/healthanalyzer, /obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/food/pill, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/rad_laser) + allowed = list(/obj/item/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator, /obj/item/healthanalyzer, /obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/food/pill, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/rad_laser) armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 50, rad = 0, fire = 50, acid = 50) diff --git a/code/modules/clothing/suits/labcoat.dm b/code/modules/clothing/suits/labcoat.dm index 03df1bd74d8..5281a32676e 100644 --- a/code/modules/clothing/suits/labcoat.dm +++ b/code/modules/clothing/suits/labcoat.dm @@ -7,7 +7,7 @@ suit_adjusted = 1 blood_overlay_type = "coat" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - allowed = list(/obj/item/analyzer,/obj/item/stack/medical,/obj/item/dnainjector,/obj/item/reagent_containers/dropper,/obj/item/reagent_containers/syringe,/obj/item/reagent_containers/hypospray,/obj/item/healthanalyzer,/obj/item/flashlight/pen,/obj/item/reagent_containers/glass/bottle,/obj/item/reagent_containers/glass/beaker,/obj/item/reagent_containers/food/pill,/obj/item/storage/pill_bottle,/obj/item/paper,/obj/item/rad_laser) + allowed = list(/obj/item/analyzer,/obj/item/stack/medical,/obj/item/dnainjector,/obj/item/reagent_containers/dropper,/obj/item/reagent_containers/syringe,/obj/item/reagent_containers/hypospray,/obj/item/reagent_containers/applicator,/obj/item/healthanalyzer,/obj/item/flashlight/pen,/obj/item/reagent_containers/glass/bottle,/obj/item/reagent_containers/glass/beaker,/obj/item/reagent_containers/food/pill,/obj/item/storage/pill_bottle,/obj/item/paper,/obj/item/rad_laser) armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 50, "rad" = 0, "fire" = 50, "acid" = 50) species_exception = list(/datum/species/golem) sprite_sheets = list( diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index cd137f6e12b..2e2dc76fb97 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -394,7 +394,7 @@ name = "medical winter coat" icon_state = "wintercoat_med" item_state = "coatmedical" - allowed = list(/obj/item/analyzer, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/healthanalyzer,/obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic) + allowed = list(/obj/item/analyzer, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator,/obj/item/healthanalyzer,/obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic) armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 50, "rad" = 0, "fire" = 0, "acid" = 45) hoodtype = /obj/item/clothing/head/hooded/winterhood/medical @@ -405,7 +405,7 @@ name = "science winter coat" icon_state = "wintercoat_sci" item_state = "coatscience" - allowed = list(/obj/item/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/healthanalyzer,/obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic) + allowed = list(/obj/item/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator,/obj/item/healthanalyzer,/obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic) armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 0, rad = 0, fire = 0, acid = 0) hoodtype = /obj/item/clothing/head/hooded/winterhood/science diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index c4cd95eeb83..9552477e210 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -9,12 +9,18 @@ qdel(item) QDEL_LIST(internal_organs) QDEL_LIST(stomach_contents) + QDEL_LIST(processing_patches) var/mob/living/simple_animal/borer/B = has_brain_worms() if(B) B.leave_host() qdel(B) return ..() +/mob/living/carbon/handle_atom_del(atom/A) + if(A in processing_patches) + processing_patches -= A + return ..() + /mob/living/carbon/blob_act(obj/structure/blob/B) if(stat == DEAD) return @@ -1073,8 +1079,9 @@ so that different stomachs can handle things in different ways VB*/ if(can_taste_container) taste(toEat.reagents) var/fraction = min(this_bite/toEat.reagents.total_volume, 1) - toEat.reagents.reaction(src, toEat.apply_type, fraction) - toEat.reagents.trans_to(src, this_bite*toEat.transfer_efficiency) + if(fraction) + toEat.reagents.reaction(src, toEat.apply_type, fraction) + toEat.reagents.trans_to(src, this_bite*toEat.transfer_efficiency) /mob/living/carbon/get_access() . = ..() diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 884ee802518..97ecf4dd08b 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -2,6 +2,7 @@ gender = MALE pressure_resistance = 15 var/list/stomach_contents = list() + var/list/processing_patches = list() var/list/internal_organs = list() var/list/internal_organs_slot = list() //Same as above, but stores "slot ID" - "organ" pairs for easy access. var/antibodies = 0 diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 832260d3090..87832154876 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -13,6 +13,7 @@ for(var/obj/item/organ/internal/O in internal_organs) O.on_life() + handle_patches() handle_changeling() handle_wetness(times_fired) @@ -438,3 +439,22 @@ overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity) else clear_fullscreen("brute") + +/mob/living/carbon/proc/handle_patches() + if(LAZYLEN(processing_patches)) + var/multiple_patch_multiplier = processing_patches.len > 1 ? (processing_patches.len * 1.5) : 1 + var/applied_amount = 0.35 * multiple_patch_multiplier + + for(var/patch in processing_patches) + var/obj/item/reagent_containers/food/pill/patch/P = patch + + if(P.reagents && P.reagents.total_volume) + var/fractional_applied_amount = applied_amount / P.reagents.total_volume + P.reagents.reaction(src, REAGENT_TOUCH, fractional_applied_amount, P.needs_to_apply_reagents) + P.needs_to_apply_reagents = FALSE + P.reagents.trans_to(src, applied_amount * 0.5) + P.reagents.remove_any(applied_amount * 0.5) + else + if(!P.reagents || P.reagents.total_volume <= 0) + processing_patches -= P + qdel(P) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 4b2e39fee35..8371cacaebe 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -406,6 +406,8 @@ QDEL_LIST(C.reagents.addiction_list) C.reagents.addiction_threshold_accumulated.Cut() + QDEL_LIST(C.processing_patches) + // rejuvenate: Called by `revive` to get the mob into a revivable state // the admin "rejuvenate" command calls `revive`, not this proc. /mob/living/proc/rejuvenate() diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index ddd78b2018f..9afcd5607fa 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -8,13 +8,19 @@ var/maximum_volume = 100 var/atom/my_atom = null var/chem_temp = T20C + var/temperature_min = 0 + var/temperature_max = 10000 var/list/datum/reagent/addiction_list = new/list() var/list/addiction_threshold_accumulated = new/list() var/flags var/list/reagents_generated_per_cycle = new/list() -/datum/reagents/New(maximum = 100) +/datum/reagents/New(maximum = 100, min_temp, max_temp) maximum_volume = maximum + if(min_temp) + temperature_min = min_temp + if(max_temp) + temperature_max = max_temp if(!(flags & REAGENT_NOREACT)) START_PROCESSING(SSobj, src) //I dislike having these here but map-objects are initialised before world/New() is called. >_> @@ -179,7 +185,7 @@ return amount /datum/reagents/proc/set_reagent_temp(new_temp = T0C, react = TRUE) - chem_temp = new_temp + chem_temp = Clamp(new_temp, temperature_max, temperature_min) if(react) temperature_react() handle_reactions() @@ -197,7 +203,7 @@ else if(exposed_temperature < chem_temp) chem_temp -= change - chem_temp = max(min(chem_temp, 10000), 0) //Cap for the moment. + chem_temp = max(min(chem_temp, temperature_max), temperature_min) //Cap for the moment. temperature_react() handle_reactions() @@ -569,7 +575,7 @@ can_process = 1 return can_process -/datum/reagents/proc/reaction(atom/A, method = REAGENT_TOUCH, volume_modifier = 1) +/datum/reagents/proc/reaction(atom/A, method = REAGENT_TOUCH, volume_modifier = 1, show_message = TRUE) var/react_type if(isliving(A)) react_type = "LIVING" @@ -614,7 +620,7 @@ var/check = reaction_check(A, R) if(!check) continue - R.reaction_mob(A, method, R.volume * volume_modifier) + R.reaction_mob(A, method, R.volume * volume_modifier, show_message) if("TURF") R.reaction_turf(A, R.volume * volume_modifier) if("OBJ") @@ -632,7 +638,7 @@ if(total_volume + amount > maximum_volume) amount = (maximum_volume - total_volume) //Doesnt fit in. Make it disappear. Shouldnt happen. Will happen. if(amount <= 0) return 0 - chem_temp = (chem_temp * total_volume + reagtemp * amount) / (total_volume + amount) //equalize with new chems + chem_temp = Clamp((chem_temp * total_volume + reagtemp * amount) / (total_volume + amount), temperature_min, temperature_max) //equalize with new chems for(var/A in reagent_list) @@ -870,8 +876,8 @@ // Convenience proc to create a reagents holder for an atom // Max vol is maximum volume of holder -/atom/proc/create_reagents(max_vol) - reagents = new/datum/reagents(max_vol) +/atom/proc/create_reagents(max_vol, min_temp, max_temp) + reagents = new /datum/reagents(max_vol, min_temp, max_temp) reagents.my_atom = src /proc/get_random_reagent_id() // Returns a random reagent ID minus blacklisted reagents diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 435a253bed5..cf7ff936b6d 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -347,8 +347,8 @@ if(count > 20) count = 20 //Pevent people from creating huge stacks of patches easily. Maybe move the number to defines? var/amount_per_patch = reagents.total_volume/count - if(amount_per_patch > 40) - amount_per_patch = 40 + if(amount_per_patch > 30) + amount_per_patch = 30 var/name = clean_input("Name:", "Name your patch!", "[reagents.get_master_reagent_name()] ([amount_per_patch]u)") if(!name) return diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm index 4271b26ba17..8cdb69062ff 100644 --- a/code/modules/reagents/chemistry/reagents.dm +++ b/code/modules/reagents/chemistry/reagents.dm @@ -43,7 +43,7 @@ /datum/reagent/proc/reaction_temperature(exposed_temperature, exposed_volume) //By default we do nothing. return -/datum/reagent/proc/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume) //Some reagents transfer on touch, others don't; dependent on if they penetrate the skin or not. +/datum/reagent/proc/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume, show_message = TRUE) //Some reagents transfer on touch, others don't; dependent on if they penetrate the skin or not. if(holder) //for catching rare runtimes if(method == REAGENT_TOUCH && penetrates_skin) var/block = M.get_permeability_protection() diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm index c9e7ac0c1dc..567a1a4d92d 100644 --- a/code/modules/reagents/chemistry/reagents/medicine.dm +++ b/code/modules/reagents/chemistry/reagents/medicine.dm @@ -178,7 +178,7 @@ id = "silver_sulfadiazine" description = "This antibacterial compound is used to treat burn victims." reagent_state = LIQUID - color = "#F0C814" + color = "#F0DC00" metabolization_rate = 3 harmless = FALSE //toxic if ingested, and I am NOT going to account for the difference taste_description = "burn cream" @@ -205,7 +205,7 @@ id = "styptic_powder" description = "Styptic (aluminum sulfate) powder helps control bleeding and heal physical wounds." reagent_state = LIQUID - color = "#C8A5DC" + color = "#FF9696" metabolization_rate = 3 harmless = FALSE taste_description = "wound cream" @@ -221,7 +221,7 @@ M.adjustBruteLoss(-volume) if(show_message) to_chat(M, "The styptic powder stings like hell as it closes some of your wounds!") - M.emote("scream") + M.emote("scream") if(method == REAGENT_INGEST) M.adjustToxLoss(0.5*volume) if(show_message) diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index db65f761e2e..a091f65a34c 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -11,6 +11,8 @@ var/spawned_disease = null var/disease_amount = 20 var/has_lid = FALSE // Used for containers where we want to put lids on and off + var/temperature_min = 0 // To limit the temperature of a reagent container can atain when exposed to heat/cold + var/temperature_max = 10000 /obj/item/reagent_containers/verb/set_APTFT() //set amount_per_transfer_from_this set name = "Set transfer amount" @@ -30,7 +32,7 @@ ..() if(!possible_transfer_amounts) verbs -= /obj/item/reagent_containers/verb/set_APTFT - create_reagents(volume) + create_reagents(volume, temperature_min, temperature_max) if(spawned_disease) var/datum/disease/F = new spawned_disease(0) var/list/data = list("viruses" = list(F), "blood_color" = "#A10808") diff --git a/code/modules/reagents/reagent_containers/applicator.dm b/code/modules/reagents/reagent_containers/applicator.dm new file mode 100644 index 00000000000..dfa59c941ac --- /dev/null +++ b/code/modules/reagents/reagent_containers/applicator.dm @@ -0,0 +1,106 @@ +/obj/item/reagent_containers/applicator + name = "auto-mender" + desc = "A small electronic device designed to topically apply healing chemicals." + icon = 'icons/goonstation/objects/objects.dmi' + icon_state = "mender" + item_state = "mender" + volume = 200 + resistance_flags = ACID_PROOF + container_type = REFILLABLE | AMOUNT_VISIBLE + temperature_min = 270 + temperature_max = 350 + var/ignore_flags = FALSE + var/emagged = FALSE + var/applied_amount = 8 // How much it applies + var/applying = FALSE // So it can't be spammed. + var/measured_health = 0 // Used for measuring health; we don't want this to stop applying once the person's health isn't changing. + +/obj/item/reagent_containers/applicator/emag_act(mob/user) + if(!emagged) + emagged = TRUE + ignore_flags = TRUE + to_chat(user, "You short out the safeties on [src].") + +/obj/item/reagent_containers/applicator/on_reagent_change() + if(!emagged) + var/found_forbidden_reagent = FALSE + for(var/datum/reagent/R in reagents.reagent_list) + if(!GLOB.safe_chem_applicator_list.Find(R.id)) + reagents.del_reagent(R.id) + found_forbidden_reagent = TRUE + if(found_forbidden_reagent) + if(ismob(loc)) + to_chat(loc, "[src] identifies and removes a harmful substance.") + else + visible_message("[src] identifies and removes a harmful substance.") + update_icon() + +/obj/item/reagent_containers/applicator/update_icon() + cut_overlays() + + if(reagents.total_volume) + var/mutable_appearance/filling = mutable_appearance('icons/goonstation/objects/objects.dmi', "mender-fluid") + filling.color = mix_color_from_reagents(reagents.reagent_list) + add_overlay(filling) + +/obj/item/reagent_containers/applicator/attack(mob/living/M, mob/user) + if(!reagents.total_volume) + to_chat(user, "[src] is empty!") + return + if(applying) + to_chat(user, "You're already applying [src].") + return + if(!iscarbon(M)) + return + + if(ignore_flags || M.can_inject(user, TRUE)) + if(M == user) + M.visible_message("[user] begins mending [user.p_them()]self with [src].", "You begin mending yourself with [src].") + else + user.visible_message("[user] begins mending [M] with [src].", "You begin mending [M] with [src].") + if(M.reagents) + applying = TRUE + icon_state = "mender-active" + apply_to(M, user, 0.2) // We apply a very weak application up front, then loop. + while(do_after(user, 10, target = M)) + measured_health = M.health + apply_to(M, user, 1, FALSE) + if((measured_health == M.health) || !reagents.total_volume) + to_chat(user, "[M] is finished healing and [src] powers down automatically.") + break + applying = FALSE + icon_state = "mender" + user.changeNext_move(CLICK_CD_MELEE) + + +/obj/item/reagent_containers/applicator/proc/apply_to(mob/living/carbon/M, mob/user, multiplier = 1, show_message = TRUE) + var/total_applied_amount = applied_amount * multiplier + + if(reagents && reagents.total_volume) + 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, M, "Automends with [src] containing ([contained])", reagents.harmless_helper() ? ATKLOG_ALMOSTALL : null) + + var/fractional_applied_amount = total_applied_amount / reagents.total_volume + + reagents.reaction(M, REAGENT_TOUCH, fractional_applied_amount, show_message) + reagents.trans_to(M, total_applied_amount * 0.5) + reagents.remove_any(total_applied_amount * 0.5) + + playsound(get_turf(src), pick('sound/goonstation/items/mender.ogg', 'sound/goonstation/items/mender2.ogg'), 50, 1) + +/obj/item/reagent_containers/applicator/brute + name = "brute auto-mender" + list_reagents = list("styptic_powder" = 200) + +/obj/item/reagent_containers/applicator/burn + name = "burn auto-mender" + list_reagents = list("silver_sulfadiazine" = 200) + +/obj/item/reagent_containers/applicator/dual + name = "dual auto-mender" + list_reagents = list("synthflesh" = 200) diff --git a/code/modules/reagents/reagent_containers/patch.dm b/code/modules/reagents/reagent_containers/patch.dm index b020015e929..582e157004c 100644 --- a/code/modules/reagents/reagent_containers/patch.dm +++ b/code/modules/reagents/reagent_containers/patch.dm @@ -5,10 +5,24 @@ icon_state = "bandaid" item_state = "bandaid" possible_transfer_amounts = null - volume = 40 + volume = 30 apply_type = REAGENT_TOUCH apply_method = "apply" transfer_efficiency = 0.5 //patches aren't as effective at getting chemicals into the bloodstream. + temperature_min = 270 + temperature_max = 350 + var/needs_to_apply_reagents = TRUE + +/obj/item/reagent_containers/food/pill/patch/attack(mob/living/carbon/M, mob/user, def_zone) + if(!istype(M)) + return FALSE + bitesize = 0 + if(M.eat(src, user)) + user.drop_item() + forceMove(M) + M.processing_patches += src + return TRUE + return FALSE /obj/item/reagent_containers/food/pill/patch/afterattack(obj/target, mob/user , proximity) return // thanks inheritance again @@ -18,29 +32,37 @@ desc = "Helps with brute injuries." icon_state = "bandaid_brute" instant_application = 1 - list_reagents = list("styptic_powder" = 40) + list_reagents = list("styptic_powder" = 30) + +/obj/item/reagent_containers/food/pill/patch/styptic/small + name = "healing mini-patch" + list_reagents = list("styptic_powder" = 15) /obj/item/reagent_containers/food/pill/patch/silver_sulf name = "burn patch" desc = "Helps with burn injuries." icon_state = "bandaid_burn" instant_application = 1 - list_reagents = list("silver_sulfadiazine" = 40) + list_reagents = list("silver_sulfadiazine" = 30) + +/obj/item/reagent_containers/food/pill/patch/silver_sulf/small + name = "burn mini-patch" + list_reagents = list("silver_sulfadiazine" = 15) /obj/item/reagent_containers/food/pill/patch/synthflesh name = "synthflesh patch" desc = "Helps with brute and burn injuries." icon_state = "bandaid_med" instant_application = 1 - list_reagents = list("synthflesh" = 20) + list_reagents = list("synthflesh" = 10) /obj/item/reagent_containers/food/pill/patch/nicotine name = "nicotine patch" desc = "Helps temporarily curb the cravings of nicotine dependency." - list_reagents = list("nicotine" = 20) + list_reagents = list("nicotine" = 10) /obj/item/reagent_containers/food/pill/patch/jestosterone name = "jestosterone patch" desc = "Helps with brute injuries if the affected person is a clown, otherwise inflicts various annoying effects." icon_state = "bandaid_clown" - list_reagents = list("jestosterone" = 30) + list_reagents = list("jestosterone" = 20) diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm index 2e7c668a83f..d907e46247e 100644 --- a/code/modules/research/designs/autolathe_designs.dm +++ b/code/modules/research/designs/autolathe_designs.dm @@ -607,6 +607,14 @@ build_path = /obj/item/reagent_containers/hypospray/safety category = list("initial", "Medical") +/datum/design/automender + name = "Auto-mender" + id = "automender" + build_type = AUTOLATHE + materials = list(MAT_METAL = 1000, MAT_GLASS = 1000) + build_path = /obj/item/reagent_containers/applicator + category = list("initial", "Medical") + /datum/design/prox_sensor name = "Proximity Sensor" id = "prox_sensor" @@ -914,4 +922,3 @@ materials = list(MAT_METAL = 40000) build_path = /obj/item/golem_shell category = list("Imported") - diff --git a/icons/goonstation/objects/objects.dmi b/icons/goonstation/objects/objects.dmi index 8dadb400668..2707ce8b9b8 100644 Binary files a/icons/goonstation/objects/objects.dmi and b/icons/goonstation/objects/objects.dmi differ diff --git a/nano/templates/chem_master.tmpl b/nano/templates/chem_master.tmpl index 1d040d52af7..e91a43d357b 100644 --- a/nano/templates/chem_master.tmpl +++ b/nano/templates/chem_master.tmpl @@ -56,7 +56,7 @@