From 86d2d666a8dbe4fb0bc63843c22c9e80ffa95bc6 Mon Sep 17 00:00:00 2001 From: Miauw Date: Sat, 20 Sep 2014 14:30:18 +0200 Subject: [PATCH 1/3] Fixes voice changer mask code being absent. Fixed #4843 --- code/modules/clothing/masks/gasmask.dm | 5 +++++ code/modules/mob/living/carbon/human/say.dm | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 1a21cda6535..40f373d19e0 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -195,6 +195,11 @@ var/voice = "Unknown" var/vchange = 0//This didn't do anything before. It now checks if the mask has special functions/N origin_tech = "syndicate=4" + action_button_name = "Toggle mask" + +/obj/item/clothing/mask/gas/voice/attack_self(mob/user) + vchange = !vchange + user << "The voice changer is now [vchange ? "on" : "off"]!" /obj/item/clothing/mask/gas/voice/space_ninja name = "ninja mask" diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 1d1faa53c25..9eb619a907f 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -47,10 +47,14 @@ return message /mob/living/carbon/human/GetVoice() - if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice)) - var/obj/item/clothing/mask/gas/voice/V = src.wear_mask - if(V.vchange) - return V.voice + if(istype(wear_mask, /obj/item/clothing/mask/gas/voice)) + var/obj/item/clothing/mask/gas/voice/V = wear_mask + if(V.vchange && wear_id) + var/obj/item/weapon/card/id/idcard = wear_id.GetID() + if(istype(idcard)) + return idcard.registered_name + else + return real_name else return real_name if(mind && mind.changeling && mind.changeling.mimicing) From 11e10b6c4293303cae4b4ee9d486e759cf3b7e13 Mon Sep 17 00:00:00 2001 From: Miauw Date: Sat, 20 Sep 2014 14:33:44 +0200 Subject: [PATCH 2/3] Adds a changelog --- html/changelogs/Miauw-PR-4909.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/Miauw-PR-4909.yml diff --git a/html/changelogs/Miauw-PR-4909.yml b/html/changelogs/Miauw-PR-4909.yml new file mode 100644 index 00000000000..ab6296ea004 --- /dev/null +++ b/html/changelogs/Miauw-PR-4909.yml @@ -0,0 +1,4 @@ +author: Miauw +changes: + - bugfix: Voice changer masks work again. + - tweak: You can now turn voice changer masks on/off by activating them in your hand. They start off. From e85d8753cfdf8cbd8d9b251d395e32644a622104 Mon Sep 17 00:00:00 2001 From: Miauw Date: Sat, 20 Sep 2014 14:35:32 +0200 Subject: [PATCH 3/3] Fixes the changelog :^] --- html/changelogs/Miauw-PR-4909.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/html/changelogs/Miauw-PR-4909.yml b/html/changelogs/Miauw-PR-4909.yml index ab6296ea004..f76ab32c763 100644 --- a/html/changelogs/Miauw-PR-4909.yml +++ b/html/changelogs/Miauw-PR-4909.yml @@ -1,4 +1,7 @@ author: Miauw + +delete-after: True + changes: - bugfix: Voice changer masks work again. - tweak: You can now turn voice changer masks on/off by activating them in your hand. They start off.