mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Can no longer use utensils to eat if you lack the means.
Humanoid mobs can no longer eat when missing a mouth or when their mouth is blocked when using utensils, same as when eating food directly. Fixes #11333.
This commit is contained in:
@@ -1221,6 +1221,7 @@
|
|||||||
#include "code\modules\mob\living\carbon\human\human_damage.dm"
|
#include "code\modules\mob\living\carbon\human\human_damage.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human_defense.dm"
|
#include "code\modules\mob\living\carbon\human\human_defense.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human_defines.dm"
|
#include "code\modules\mob\living\carbon\human\human_defines.dm"
|
||||||
|
#include "code\modules\mob\living\carbon\human\human_helpers.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human_movement.dm"
|
#include "code\modules\mob\living\carbon\human\human_movement.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human_organs.dm"
|
#include "code\modules\mob\living\carbon\human\human_organs.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human_powers.dm"
|
#include "code\modules\mob\living\carbon\human\human_powers.dm"
|
||||||
|
|||||||
@@ -34,6 +34,11 @@
|
|||||||
else
|
else
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
if(ishuman(M))
|
||||||
|
var/mob/living/carbon/human/H = M
|
||||||
|
if(!H.can_eat(src))
|
||||||
|
return
|
||||||
|
|
||||||
if (reagents.total_volume > 0)
|
if (reagents.total_volume > 0)
|
||||||
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
|
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
|
||||||
if(M == user)
|
if(M == user)
|
||||||
|
|||||||
11
code/modules/mob/living/carbon/human/human_helpers.dm
Normal file
11
code/modules/mob/living/carbon/human/human_helpers.dm
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/mob/living/carbon/human/proc/can_eat(var/food, var/feedback = 1)
|
||||||
|
if(!check_has_mouth())
|
||||||
|
if(feedback)
|
||||||
|
src << "Where do you intend to put \the [food]? You don't have a mouth!"
|
||||||
|
return 0
|
||||||
|
var/obj/item/blocked = check_mouth_coverage()
|
||||||
|
if(blocked)
|
||||||
|
if(feedback)
|
||||||
|
src << "<span class='warning'>\The [blocked] is in the way!</span>"
|
||||||
|
return 0
|
||||||
|
return 1
|
||||||
@@ -45,12 +45,7 @@
|
|||||||
if(M == user) //If you're eating it yourself
|
if(M == user) //If you're eating it yourself
|
||||||
if(istype(M,/mob/living/carbon/human))
|
if(istype(M,/mob/living/carbon/human))
|
||||||
var/mob/living/carbon/human/H = M
|
var/mob/living/carbon/human/H = M
|
||||||
if(!H.check_has_mouth())
|
if(!H.can_eat(src))
|
||||||
user << "Where do you intend to put \the [src]? You don't have a mouth!"
|
|
||||||
return
|
|
||||||
var/obj/item/blocked = H.check_mouth_coverage()
|
|
||||||
if(blocked)
|
|
||||||
user << "<span class='warning'>\The [blocked] is in the way!</span>"
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if (fullness <= 50)
|
if (fullness <= 50)
|
||||||
|
|||||||
Reference in New Issue
Block a user