diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 04c88e47b1..f409bee147 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -138,6 +138,14 @@ emp_act return 1 return 0 +//Used to check if they can be fed food/drinks/pills +/mob/living/carbon/human/proc/check_mouth_coverage() + var/list/protective_gear = list(head, wear_mask, wear_suit, w_uniform) + for(var/obj/item/gear in protective_gear) + if(istype(gear) && (gear.body_parts_covered & FACE) && (gear.flags & (MASKCOVERSMOUTH|HEADCOVERSMOUTH))) + return gear + return null + /mob/living/carbon/human/proc/check_shields(var/damage = 0, var/attack_text = "the attack") if(l_hand && istype(l_hand, /obj/item/weapon))//Current base is the prob(50-d/3) var/obj/item/weapon/I = l_hand diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index 58b11a61ac..8681503304 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -23,7 +23,7 @@ var/fillevel = gulp_size if(!R.total_volume || !R) - user << "\red The [src.name] is empty!" + user << "The [src.name] is empty!" return 0 if(M == user) @@ -31,10 +31,15 @@ if(istype(M,/mob/living/carbon/human)) var/mob/living/carbon/human/H = M if(H.species.flags & IS_SYNTHETIC) - H << "\red You have a monitor for a head, where do you think you're going to put that?" + H << "You have a monitor for a head, where do you think you're going to put that?" + return + + var/obj/item/blocked = H.check_mouth_coverage() + if(blocked) + user << "\The [blocked] is in the way!" return - M << "\blue You swallow a gulp from \the [src]." + M << "You swallow a gulp from \the [src]." if(reagents.total_volume) reagents.trans_to_ingest(M, gulp_size) @@ -44,14 +49,17 @@ var/mob/living/carbon/human/H = M if(H.species.flags & IS_SYNTHETIC) - H << "\red They have a monitor for a head, where do you think you're going to put that?" + user << "They have a monitor for a head, where do you think you're going to put that?" + return + + var/obj/item/blocked = H.check_mouth_coverage() + if(blocked) + user << "\The [blocked] is in the way!" return - for(var/mob/O in viewers(world.view, user)) - O.show_message("\red [user] attempts to feed [M] [src].", 1) + user.visible_message("[user] attempts to feed [M] [src].") if(!do_mob(user, M)) return - for(var/mob/O in viewers(world.view, user)) - O.show_message("\red [user] feeds [M] [src].", 1) + user.visible_message("[user] feeds [M] [src].") M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index ab064bead7..6e1d443300 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -47,35 +47,44 @@ if(istype(M,/mob/living/carbon/human)) var/mob/living/carbon/human/H = M if(H.species.flags & IS_SYNTHETIC) - H << "\red You have a monitor for a head, where do you think you're going to put that?" + H << "You have a monitor for a head, where do you think you're going to put that?" return + + var/obj/item/blocked = H.check_mouth_coverage() + if(blocked) + user << "\The [blocked] is in the way!" + return + if (fullness <= 50) - M << "\red You hungrily chew out a piece of [src] and gobble it!" + M << "You hungrily chew out a piece of [src] and gobble it!" if (fullness > 50 && fullness <= 150) - M << "\blue You hungrily begin to eat [src]." + M << "You hungrily begin to eat [src]." if (fullness > 150 && fullness <= 350) - M << "\blue You take a bite of [src]." + M << "You take a bite of [src]." if (fullness > 350 && fullness <= 550) - M << "\blue You unwillingly chew a bit of [src]." + M << "You unwillingly chew a bit of [src]." if (fullness > (550 * (1 + M.overeatduration / 2000))) // The more you eat - the more you can eat - M << "\red You cannot force any more of [src] to go down your throat." + M << "You cannot force any more of [src] to go down your throat." return 0 else if(istype(M,/mob/living/carbon/human)) var/mob/living/carbon/human/H = M if(H.species.flags & IS_SYNTHETIC) - H << "\red They have a monitor for a head, where do you think you're going to put that?" + user << "They have a monitor for a head, where do you think you're going to put that?" + return + + var/obj/item/blocked = H.check_mouth_coverage() + if(blocked) + user << "\The [blocked] is in the way!" return if(!istype(M, /mob/living/carbon/slime)) //If you're feeding it to someone else. if (fullness <= (550 * (1 + M.overeatduration / 1000))) - for(var/mob/O in viewers(world.view, user)) - O.show_message("\red [user] attempts to feed [M] [src].", 1) + user.visible_message("[user] attempts to feed [M] [src].") else - for(var/mob/O in viewers(world.view, user)) - O.show_message("\red [user] cannot force anymore of [src] down [M]'s throat.", 1) - return 0 + user.visible_message("[user] cannot force anymore of [src] down [M]'s throat.") + return 0 if(!do_mob(user, M)) return @@ -83,8 +92,7 @@ user.attack_log += text("\[[time_stamp()]\] Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") msg_admin_attack("[key_name(user)] fed [key_name(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)])") - for(var/mob/O in viewers(world.view, user)) - O.show_message("\red [user] feeds [M] [src].", 1) + user.visible_message("[user] feeds [M] [src].") else user << "This creature does not seem to have a mouth!" diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index d0f678ddd9..d38c159868 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -24,10 +24,15 @@ if(istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M if(H.species.flags & IS_SYNTHETIC) - H << "\red You have a monitor for a head, where do you think you're going to put that?" + H << "You have a monitor for a head, where do you think you're going to put that?" + return + + var/obj/item/blocked = H.check_mouth_coverage() + if(blocked) + user << "\The [blocked] is in the way!" return - M << "\blue You swallow [src]." + M << "You swallow [src]." M.drop_from_inventory(src) //icon update if(reagents.total_volume) reagents.trans_to_ingest(M, reagents.total_volume) @@ -40,17 +45,20 @@ var/mob/living/carbon/human/H = M if(H.species.flags & IS_SYNTHETIC) - H << "\red They have a monitor for a head, where do you think you're going to put that?" + user << "They have a monitor for a head, where do you think you're going to put that?" + return + + var/obj/item/blocked = H.check_mouth_coverage() + if(blocked) + user << "\The [blocked] is in the way!" return - for(var/mob/O in viewers(world.view, user)) - O.show_message("\red [user] attempts to force [M] to swallow [src].", 1) + user.visible_message("[user] attempts to force [M] to swallow [src].") if(!do_mob(user, M)) return user.drop_from_inventory(src) //icon update - for(var/mob/O in viewers(world.view, user)) - O.show_message("\red [user] forces [M] to swallow [src].", 1) + user.visible_message("[user] forces [M] to swallow [src].") M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") diff --git a/html/changelogs/HarpyEagle-fooddrinkpill.yml b/html/changelogs/HarpyEagle-fooddrinkpill.yml new file mode 100644 index 0000000000..c9f64eb4d9 --- /dev/null +++ b/html/changelogs/HarpyEagle-fooddrinkpill.yml @@ -0,0 +1,7 @@ + +author: HarpyEagle + +delete-after: True + +changes: + - rscadd: "Masks and helmets that cover the face block feeding food, drinks, and pills."