Fixes runtimes when you talk with a cig butt in your mouth (#28250)

* Minor fixes

* Oops

* Funnyman review
This commit is contained in:
DGamerL
2025-02-05 21:26:20 +00:00
committed by GitHub
parent fdc37eae63
commit 1c4a5180ed
9 changed files with 35 additions and 23 deletions
+16 -8
View File
@@ -384,14 +384,22 @@
. = ..()
if(!.)
return
var/can_eat = TRUE
if(iscarbon(user))
var/mob/living/carbon/C = user
if((C.head && (C.head.flags_cover & HEADCOVERSMOUTH)) || (C.wear_mask && (C.wear_mask.flags_cover & MASKCOVERSMOUTH) && !C.wear_mask.up))
if(show_message)
to_chat(C, "<span class='warning'>Your mouth is covered, preventing you from eating!</span>")
can_eat = FALSE
return can_eat
if(!iscarbon(user))
return TRUE
var/mob/living/carbon/C = user
if(!(C.head?.flags_cover & HEADCOVERSMOUTH))
if(!ismask(C.wear_mask))
return TRUE
var/obj/item/clothing/mask/worn_mask = C.wear_mask
if(!(worn_mask.flags_cover & MASKCOVERSMOUTH) || worn_mask.up)
return TRUE
if(show_message)
to_chat(C, "<span class='warning'>Your mouth is covered, preventing you from eating!</span>")
return FALSE
/datum/spell/eat/proc/doHeal(mob/user)
if(ishuman(user))
+4
View File
@@ -1017,3 +1017,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
return FALSE
return cig
/// Changes the speech verb when wearing this item if a value is returned
/obj/item/proc/change_speech_verb()
return