From 2a446b926f78101e5c07b71eeab3ae66d6f18fe9 Mon Sep 17 00:00:00 2001 From: TheGreatKitsune Date: Tue, 13 Dec 2022 13:12:05 -0600 Subject: [PATCH] Add verb to toggle species speech sounds --- .../mob/living/carbon/human/emote_vr.dm | 9 --------- .../living/carbon/human/human_defines_vr.dm | 1 - code/modules/mob/living/carbon/human/say.dm | 2 +- .../modules/mob/living/carbon/human/emote.dm | 20 +++++++++++++++++++ .../mob/living/carbon/human/human_defines.dm | 4 +++- .../carbon/human/species/outsider/vox.dm | 5 +++++ .../mob/living/simple_mob/simple_mob.dm | 20 +++++++++++++++---- .../living/simple_mob/subtypes/xenomorph.dm | 3 ++- vorestation.dme | 2 ++ 9 files changed, 49 insertions(+), 17 deletions(-) create mode 100644 modular_chomp/code/modules/mob/living/carbon/human/emote.dm create mode 100644 modular_chomp/code/modules/mob/living/carbon/human/species/outsider/vox.dm diff --git a/code/modules/mob/living/carbon/human/emote_vr.dm b/code/modules/mob/living/carbon/human/emote_vr.dm index b98d28285b..3f597c4784 100644 --- a/code/modules/mob/living/carbon/human/emote_vr.dm +++ b/code/modules/mob/living/carbon/human/emote_vr.dm @@ -62,15 +62,6 @@ message = "hides their wings." visible_message("[src] [message]") -// Chomp Edit Start -/mob/living/carbon/human/verb/hide_nutrition_vr() - set name = "Show/Hide Nutrition Levels" - set category = "IC" - set desc = "Allow other player to see your current nutrition level or not." - nutrition_hidden = !nutrition_hidden - to_chat(src, "Players will [nutrition_hidden ? "no longer" : "now"] see your nutrition levels.") -// Chomp Edit End - /mob/living/carbon/human/verb/hide_tail_vr() set name = "Show/Hide tail" set category = "IC" diff --git a/code/modules/mob/living/carbon/human/human_defines_vr.dm b/code/modules/mob/living/carbon/human/human_defines_vr.dm index 16b5097e46..69a008029c 100644 --- a/code/modules/mob/living/carbon/human/human_defines_vr.dm +++ b/code/modules/mob/living/carbon/human/human_defines_vr.dm @@ -8,7 +8,6 @@ var/ability_flags = 0 //Shadekin abilities/potentially other species-based? var/sensorpref = 5 //Suit sensor loadout pref var/wings_hidden = FALSE - var/nutrition_hidden = FALSE // Chomp Edit var/tail_hidden = FALSE /mob/living/carbon/human/proc/shadekin_get_energy() diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index a7def59625..f8e7aa157b 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -192,7 +192,7 @@ /mob/living/carbon/human/handle_speech_sound() var/list/returns[2] - if(species.speech_sounds && species.speech_sounds.len && prob(species.speech_chance)) //VOREStation Edit: Sanity Check + if(speech_sound_enabled && species.speech_sounds && species.speech_sounds.len && prob(species.speech_chance)) //VOREStation Edit: Sanity Check //CHOMPStation Edit: add ability to disable speech sounds with a verb returns[1] = sound(pick(species.speech_sounds)) returns[2] = 50 return returns diff --git a/modular_chomp/code/modules/mob/living/carbon/human/emote.dm b/modular_chomp/code/modules/mob/living/carbon/human/emote.dm new file mode 100644 index 0000000000..2dfaf62f66 --- /dev/null +++ b/modular_chomp/code/modules/mob/living/carbon/human/emote.dm @@ -0,0 +1,20 @@ +/mob/living/carbon/human/verb/hide_nutrition() + set name = "Show/Hide Nutrition Levels" + set category = "IC" + set desc = "Allow other player to see your current nutrition level or not." + nutrition_hidden = !nutrition_hidden + to_chat(src, "Players will [nutrition_hidden ? "no longer" : "now"] see your nutrition levels.") + +/mob/living/carbon/human/proc/toggle_speech_sounds() + set name = "Toggle Species Speech Sounds" + set desc = "Toggle if your species defined speech sound has a chance of playing on a Say" + set category = "IC" + + if(stat) + to_chat(src, "You must be awake and standing to perform this action!") + return + + speech_sound_enabled = !speech_sound_enabled + to_chat(src, "You will [speech_sound_enabled ? "now" : "no longer"] have a chance to play your species defined speech sound on a Say.") + + return TRUE diff --git a/modular_chomp/code/modules/mob/living/carbon/human/human_defines.dm b/modular_chomp/code/modules/mob/living/carbon/human/human_defines.dm index e487bf278b..e9306f988a 100644 --- a/modular_chomp/code/modules/mob/living/carbon/human/human_defines.dm +++ b/modular_chomp/code/modules/mob/living/carbon/human/human_defines.dm @@ -9,4 +9,6 @@ vore_icon_bellies = list("stomach", "taur belly") var/struggle_anim_stomach = FALSE var/struggle_anim_taur = FALSE - var/hide_headset = FALSE \ No newline at end of file + var/hide_headset = FALSE + var/speech_sound_enabled = TRUE + var/nutrition_hidden = FALSE diff --git a/modular_chomp/code/modules/mob/living/carbon/human/species/outsider/vox.dm b/modular_chomp/code/modules/mob/living/carbon/human/species/outsider/vox.dm new file mode 100644 index 0000000000..36ddf65e96 --- /dev/null +++ b/modular_chomp/code/modules/mob/living/carbon/human/species/outsider/vox.dm @@ -0,0 +1,5 @@ +/datum/species/vox + speech_chance = 50 // As long as we're making the option to disable it, might as well bump up the chances when it is enabled + inherent_verbs = list( + /mob/living/carbon/human/proc/toggle_speech_sounds + ) diff --git a/modular_chomp/code/modules/mob/living/simple_mob/simple_mob.dm b/modular_chomp/code/modules/mob/living/simple_mob/simple_mob.dm index 749d8b9f7c..ea38ce4cf8 100644 --- a/modular_chomp/code/modules/mob/living/simple_mob/simple_mob.dm +++ b/modular_chomp/code/modules/mob/living/simple_mob/simple_mob.dm @@ -2,6 +2,7 @@ //speech sounds var/list/speech_sounds = list() var/speech_chance = 75 //mobs can be a bit more emotive than carbon/humans + var/speech_sound_enabled = TRUE //vars for vore_icons toggle control var/vore_icons_cache = null // null by default. Going from ON to OFF should store vore_icons val here, OFF to ON reset as null @@ -34,8 +35,22 @@ update_icon() +/mob/living/simple_mob/verb/toggle_speech_sounds() + set name = "Toggle Species Speech Sounds" + set desc = "Toggle if your species defined speech sound has a chance of playing on a Say" + set category = "IC" + + if(stat) + to_chat(src, "You must be awake and standing to perform this action!") + return + + speech_sound_enabled = !speech_sound_enabled + to_chat(src, "You will [speech_sound_enabled ? "now" : "no longer"] have a chance to play your species defined speech sound on a Say.") + + return TRUE + /mob/living/simple_mob/handle_speech_sound() - if(speech_sounds && speech_sounds.len && prob(speech_chance)) + if(speech_sound_enabled && speech_sounds && speech_sounds.len && prob(speech_chance)) var/list/returns[2] returns[1] = sound(pick(speech_sounds)) returns[2] = 50 @@ -82,6 +97,3 @@ // This from original living.dm update_transforms too handle_status_indicators() - - - diff --git a/modular_chomp/code/modules/mob/living/simple_mob/subtypes/xenomorph.dm b/modular_chomp/code/modules/mob/living/simple_mob/subtypes/xenomorph.dm index 2c991b1c54..2f998702e3 100644 --- a/modular_chomp/code/modules/mob/living/simple_mob/subtypes/xenomorph.dm +++ b/modular_chomp/code/modules/mob/living/simple_mob/subtypes/xenomorph.dm @@ -87,7 +87,7 @@ var/datum/action/innate/xeno_ch/xeno_corrode/corrode_action = new var/datum/action/innate/xeno_ch/xeno_pounce/pounce_action = new var/datum/action/innate/xeno_ch/xeno_spin/spin_action = new - + can_be_drop_prey = FALSE //CHOMP Add /mob/living/simple_mob/xeno_ch/Initialize() @@ -99,6 +99,7 @@ . = ..() faction = "neutral" verbs |= /mob/living/simple_mob/xeno_ch/proc/xeno_build + verbs |= /mob/living/simple_mob/verb/toggle_speech_sounds build_action.Grant(src) diff --git a/vorestation.dme b/vorestation.dme index a2958e93d5..13f0e73b80 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -4541,10 +4541,12 @@ #include "modular_chomp\code\modules\mob\living\emote.dm" #include "modular_chomp\code\modules\mob\living\living.dm" #include "modular_chomp\code\modules\mob\living\carbon\brain\MMI.dm" +#include "modular_chomp\code\modules\mob\living\carbon\human\emote.dm" #include "modular_chomp\code\modules\mob\living\carbon\human\human.dm" #include "modular_chomp\code\modules\mob\living\carbon\human\human_defines.dm" #include "modular_chomp\code\modules\mob\living\carbon\human\update_icons.dm" #include "modular_chomp\code\modules\mob\living\carbon\human\species\species.dm" +#include "modular_chomp\code\modules\mob\living\carbon\human\species\outsider\vox.dm" #include "modular_chomp\code\modules\mob\living\carbon\human\species\station\station.dm" #include "modular_chomp\code\modules\mob\living\carbon\human\species\station\teshari.dm" #include "modular_chomp\code\modules\mob\living\carbon\human\species\station\protean\_protean_defines.dm"