Merge pull request #12675 from Ghommie/Ghommie-cit828

Fixing (un)equip penalties from obscured inv slots.
This commit is contained in:
silicons
2020-07-04 00:12:04 -07:00
committed by GitHub
3 changed files with 8 additions and 7 deletions
+3 -2
View File
@@ -23,14 +23,15 @@
if(iscarbon(target) && proximity)
var/mob/living/carbon/C = target
var/mob/living/carbon/U = user
var/success = C.equip_to_slot_if_possible(new /obj/item/clothing/gloves/color/yellow/sprayon, ITEM_SLOT_GLOVES, TRUE, TRUE)
var/success = C.equip_to_slot_if_possible(new /obj/item/clothing/gloves/color/yellow/sprayon, ITEM_SLOT_GLOVES, TRUE, TRUE, clothing_check = TRUE)
if(success)
if(C == user)
C.visible_message("<span class='notice'>[U] sprays their hands with glittery rubber!</span>")
else
C.visible_message("<span class='warning'>[U] sprays glittery rubber on the hands of [C]!</span>")
else
C.visible_message("<span class='warning'>The rubber fails to stick to [C]'s hands!</span>")
user.visible_message("<span class='warning'>The rubber fails to stick to [C]'s hands!</span>",
"<span class='warning'>The rubber fails to stick to [C]'s [(SLOT_GLOVES in C.check_obscured_slots()) ? "unexposed" : ""] hands!</span>")
qdel(src)
+1 -1
View File
@@ -227,7 +227,7 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
var/obj/item/W = get_active_held_item()
if(istype(W))
if(equip_to_slot_if_possible(W, slot, FALSE, FALSE, FALSE, TRUE))
if(equip_to_slot_if_possible(W, slot, FALSE, FALSE, FALSE, FALSE, TRUE))
return TRUE
if(!W)