diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index d8e9c492a12..470dd87ca3c 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -136,20 +136,28 @@ trigger.master = null trigger.holder = null trigger = null - else if(trigger) - to_chat(user, "Something is already attached to [src].") + return TRUE else if(istype(W, /obj/item/assembly/signaler) || istype(W, /obj/item/assembly/voice)) - user.drop_item() + if(istype(trigger, /obj/item/assembly/signaler) || istype(trigger, /obj/item/assembly/voice)) + to_chat(user, "Something is already attached to [src].") + return TRUE + if(!user.drop_item()) + to_chat(user, "You are unable to insert [W] into [src].") + return FALSE trigger = W trigger.forceMove(src) trigger.master = src trigger.holder = src to_chat(user, "You attach the [W] to [src].") - else - return ..() + return TRUE + else if(istype(W, /obj/item/assembly)) + to_chat(user, "That won't fit in [src]. Perhaps a signaler or voice analyzer would?") + return TRUE + + return ..() -/obj/item/clothing/mask/muzzle/safety/shock/equipped(obj/item/clothing/C) +/obj/item/clothing/mask/muzzle/safety/shock/proc/can_shock(obj/item/clothing/C) if(istype(C)) if(isliving(C.loc)) return C.loc @@ -159,17 +167,16 @@ /obj/item/clothing/mask/muzzle/safety/shock/proc/process_activation(var/obj/D, var/normal = 1, var/special = 1) visible_message("[bicon(src)] *beep* *beep*", "*beep* *beep*") - if(equipped(loc)) - var/mob/M = equipped(loc) + if(can_shock(loc)) + var/mob/M = can_shock(loc) to_chat(M, "You feel a sharp shock!") var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, M) s.start() M.Weaken(5) - if(ishuman(M)) - M.Stuttering(1) - M.Jitter(20) + M.Stuttering(1) + M.Jitter(20) return /obj/item/clothing/mask/muzzle/safety/shock/HasProximity(atom/movable/AM as mob|obj) diff --git a/code/modules/mob/living/update_status.dm b/code/modules/mob/living/update_status.dm index b083832919d..a5306d181c7 100644 --- a/code/modules/mob/living/update_status.dm +++ b/code/modules/mob/living/update_status.dm @@ -49,7 +49,14 @@ // Whether the mob is capable of talking /mob/living/can_speak() - return !(silent || (disabilities & MUTE)) + if(!(silent || (disabilities & MUTE))) + if(is_muzzled()) + var/obj/item/clothing/mask/muzzle/M = wear_mask + if(M.mute == 2) + return FALSE + return TRUE + else + return FALSE // Whether the mob is capable of standing or not /mob/living/proc/can_stand()