From df3c34affc6b0acbb8667110fbfe21d20d4c967e Mon Sep 17 00:00:00 2001 From: RKz Date: Sat, 11 Jan 2025 17:27:50 -0500 Subject: [PATCH] args SUCK --- code/modules/mob/living/living_defense.dm | 4 ++-- code/modules/reagents/chemistry/holder.dm | 18 +++++++++++++----- .../chemistry/reagents/medicine_reagents.dm | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 7bc764b9160b3..e2c7a1d48916e 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -620,7 +620,7 @@ * If the method is INGEST the mob tastes the reagents. * If the method is VAPOR it incorporates permiability protection. */ -/mob/living/expose_reagents(list/reagents, datum/reagents/source, method=TOUCH, volume_modifier=1, show_message=TRUE) +/mob/living/expose_reagents(list/reagents, datum/reagents/source, method=TOUCH, volume_modifier=1, show_message=TRUE, obj/item/bodypart/affecting) if((. = ..()) & COMPONENT_NO_EXPOSE_REAGENTS) return @@ -630,4 +630,4 @@ var/touch_protection = (method == VAPOR) ? getarmor(null, BIO) * 0.01 : 0 for(var/reagent in reagents) var/datum/reagent/R = reagent - . |= R.expose_mob(src, method, reagents[R], show_message, touch_protection) + . |= R.expose_mob(src, method, reagents[R], show_message, touch_protection, affecting) diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index e2a8339c35e19..83365cf30a54d 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -680,12 +680,20 @@ can_process = TRUE return can_process +//================================Exposure(to apply reagent effects)====================== /** - * Applies the relevant expose_ proc for every reagent in this holder - * * [/datum/reagent/proc/expose_mob] - * * [/datum/reagent/proc/expose_turf] - * * [/datum/reagent/proc/expose_obj] - */ + * Applies the relevant expose_ proc for every reagent in this holder + * * [/datum/reagent/proc/expose_mob] + * * [/datum/reagent/proc/expose_turf] + * * [/datum/reagent/proc/expose_obj] + * + * Arguments + * - Atom/target: What mob/turf/object is being exposed to reagents? This is your reaction target. + * - Method: What reaction type is the reagent itself going to call on the reaction target? Types are TOUCH, INGEST, VAPOR, PATCH, and INJECT. + * - Volume_modifier: What is the reagent volume multiplied by when exposed? Note that this is called on the volume of EVERY reagent in the base body, so factor in your Maximum_Volume if necessary! + * - Show_message: Whether to display anything to mobs when they are exposed. + * - + */ /datum/reagents/proc/expose(atom/A, method = TOUCH, volume_modifier = 1, show_message = 1, obj/item/bodypart/affecting) if(isnull(A)) return null diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index 470cf0720c206..26739528dbe87 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -442,7 +442,7 @@ show_message = FALSE if(method == PATCH) //you could be targeting a limb that doesnt exist while applying the patch, so lets avoid a runtime - if(affecting?.heal_damage(brute = reac_volume, burn = reac_volume)) + if(affecting.heal_damage(brute = reac_volume, burn = reac_volume)) M.update_damage_overlays() M.adjustStaminaLoss(reac_volume*2) if(show_message)