Skip to content

Commit

Permalink
args SUCK
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsar-Salat committed Jan 11, 2025
1 parent 822bed4 commit df3c34a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions code/modules/mob/living/living_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
18 changes: 13 additions & 5 deletions code/modules/reagents/chemistry/holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit df3c34a

Please sign in to comment.