From 3000fd495f059e675aaf006684a222fff28852d0 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Fri, 8 Jan 2016 02:50:20 -0500 Subject: [PATCH] Positronic Brain Balance --- code/modules/mob/living/carbon/brain/posibrain.dm | 11 +++++++++++ code/modules/mob/living/carbon/brain/say.dm | 15 +++++---------- code/modules/organs/subtypes/machine.dm | 2 +- html/changelogs/posibrain-nerf-fox-mccloud.yml | 9 +++++++++ 4 files changed, 26 insertions(+), 11 deletions(-) create mode 100644 html/changelogs/posibrain-nerf-fox-mccloud.yml diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index d76b7dea569..04e56e9e2fa 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -12,6 +12,7 @@ var/list/ghost_volunteers[0] req_access = list(access_robotics) mecha = null//This does not appear to be used outside of reference in mecha.dm. + var/silenced = 0 //if set to 1, they can't talk. /obj/item/device/mmi/posibrain/attack_self(mob/user as mob) @@ -28,6 +29,13 @@ if(check_observer(O)) transfer_personality(O) reset_search() + else + if(silenced) + silenced = 0 + user << "You toggle the speaker to 'on', on the [src]." + else + silenced = 1 + user << "You toggle the speaker to 'off', on the [src]." /obj/item/device/mmi/posibrain/proc/request_player() for(var/mob/dead/observer/O in player_list) @@ -184,3 +192,6 @@ var/turf/T = get_turf_or_move(src.loc) for (var/mob/M in viewers(T)) M.show_message("\blue The positronic brain pings softly.") + +/obj/item/device/mmi/posibrain/ipc + silenced = 1 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/brain/say.dm b/code/modules/mob/living/carbon/brain/say.dm index f2f2c1b15c3..1b5b3a78126 100644 --- a/code/modules/mob/living/carbon/brain/say.dm +++ b/code/modules/mob/living/carbon/brain/say.dm @@ -3,9 +3,13 @@ if (silent) return - if(!(container && (istype(container, /obj/item/device/mmi) || istype(container, /obj/item/device/mmi/posibrain)))) + if(!(container && istype(container, /obj/item/device/mmi))) return //No MMI, can't speak, bucko./N else + if(container && istype(container, /obj/item/device/mmi/posibrain)) + var/obj/item/device/mmi/posibrain/P = container + if(P && P.silenced) + return if(prob(emp_damage*4)) if(prob(10))//10% chane to drop the message entirely return @@ -14,15 +18,6 @@ ..(message) -/mob/living/carbon/brain/can_speak(var/datum/language/speaking) - if(speaking == all_languages["Robot Talk"] && (container && istype(container, /obj/item/device/mmi/posibrain))) //so posibrains can speak binary; less messy than adding the language - return 1 - - else return ..() - -/mob/living/carbon/brain/binarycheck() - return (container && istype(container, /obj/item/device/mmi/posibrain)) - /mob/living/carbon/brain/handle_message_mode(var/message_mode, var/message, var/verb, var/speaking, var/used_radios, var/alt_name) switch(message_mode) if("headset") diff --git a/code/modules/organs/subtypes/machine.dm b/code/modules/organs/subtypes/machine.dm index 3e651613164..88f84b385b3 100644 --- a/code/modules/organs/subtypes/machine.dm +++ b/code/modules/organs/subtypes/machine.dm @@ -124,7 +124,7 @@ /obj/item/organ/mmi_holder/posibrain/New() robotize() - stored_mmi = new /obj/item/device/mmi/posibrain(src) + stored_mmi = new /obj/item/device/mmi/posibrain/ipc(src) ..() spawn(1) if(owner) diff --git a/html/changelogs/posibrain-nerf-fox-mccloud.yml b/html/changelogs/posibrain-nerf-fox-mccloud.yml new file mode 100644 index 00000000000..674050249fa --- /dev/null +++ b/html/changelogs/posibrain-nerf-fox-mccloud.yml @@ -0,0 +1,9 @@ + +author: Fox McCloud + +delete-after: True + +changes: + - tweak: "Positronic brains can no longer speak binary." + - tweak: "Positronic brains can be prevented from speaking (or allowed) by toggling their speaker on/off." + - tweak: "IPC's positronic brains start off toggled off."