Merge pull request #8150 from Trilbyspaceclone/patch-84

MIRROR - Fixes runtime from attempting checking armor on missing bodypart, improves ran_zone selection mechanism #43222
This commit is contained in:
deathride58
2019-03-21 15:33:34 -04:00
committed by GitHub
2 changed files with 6 additions and 21 deletions
@@ -4,7 +4,9 @@
if(def_zone)
if(isbodypart(def_zone))
return checkarmor(def_zone, type)
var/obj/item/bodypart/bp = def_zone
if(bp.body_part)
return checkarmor(def_zone, type)
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(def_zone))
return checkarmor(affecting, type)
//If a specific bodypart is targetted, check how that bodypart is protected and return the value.