diff --git a/code/_globalvars/lists/reagents.dm b/code/_globalvars/lists/reagents.dm index 8417275d780..ca78e4ea14c 100644 --- a/code/_globalvars/lists/reagents.dm +++ b/code/_globalvars/lists/reagents.dm @@ -58,4 +58,9 @@ var/global/list/blocked_chems = list("polonium", "initropidril", "concentrated_i "reagent", "life","dragonsbreath") //List of chems/mixtures that can't grow in plants (in addition to the global random chem blacklist) -var/global/list/plant_blocked_chems = list() //filled in /datum/reagents/New() with chems that have can_grow_in_plants = 0 \ No newline at end of file +var/global/list/plant_blocked_chems = list() //filled in /datum/reagents/New() with chems that have can_grow_in_plants = 0 + +var/global/list/safe_chem_list = list("antihol", "charcoal", "epinephrine", "insulin", "teporone","silver_sulfadiazine", "salbutamol", + "omnizine", "stimulants", "synaptizine", "potass_iodide", "oculine", "mannitol", "styptic_powder", + "methamphetamine", "spaceacillin", "salglu_solution", "sal_acid", "cryoxadone", "blood", "synthflesh", + "hydrocodone", "mitocholide", "rezadone") \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 68bcd9306d3..3cafce27363 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -398,6 +398,7 @@ var/pillsprite = "1" var/client/has_sprites = list() var/printing = null + var/safety_override = 0 /obj/machinery/chem_master/New() var/datum/reagents/R = new/datum/reagents(100) @@ -426,6 +427,14 @@ spawn(rand(0, 15)) stat |= NOPOWER +/obj/machinery/chem_master/emag_act(mob/user) + if(!safety_override) + to_chat(user, "You disable the safeties on the [src].") + safety_override = 1 + else + to_chat(user, "You re-enable the safeties on the [src].") + safety_override = 0 + /obj/machinery/chem_master/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob, params) if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks/drinkingglass)) @@ -625,13 +634,17 @@ if(!name) return name = reject_bad_text(name) - while (count--) + var/is_medical_patch = chemical_safety_check(reagents) + while(count--) var/obj/item/weapon/reagent_containers/food/pill/patch/P = new/obj/item/weapon/reagent_containers/food/pill/patch(src.loc) if(!name) name = reagents.get_master_reagent_name() P.name = "[name] patch" P.pixel_x = rand(-7, 7) //random position P.pixel_y = rand(-7, 7) reagents.trans_to(P,amount_per_patch) + if(is_medical_patch) + P.instant_application = 1 + P.icon_state = "bandaid_med" else if (href_list["createbottle"]) if(!condi) var/name = input(usr,"Name:","Name your bottle!",reagents.get_master_reagent_name()) as text|null @@ -757,6 +770,14 @@ else return 0 +/obj/machinery/chem_master/proc/chemical_safety_check(datum/reagents/R) + if(safety_override) + return 1 + var/all_safe = 1 + for(var/datum/reagent/A in R.reagent_list) + if(!safe_chem_list.Find(A.id)) + all_safe = 0 + return all_safe /obj/machinery/chem_master/condimaster name = "\improper CondiMaster 3000" diff --git a/code/modules/reagents/newchem/patch.dm b/code/modules/reagents/newchem/patch.dm index 793b6f8ae6f..43b82ce3fb1 100644 --- a/code/modules/reagents/newchem/patch.dm +++ b/code/modules/reagents/newchem/patch.dm @@ -10,6 +10,13 @@ apply_method = "apply" transfer_efficiency = 0.5 //patches aren't as effective at getting chemicals into the bloodstream. +/obj/item/weapon/reagent_containers/food/pill/patch/emag_act(mob/user) + if(instant_application) + to_chat(user, "The patch is sealed already.") + else + to_chat(user, "You press the emag onto the patch. The current from the emag closes the tamper-proof seal.") + instant_application = 1 + /obj/item/weapon/reagent_containers/food/pill/patch/afterattack(obj/target, mob/user , proximity) return // thanks inheritance again @@ -36,6 +43,7 @@ /obj/item/weapon/reagent_containers/food/pill/patch/synthflesh name = "syntheflesh patch" desc = "Helps with burn injuries." + icon_state = "bandaid_med" instant_application = 1 /obj/item/weapon/reagent_containers/food/pill/patch/synthflesh/New() diff --git a/icons/obj/chemical.dmi b/icons/obj/chemical.dmi index ccf3bad52b5..40f5b5ddc17 100644 Binary files a/icons/obj/chemical.dmi and b/icons/obj/chemical.dmi differ