Skip to content

Commit

Permalink
add: you can now SPEAK with 10+ Oxyloss (#6036)
Browse files Browse the repository at this point in the history
add: you can now SPEAK with 10+ Oxyloss
  • Loading branch information
NightDawnFox authored Dec 22, 2024
1 parent a58ba3a commit 6a08d76
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion code/datums/spell.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/cult/runes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 8 additions & 8 deletions code/game/objects/items/devices/radio/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions code/modules/mob/living/carbon/human/human_say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/living/living_say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 6a08d76

Please sign in to comment.