mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Adds siemens_coefficient handling to stun batons
Conflicts: code/game/objects/items/weapons/stunbaton.dm
This commit is contained in:
@@ -109,21 +109,6 @@ emp_act
|
||||
organnum++
|
||||
return (armorval/max(organnum, 1))
|
||||
|
||||
//this proc returns the Siemens coefficient of electrical resistivity for a particular external organ.
|
||||
/mob/living/carbon/human/proc/get_siemens_coefficient_organ(var/datum/organ/external/def_zone)
|
||||
if (!def_zone)
|
||||
return 1.0
|
||||
|
||||
var/siemens_coefficient = 1.0
|
||||
|
||||
var/list/clothing_items = list(head, wear_mask, wear_suit, w_uniform, gloves, shoes) // What all are we checking?
|
||||
for(var/obj/item/clothing/C in clothing_items)
|
||||
if(!istype(C)) //is this necessary?
|
||||
continue
|
||||
else if(C.body_parts_covered & def_zone.body_part) // Is that body part being targeted covered?
|
||||
siemens_coefficient *= C.siemens_coefficient
|
||||
|
||||
return siemens_coefficient
|
||||
|
||||
//this proc returns the armour value for a particular external organ.
|
||||
/mob/living/carbon/human/proc/getarmor_organ(var/datum/organ/external/def_zone, var/type)
|
||||
@@ -138,6 +123,20 @@ emp_act
|
||||
protection += C.armor[type]
|
||||
return protection
|
||||
|
||||
//this proc returns the Siemens coefficient of electrical resistivity for a particular external organ.
|
||||
/mob/living/carbon/human/proc/get_siemens_coefficient_organ(var/datum/organ/external/def_zone)
|
||||
if (!def_zone)
|
||||
return 1.0
|
||||
|
||||
var/siemens_coefficient = 1.0
|
||||
|
||||
var/list/clothing_items = list(head, wear_mask, wear_suit, w_uniform, gloves, shoes) // What all are we checking?
|
||||
for(var/obj/item/clothing/C in clothing_items)
|
||||
if(istype(C) && (C.body_parts_covered & def_zone.body_part)) // Is that body part being targeted covered?
|
||||
siemens_coefficient *= C.siemens_coefficient
|
||||
|
||||
return siemens_coefficient
|
||||
|
||||
/mob/living/carbon/human/proc/check_head_coverage()
|
||||
|
||||
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform)
|
||||
|
||||
Reference in New Issue
Block a user