From 6a08d7617f833a00b1f947ca06ad605b65de4f78 Mon Sep 17 00:00:00 2001 From: NightDawnFox <116907157+NightDawnFox@users.noreply.github.com> Date: Sun, 22 Dec 2024 22:14:04 +0500 Subject: [PATCH] add: you can now SPEAK with 10+ Oxyloss (#6036) add: you can now SPEAK with 10+ Oxyloss --- code/datums/spell.dm | 2 +- code/game/gamemodes/cult/runes.dm | 2 +- code/game/objects/items/devices/radio/radio.dm | 16 ++++++++-------- .../modules/mob/living/carbon/human/human_say.dm | 6 +++--- code/modules/mob/living/living_say.dm | 3 +++ code/modules/mob/mob.dm | 9 ++++++--- 6 files changed, 22 insertions(+), 16 deletions(-) diff --git a/code/datums/spell.dm b/code/datums/spell.dm index 0a525769ad5..5a149ea7dc0 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -251,7 +251,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) /obj/effect/proc_holder/spell/proc/invocation(mob/user = usr) //spelling the spell out and setting it on recharge/reducing charges amount switch(invocation_type) if("shout") - if(!user.IsVocal()) + if(!user.IsVocal() || user.cannot_speak_loudly()) user.custom_emote(EMOTE_VISIBLE, "дела%(ет,ют)% безумные жесты!") else if(prob(50))//Auto-mute? Fuck that noise diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index e628ab013cd..fbdc4c534a2 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -182,7 +182,7 @@ structure_check() searches for nearby cultist structures required for the invoca if(!L) return if(invocation) - if(!L.IsVocal()) + if(!L.IsVocal() || L.cannot_speak_loudly()) L.custom_emote(EMOTE_VISIBLE, message = pick("рису%(ет,ют)% в воздухе тайные символы.","зловеще жестикулиру%(ет,ют)%.","молча произнос%(ит,ят)% слова призыва.","клад%(ёт,ут)% руки на руну, активируя ее.")) else L.say(invocation) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 45a1bd4ad9f..bcd658b57b4 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -368,23 +368,23 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( /obj/item/radio/talk_into(mob/living/M as mob, list/message_pieces, channel, verbage = "says") if(!on) - return 0 // the device has to be on + return FALSE // the device has to be on // Fix for permacell radios, but kinda eh about actually fixing them. if(!M || !message_pieces) - return 0 + return FALSE // Uncommenting this. To the above comment: // The permacell radios aren't suppose to be able to transmit, this isn't a bug and this "fix" is just making radio wires useless. -Giacom if(wires.is_cut(WIRE_RADIO_TRANSMIT)) // The device has to have all its wires and shit intact - return 0 + return FALSE - if(!M.IsVocal()) - return 0 + if(!M.IsVocal() || M.cannot_speak_loudly()) + return FALSE if(M.is_muzzled()) var/obj/item/clothing/mask/muzzle/muzzle = M.wear_mask if(muzzle.radio_mute) - return 0 + return FALSE var/jammed = FALSE var/turf/position = get_turf(src) @@ -398,10 +398,10 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( switch(message_mode) //special cases // This is if the connection fails if(RADIO_CONNECTION_FAIL) - return 0 + return FALSE // This is if were using either a binary key, or a hivemind through a headset somehow. Dont ask. if(RADIO_CONNECTION_NON_SUBSPACE) - return 1 + return TRUE if(!istype(message_mode, /datum/radio_frequency)) //if not a special case, it should be returning a radio connection return diff --git a/code/modules/mob/living/carbon/human/human_say.dm b/code/modules/mob/living/carbon/human/human_say.dm index b9a48672e86..bcc9abbb6b4 100644 --- a/code/modules/mob/living/carbon/human/human_say.dm +++ b/code/modules/mob/living/carbon/human/human_say.dm @@ -95,13 +95,13 @@ var/obj/item/organ/internal/lungs = get_organ_slot(INTERNAL_ORGAN_LUNGS) if((breathes && !lungs) || (breathes && lungs && lungs.is_dead())) return FALSE - if(getOxyLoss() > 10 || AmountLoseBreath() >= 8 SECONDS) - emote("gasp") - return FALSE if(mind) return !mind.miming return TRUE +/mob/living/carbon/human/cannot_speak_loudly() + return getOxyLoss() > 10 || AmountLoseBreath() >= 8 SECONDS + /mob/living/carbon/human/proc/SetSpecialVoice(new_voice) if(new_voice) diff --git a/code/modules/mob/living/living_say.dm b/code/modules/mob/living/living_say.dm index be1a0129fd8..10ac49a2132 100644 --- a/code/modules/mob/living/living_say.dm +++ b/code/modules/mob/living/living_say.dm @@ -290,6 +290,9 @@ GLOBAL_LIST_EMPTY(channel_to_radio_key) var/list/hsp = handle_speech_problems(message_pieces, verb) verb = hsp["verb"] + if(cannot_speak_loudly()) + return whisper(message) + var/list/used_radios = list() if(handle_message_mode(message_mode, message_pieces, verb, used_radios)) return TRUE diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 08f16f5344b..2d71404ccba 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -818,17 +818,20 @@ //Can the mob see reagents inside of containers? /mob/proc/can_see_reagents() - return 0 + return FALSE /mob/proc/can_see_food() return FALSE //Can this mob leave its location without breaking things terrifically? /mob/proc/can_safely_leave_loc() - return 1 // Yes, you can + return TRUE // Yes, you can /mob/proc/IsVocal() - return 1 + return TRUE + +/mob/proc/cannot_speak_loudly() + return FALSE /mob/proc/get_access_locations() return list()