From e2b43173664e955e03124d91276bf9ade28e108a Mon Sep 17 00:00:00 2001 From: if there were two guys on the moon Date: Wed, 26 Jun 2019 18:52:36 +0100 Subject: [PATCH 1/2] Custom Say Verbs --- code/modules/mob/living/living.dm | 26 ++++++++++++++ code/modules/mob/living/living_defines_vr.dm | 8 ++++- code/modules/mob/living/say.dm | 13 +++++++ .../mistyLuminescence - Sayverbs.yml | 36 +++++++++++++++++++ 4 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/mistyLuminescence - Sayverbs.yml diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index d5295289faf..242dfd7213a 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1363,3 +1363,29 @@ default behaviour is: BRAIN:[getBrainLoss()] "} +//VOREStation edit, allows for custom say verbs +/mob/living/verb/customsay() + set category = "IC" + set name = "Customise Say Verbs" + set desc = "Customise the text which appears when you type- e.g. 'says', 'asks', 'exclaims'." + + if(src.client && src.client.holder) + var/customsaylist[] = list( + "Say", + "Whisper", + "Ask (?)", + "Exclaim/Shout/Yell (!)", + "Cancel" + ) + var/sayselect = input("Which say-verb do you wish to customise?") as null|anything in customsaylist //we can't use alert() for this because there's too many terms + + if(sayselect == "Say") + custom_say = sanitize(input(usr, "This word or phrase will appear instead of 'says': [src] says, \"Hi.\"", "Custom Say", null) as text) + else if(sayselect == "Whisper") + custom_whisper = sanitize(input(usr, "This word or phrase will appear instead of 'whispers': [src] whispers, \"Hi...\"", "Custom Whisper", null) as text) + else if(sayselect == "Ask (?)") + custom_ask = sanitize(input(usr, "This word or phrase will appear instead of 'asks': [src] asks, \"Hi?\"", "Custom Ask", null) as text) + else if(sayselect == "Exclaim/Shout/Yell (!)") + custom_exclaim = sanitize(input(usr, "This word or phrase will appear instead of 'exclaims', 'shouts' or 'yells': [src] exclaims, \"Hi!\"", "Custom Exclaim", null) as text) + else + return \ No newline at end of file diff --git a/code/modules/mob/living/living_defines_vr.dm b/code/modules/mob/living/living_defines_vr.dm index 8b463df93b1..72c495ce143 100644 --- a/code/modules/mob/living/living_defines_vr.dm +++ b/code/modules/mob/living/living_defines_vr.dm @@ -1,3 +1,9 @@ /mob/living var/ooc_notes = null - var/obj/structure/mob_spawner/source_spawner = null \ No newline at end of file + var/obj/structure/mob_spawner/source_spawner = null + +//custom say verbs + var/custom_say = null + var/custom_ask = null + var/custom_exclaim = null + var/custom_whisper = null \ No newline at end of file diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 02900ffe1a0..90e53783607 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -275,6 +275,19 @@ proc/get_radio_key_from_channel(var/channel) message_range = 1 sound_vol *= 0.5 + //VOREStation edit - allows for custom say verbs, overriding all other say-verb types- e.g. "says loudly" instead of "shouts" + //You'll still stammer if injured or slur if drunk, but it won't have those specific words + var/ending = copytext(message, length(message)) + + if(custom_whisper && whispering) + verb = "[custom_whisper]" + else if(custom_exclaim && ending=="!") + verb = "[custom_exclaim]" + else if(custom_ask && ending=="?") + verb = "[custom_ask]" + else if(custom_say) + verb = "[custom_say]" + //Handle nonverbal and sign languages here if (speaking) if (speaking.flags & SIGNLANG) diff --git a/html/changelogs/mistyLuminescence - Sayverbs.yml b/html/changelogs/mistyLuminescence - Sayverbs.yml new file mode 100644 index 00000000000..dc54f0712d2 --- /dev/null +++ b/html/changelogs/mistyLuminescence - Sayverbs.yml @@ -0,0 +1,36 @@ +################################ +# 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 +################################# + +# Your name. +author: Novacat + +# 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: + - rscadd: "You can now select customised say-verbs in the IC tab. You know how when you use a question mark, you always 'ask' something? You don't have to "ask" any more, you can "query" instead, for example." \ No newline at end of file From bf3366c673a29f8d6d7d69edd5be2059498e6284 Mon Sep 17 00:00:00 2001 From: if there were two guys on the moon Date: Wed, 26 Jun 2019 19:24:31 +0100 Subject: [PATCH 2/2] Vorestation edit --- code/modules/mob/living/living.dm | 3 ++- code/modules/mob/living/say.dm | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 242dfd7213a..9e618ba85cb 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1388,4 +1388,5 @@ default behaviour is: else if(sayselect == "Exclaim/Shout/Yell (!)") custom_exclaim = sanitize(input(usr, "This word or phrase will appear instead of 'exclaims', 'shouts' or 'yells': [src] exclaims, \"Hi!\"", "Custom Exclaim", null) as text) else - return \ No newline at end of file + return + //VOREStation edit ends \ No newline at end of file diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 90e53783607..cad6da735c5 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -287,6 +287,7 @@ proc/get_radio_key_from_channel(var/channel) verb = "[custom_ask]" else if(custom_say) verb = "[custom_say]" + //VOREStation edit ends //Handle nonverbal and sign languages here if (speaking)