mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-20 19:49:39 +01:00
[MIRROR] Exposure fix (#687)
* Fix chemical exposure (#53491) * Exposure fix Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
This commit is contained in:
co-authored by
TemporalOroboros
parent
300e965ed8
commit
2fa0881a40
@@ -95,34 +95,31 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
|
||||
/datum/reagent/proc/expose_atom(atom/exposed_atom, reac_volume)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_REAGENT_EXPOSE_ATOM, exposed_atom, reac_volume)
|
||||
SEND_SIGNAL(exposed_atom, COMSIG_ATOM_EXPOSE_REAGENT, src, reac_volume)
|
||||
return TRUE
|
||||
. = 0
|
||||
. |= SEND_SIGNAL(src, COMSIG_REAGENT_EXPOSE_ATOM, exposed_atom, reac_volume)
|
||||
. |= SEND_SIGNAL(exposed_atom, COMSIG_ATOM_EXPOSE_REAGENT, src, reac_volume)
|
||||
|
||||
/// Applies this reagent to a [/mob/living]
|
||||
/datum/reagent/proc/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume, show_message = TRUE, touch_protection = 0)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_REAGENT_EXPOSE_MOB, exposed_mob, methods, reac_volume, show_message, touch_protection)
|
||||
. = SEND_SIGNAL(src, COMSIG_REAGENT_EXPOSE_MOB, exposed_mob, methods, reac_volume, show_message, touch_protection)
|
||||
if((methods & penetrates_skin) && exposed_mob.reagents) //smoke, foam, spray
|
||||
var/amount = round(reac_volume*clamp((1 - touch_protection), 0, 1), 0.1)
|
||||
if(amount >= 0.5)
|
||||
exposed_mob.reagents.add_reagent(type, amount)
|
||||
return TRUE
|
||||
|
||||
/// Applies this reagent to an [/obj]
|
||||
/datum/reagent/proc/expose_obj(obj/exposed_obj, reac_volume)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_REAGENT_EXPOSE_OBJ, exposed_obj, reac_volume)
|
||||
return TRUE
|
||||
return SEND_SIGNAL(src, COMSIG_REAGENT_EXPOSE_OBJ, exposed_obj, reac_volume)
|
||||
|
||||
/// Applies this reagent to a [/turf]
|
||||
/datum/reagent/proc/expose_turf(turf/exposed_turf, reac_volume)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_REAGENT_EXPOSE_TURF, exposed_turf, reac_volume)
|
||||
return TRUE
|
||||
return SEND_SIGNAL(src, COMSIG_REAGENT_EXPOSE_TURF, exposed_turf, reac_volume)
|
||||
|
||||
/// Called from [/datum/reagents/proc/metabolize]
|
||||
/datum/reagent/proc/on_mob_life(mob/living/carbon/M)
|
||||
|
||||
@@ -414,12 +414,12 @@
|
||||
/datum/reagent/medicine/c2/synthflesh/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume, show_message = TRUE)
|
||||
. = ..()
|
||||
if(!iscarbon(exposed_mob))
|
||||
return TRUE
|
||||
return
|
||||
var/mob/living/carbon/carbies = exposed_mob
|
||||
if(carbies.stat == DEAD)
|
||||
show_message = 0
|
||||
if(!(methods & (PATCH|TOUCH|VAPOR)))
|
||||
return TRUE
|
||||
return
|
||||
var/harmies = min(carbies.getBruteLoss(),carbies.adjustBruteLoss(-1.25 * reac_volume)*-1)
|
||||
var/burnies = min(carbies.getFireLoss(),carbies.adjustFireLoss(-1.25 * reac_volume)*-1)
|
||||
for(var/i in carbies.all_wounds)
|
||||
@@ -432,7 +432,6 @@
|
||||
if(HAS_TRAIT_FROM(exposed_mob, TRAIT_HUSK, "burn") && carbies.getFireLoss() < THRESHOLD_UNHUSK && (carbies.reagents.get_reagent_amount(/datum/reagent/medicine/c2/synthflesh) + reac_volume >= 100))
|
||||
carbies.cure_husk("burn")
|
||||
carbies.visible_message("<span class='nicegreen'>A rubbery liquid coats [carbies]'s burns. [carbies] looks a lot healthier!") //we're avoiding using the phrases "burnt flesh" and "burnt skin" here because carbies could be a skeleton or a golem or something
|
||||
return TRUE
|
||||
|
||||
/******ORGAN HEALING******/
|
||||
/*Suffix: -rite*/
|
||||
|
||||
@@ -158,7 +158,6 @@
|
||||
addtimer(CALLBACK(exposed_mob, /mob/living/proc/unfry_mob), 3)
|
||||
if(FryLoss)
|
||||
exposed_mob.adjustFireLoss(FryLoss)
|
||||
return TRUE
|
||||
|
||||
/datum/reagent/consumable/cooking_oil/expose_turf(turf/open/exposed_turf, reac_volume)
|
||||
. = ..()
|
||||
|
||||
@@ -726,7 +726,7 @@
|
||||
/datum/reagent/oxygen/expose_obj(obj/exposed_obj, reac_volume)
|
||||
. = ..()
|
||||
if((!exposed_obj) || (!reac_volume))
|
||||
return 0
|
||||
return
|
||||
var/temp = holder ? holder.chem_temp : T20C
|
||||
exposed_obj.atmos_spawn_air("o2=[reac_volume/2];TEMP=[temp]")
|
||||
|
||||
@@ -763,7 +763,7 @@
|
||||
/datum/reagent/nitrogen/expose_obj(obj/exposed_obj, reac_volume)
|
||||
. = ..()
|
||||
if((!exposed_obj) || (!reac_volume))
|
||||
return 0
|
||||
return
|
||||
var/temp = holder ? holder.chem_temp : T20C
|
||||
exposed_obj.atmos_spawn_air("n2=[reac_volume/2];TEMP=[temp]")
|
||||
|
||||
@@ -1271,7 +1271,7 @@
|
||||
/datum/reagent/carbondioxide/expose_obj(obj/exposed_obj, reac_volume)
|
||||
. = ..()
|
||||
if((!exposed_obj) || (!reac_volume))
|
||||
return 0
|
||||
return
|
||||
var/temp = holder ? holder.chem_temp : T20C
|
||||
exposed_obj.atmos_spawn_air("co2=[reac_volume/5];TEMP=[temp]")
|
||||
|
||||
@@ -1292,7 +1292,7 @@
|
||||
/datum/reagent/nitrous_oxide/expose_obj(obj/exposed_obj, reac_volume)
|
||||
. = ..()
|
||||
if((!exposed_obj) || (!reac_volume))
|
||||
return 0
|
||||
return
|
||||
var/temp = holder ? holder.chem_temp : T20C
|
||||
exposed_obj.atmos_spawn_air("n2o=[reac_volume/5];TEMP=[temp]")
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
/datum/reagent/toxin/plasma/expose_obj(obj/exposed_obj, reac_volume)
|
||||
. = ..()
|
||||
if((!exposed_obj) || (!reac_volume))
|
||||
return 0
|
||||
return
|
||||
var/temp = holder ? holder.chem_temp : T20C
|
||||
if(temp >= LIQUID_PLASMA_BP)
|
||||
exposed_obj.atmos_spawn_air("plasma=[reac_volume];TEMP=[temp]")
|
||||
|
||||
Reference in New Issue
Block a user