Scalding people by splashing them with hot reagents (#34842)

* Initial stuff for scalding.

* Scalding stuff.

* Change scaling.

* Change scaling.

* Ambient pills.

---------

Co-authored-by: Hinaichigo <hinaichigo@github.com>
This commit is contained in:
Hinaichigo
2023-08-29 19:53:49 -04:00
committed by GitHub
parent db1a2e6f9d
commit 17ffa576eb
8 changed files with 139 additions and 31 deletions

View File

@@ -50,9 +50,6 @@ emp_act
/mob/living/carbon/human/getarmor(var/def_zone, var/type)
var/armorval = 0
var/organnum = 0
if(def_zone)
if(isorgan(def_zone))
return checkarmor(def_zone, type)
@@ -61,14 +58,14 @@ emp_act
//If a specific bodypart is targetted, check how that bodypart is protected and return the value.
//If you don't specify a bodypart, it checks ALL your bodyparts for protection, and averages out the values
var/armorval = 0
var/organnum = 0
for(var/datum/organ/external/organ in organs)
armorval += checkarmor(organ, type)
organnum++
return (armorval/max(organnum, 1))
/mob/living/carbon/human/getarmorabsorb(var/def_zone, var/type)
var/armorval = 0
var/organnum = 0
if(def_zone)
if(isorgan(def_zone))
return checkarmorabsorb(def_zone, type)
@@ -77,11 +74,43 @@ emp_act
//If a specific bodypart is targetted, check how that bodypart is protected and return the value.
//If you don't specify a bodypart, it checks ALL your bodyparts for protection, and averages out the values
var/armorval = 0
var/organnum = 0
for(var/datum/organ/external/organ in organs)
armorval += checkarmorabsorb(organ, type)
organnum++
return (armorval/max(organnum, 1))
/mob/living/carbon/human/proc/getthermalprot(var/def_zone)
if(def_zone)
if(isorgan(def_zone))
return checkthermalprot(def_zone)
var/datum/organ/external/affecting = get_organ(ran_zone(def_zone))
return checkthermalprot(affecting)
//If a specific bodypart is targetted, check how that bodypart is protected and return the value.
//If you don't specify a bodypart, it checks ALL your bodyparts for protection, and averages out the values
var/thermal_prot = 0
var/organnum = 0
for(var/datum/organ/external/organ in organs)
thermal_prot += checkthermalprot(organ, type)
organnum++
return (thermal_prot/max(organnum, 1))
/mob/living/carbon/human/proc/checkthermalprot(var/datum/organ/external/def_zone)
var/thermal_pass = 1 //1 means no protection, 0 means total protection
for(var/ci in get_clothing_items())
if(isitem(ci))
var/obj/item/C = ci
if(C.body_parts_covered & def_zone.body_part)
thermal_pass *= C.heat_conductivity
if(istype(C, /obj/item/clothing))
var/obj/item/clothing/CC = C
for(var/obj/item/clothing/accessory/A in CC.accessories)
if(A.body_parts_covered & def_zone.body_part)
thermal_pass *= A.heat_conductivity
return thermal_pass
/mob/living/carbon/human/proc/get_siemens_coefficient_organ(var/datum/organ/external/def_zone)
if(!def_zone)
@@ -135,7 +164,6 @@ emp_act
protection += A.get_armor_absorb(type)
return protection
/mob/living/carbon/human/proc/check_body_part_coverage(var/body_part_flags=0, var/obj/item/ignored)
if(!body_part_flags)
return 0