Skip to content

Commit

Permalink
[MIRROR] GAS no longer lose their voice from allergies
Browse files Browse the repository at this point in the history
  • Loading branch information
SierraKomodo authored and SierraHelper committed Dec 8, 2024
1 parent cf3c5db commit e7a5e3a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/allergy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Also checks if medications that stop allergies from triggering are in system. Th
if (trait_flags & SEVERE_ALLERGY)
add_chemical_effect(CE_BREATHLOSS, 2)
add_chemical_effect(CE_PULSE, 2)
if (prob(50))
if (prob(50) && active_breathing())
add_chemical_effect(CE_VOICELOSS, 1)

if (!can_feel_pain() || world.time < next_allergy_time || chem_effects[CE_STABLE])
Expand Down
6 changes: 6 additions & 0 deletions code/modules/mob/living/carbon/breathe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,9 @@
/mob/living/carbon/proc/handle_post_breath(datum/gas_mixture/breath)
if(breath)
loc.assume_air(breath) //by default, exhale


/// Whether or not the mob has lungs that use active breathing. Used for various effects that shouldn't occur on mobs that just don't breathe.
/mob/living/carbon/proc/active_breathing()
var/obj/item/organ/internal/lungs/lungs = internal_organs_by_name[species.breathing_organ]
return lungs?.active_breathing

0 comments on commit e7a5e3a

Please sign in to comment.