diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 32662c13d06..0e0283b0aed 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -316,13 +316,16 @@ var/global/list/default_medbay_channels = list( if (iscarbon(M)) var/mob/living/carbon/C = M if ((CE_UNDEXTROUS in C.chem_effects) || C.stunned >= 10) - to_chat(M, SPAN_WARNING("Your can't move your arms enough to activate the radio...")) + to_chat(M, SPAN_WARNING("You can't move your arms enough to activate the radio...")) return if(iszombie(M)) to_chat(M, SPAN_WARNING("Try as you might, you cannot will your decaying body into operating \the [src].")) return FALSE if(istype(M)) + if(M.restrained()) + to_chat(M, SPAN_WARNING("You can't speak into \the [src.name] while restrained.")) + return FALSE M.trigger_aiming(TARGET_CAN_RADIO) // Uncommenting this. To the above comment: diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 4b415c3df1c..58d308d54b6 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -148,58 +148,56 @@ return returns /mob/living/carbon/human/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name) - if(!restrained()) - switch(message_mode) - if("intercom") - if(!src.restrained()) - for(var/obj/item/device/radio/intercom/I in view(1)) - if(I.talk_into(src, message, null, verb, speaking)) - I.add_fingerprint(src) - used_radios += I - if("headset") + switch(message_mode) + if("intercom") + for(var/obj/item/device/radio/intercom/I in view(1)) + if(I.talk_into(src, message, null, verb, speaking)) + I.add_fingerprint(src) + used_radios += I + if("headset") + if(l_ear && istype(l_ear,/obj/item/device/radio)) + var/obj/item/device/radio/R = l_ear + if(R.talk_into(src,message,null,verb,speaking)) + used_radios += l_ear + else if(r_ear && istype(r_ear,/obj/item/device/radio)) + var/obj/item/device/radio/R = r_ear + if(R.talk_into(src,message,null,verb,speaking)) + used_radios += r_ear + if("right ear") + var/obj/item/device/radio/R + var/has_radio = 0 + if(r_ear && istype(r_ear,/obj/item/device/radio)) + R = r_ear + has_radio = 1 + if(r_hand && istype(r_hand, /obj/item/device/radio)) + R = r_hand + has_radio = 1 + if(has_radio) + if(R.talk_into(src,message,null,verb,speaking)) + used_radios += R + if("left ear") + var/obj/item/device/radio/R + var/has_radio = 0 + if(l_ear && istype(l_ear,/obj/item/device/radio)) + R = l_ear + has_radio = 1 + if(l_hand && istype(l_hand,/obj/item/device/radio)) + R = l_hand + has_radio = 1 + if(has_radio) + if(R.talk_into(src,message,null,verb,speaking)) + used_radios += R + if("whisper") + whisper_say(message, speaking, alt_name) + return 1 + else + if(message_mode) if(l_ear && istype(l_ear,/obj/item/device/radio)) - var/obj/item/device/radio/R = l_ear - if(R.talk_into(src,message,null,verb,speaking)) + if(l_ear.talk_into(src,message, message_mode, verb, speaking)) used_radios += l_ear else if(r_ear && istype(r_ear,/obj/item/device/radio)) - var/obj/item/device/radio/R = r_ear - if(R.talk_into(src,message,null,verb,speaking)) + if(r_ear.talk_into(src,message, message_mode, verb, speaking)) used_radios += r_ear - if("right ear") - var/obj/item/device/radio/R - var/has_radio = 0 - if(r_ear && istype(r_ear,/obj/item/device/radio)) - R = r_ear - has_radio = 1 - if(r_hand && istype(r_hand, /obj/item/device/radio)) - R = r_hand - has_radio = 1 - if(has_radio) - if(R.talk_into(src,message,null,verb,speaking)) - used_radios += R - if("left ear") - var/obj/item/device/radio/R - var/has_radio = 0 - if(l_ear && istype(l_ear,/obj/item/device/radio)) - R = l_ear - has_radio = 1 - if(l_hand && istype(l_hand,/obj/item/device/radio)) - R = l_hand - has_radio = 1 - if(has_radio) - if(R.talk_into(src,message,null,verb,speaking)) - used_radios += R - if("whisper") - whisper_say(message, speaking, alt_name) - return 1 - else - if(message_mode) - if(l_ear && istype(l_ear,/obj/item/device/radio)) - if(l_ear.talk_into(src,message, message_mode, verb, speaking)) - used_radios += l_ear - else if(r_ear && istype(r_ear,/obj/item/device/radio)) - if(r_ear.talk_into(src,message, message_mode, verb, speaking)) - used_radios += r_ear /mob/living/carbon/human/handle_speech_sound() var/list/returns = ..() diff --git a/html/changelogs/whisper_restrained.yml b/html/changelogs/whisper_restrained.yml new file mode 100644 index 00000000000..fd776af06c3 --- /dev/null +++ b/html/changelogs/whisper_restrained.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: mikomyazaki + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Can now whisper while restrained." \ No newline at end of file