[MIRROR] Uncomments holymelon "check liked" code, makes it work with the edible component (#7384)

* Uncomments holymelon "check liked" code, makes it work with the edible component (#60697)

* Uncomments holymelon "check liked" code, makes it work with the edible component

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-08-04 15:10:35 +01:00
committed by GitHub
co-authored by MrMelbert
parent cb26e7eff6
commit 65ec7bedf8
2 changed files with 24 additions and 12 deletions
@@ -200,7 +200,7 @@
/datum/mood_event/holy_consumption
description = "<span class='nicegreen'>Truly, that was the food of the Divine!</span>\n"
mood_change = 5
mood_change = 1 // 1 + 5 from it being liked food makes it as good as jolly
timeout = 3 MINUTES
/datum/mood_event/high_five
+23 -11
View File
@@ -65,22 +65,34 @@
/obj/item/food/grown/holymelon/make_dryable()
return //No drying
/obj/item/food/grown/holymelon/MakeEdible()
AddComponent(/datum/component/edible, \
initial_reagents = food_reagents, \
food_flags = food_flags, \
foodtypes = foodtypes, \
volume = max_volume, \
eat_time = eat_time, \
tastes = tastes, \
eatverbs = eatverbs,\
bite_consumption = bite_consumption, \
microwaved_type = microwaved_type, \
junkiness = junkiness, \
check_liked = CALLBACK(src, .proc/check_holyness))
/*
/obj/item/food/grown/holymelon/checkLiked(fraction, mob/M) //chaplains sure love holymelons
if(!ishuman(M))
* Callback to be used with the edible component.
* Checks whether or not the person eating the holymelon
* is a holy_role (chaplain), as chaplains love holymelons.
*/
/obj/item/food/grown/holymelon/proc/check_holyness(fraction, mob/mob_eating)
if(!ishuman(mob_eating))
return
if(last_check_time + 5 SECONDS >= world.time)
return
var/mob/living/carbon/human/holy_person = M
var/mob/living/carbon/human/holy_person = mob_eating
if(!holy_person.mind?.holy_role || HAS_TRAIT(holy_person, TRAIT_AGEUSIA))
return
to_chat(holy_person,span_notice("Truly, a piece of heaven!"))
M.adjust_disgust(-5 + -2.5 * fraction)
to_chat(holy_person, span_notice("Truly, a piece of heaven!"))
SEND_SIGNAL(holy_person, COMSIG_ADD_MOOD_EVENT, "Divine_chew", /datum/mood_event/holy_consumption)
last_check_time = world.time
*/
return FOOD_LIKED
/// Barrel melon Seeds
/obj/item/seeds/watermelon/barrel