fix, yadda yadda
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
|
||||
if(S.ignore_clothes || get_location_accessible(M, selected_zone))
|
||||
var/datum/surgery/procedure = new S.type(M, selected_zone, affecting)
|
||||
user.visible_message("[user] drapes [I] over [M]'s [parse_zone(selected_zone)] to prepare for \an [procedure.name].", \
|
||||
user.visible_message("[user] drapes [I] over [M]'s [parse_zone(selected_zone)] to prepare for surgery.", \
|
||||
"<span class='notice'>You drape [I] over [M]'s [parse_zone(selected_zone)] to prepare for \an [procedure.name].</span>")
|
||||
|
||||
log_combat(user, M, "operated on", null, "(OPERATION TYPE: [procedure.name]) (TARGET AREA: [selected_zone])")
|
||||
@@ -110,15 +110,22 @@
|
||||
return 0.5
|
||||
|
||||
|
||||
/proc/get_location_accessible(mob/living/M, location)
|
||||
/proc/get_location_accessible(mob/M, location)
|
||||
var/covered_locations = 0 //based on body_parts_covered
|
||||
var/face_covered = 0 //based on flags_inv
|
||||
var/eyesmouth_covered = 0 //based on flags_cover
|
||||
for(var/A in M.get_equipped_items())
|
||||
var/obj/item/I = A
|
||||
covered_locations |= I.body_parts_covered
|
||||
face_covered |= I.flags_inv
|
||||
eyesmouth_covered |= I.flags_cover
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
for(var/obj/item/clothing/I in list(C.back, C.wear_mask, C.head))
|
||||
covered_locations |= I.body_parts_covered
|
||||
face_covered |= I.flags_inv
|
||||
eyesmouth_covered |= I.flags_cover
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
for(var/obj/item/I in list(H.wear_suit, H.w_uniform, H.shoes, H.belt, H.gloves, H.glasses, H.ears))
|
||||
covered_locations |= I.body_parts_covered
|
||||
face_covered |= I.flags_inv
|
||||
eyesmouth_covered |= I.flags_cover
|
||||
|
||||
switch(location)
|
||||
if(BODY_ZONE_HEAD)
|
||||
@@ -162,4 +169,3 @@
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user