From 6f5441fe0871b2af9357a6ac9d41e1ee2cdbe216 Mon Sep 17 00:00:00 2001 From: Chap Date: Mon, 18 Nov 2024 17:11:35 +0100 Subject: [PATCH] [s] [FIX] Exploit fix (#27387) * That's illegal * Requested changes --------- Co-authored-by: Adrer --- code/modules/reagents/chemistry/machinery/chem_master.dm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 0672fa1f7c7..5e2624b0661 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -6,6 +6,9 @@ #define TRANSFER_TO_DISPOSAL 0 #define TRANSFER_TO_BEAKER 1 +#define SAFE_MIN_TEMPERATURE T0C+7 // Safe minimum temperature for chemicals before they would start to damage slimepeople. +#define SAFE_MAX_TEMPERATURE T0C+36 // Safe maximum temperature for chemicals before they would start to damage drask. + /obj/machinery/chem_master name = "\improper ChemMaster 3000" desc = "Used to turn reagents into pills, patches, and store them in bottles." @@ -610,6 +613,8 @@ for(var/datum/reagent/A in R.reagent_list) if(!safe_chem_list.Find(A.id)) return FALSE + if(R.chem_temp < SAFE_MIN_TEMPERATURE || R.chem_temp > SAFE_MAX_TEMPERATURE) + return FALSE return TRUE /datum/chemical_production_mode/patches/configure_item(data, datum/reagents/R, obj/item/reagent_containers/patch/P) @@ -665,3 +670,6 @@ #undef TRANSFER_TO_DISPOSAL #undef TRANSFER_TO_BEAKER + +#undef SAFE_MIN_TEMPERATURE +#undef SAFE_MAX_TEMPERATURE