[MIRROR] Fixes grills. they went too far this time. (#1728)

* damn man i just want grill and they took it away, damn them all!!! (#55024)

Whoever the damn bastard is who tried to take our grills. know this: we will not bend over while you take the only thing that still makes us happy. We just want to drink energy drinks and grill some hamburgers in peace. This is your final warning, try doing this again and we will assemble a lawn mower squad outside of your house at the early hours of 6AM to make sure you cannot enjoy your sunday morning in peace.

Newfood compatibility is now included by checking IS_EDIBLE() and removing the shitty foodtype that was there before

* Fixes grills. they went too far this time.

Co-authored-by: Qustinnus <Floydje123@hotmail.com>
This commit is contained in:
SkyratBot
2020-11-19 23:57:05 +00:00
committed by GitHub
co-authored by Qustinnus
parent fd345e1fbd
commit c281b2c18d
3 changed files with 25 additions and 26 deletions
@@ -43,31 +43,30 @@
if(I.resistance_flags & INDESTRUCTIBLE)
to_chat(user, "<span class='warning'>You don't feel it would be wise to grill [I]...</span>")
return ..()
if(istype(I, /obj/item/reagent_containers))
if(istype(I, /obj/item/reagent_containers/food) && !istype(I, /obj/item/reagent_containers/food/drinks))
var/obj/item/reagent_containers/food/food_item = I
if(HAS_TRAIT(food_item, TRAIT_NODROP) || (food_item.item_flags & (ABSTRACT | DROPDEL)))
return ..()
else if(food_item.foodtype & GRILLED)
to_chat(user, "<span class='notice'>[food_item] has already been grilled!</span>")
return
else if(grill_fuel <= 0)
to_chat(user, "<span class='warning'>There is not enough fuel!</span>")
return
else if(!grilled_item && user.transferItemToLoc(food_item, src))
grilled_item = food_item
grilled_item.foodtype |= GRILLED
to_chat(user, "<span class='notice'>You put the [grilled_item] on [src].</span>")
update_icon()
grill_loop.start()
return
else
if(I.reagents.has_reagent(/datum/reagent/consumable/monkey_energy))
grill_fuel += (20 * (I.reagents.get_reagent_amount(/datum/reagent/consumable/monkey_energy)))
to_chat(user, "<span class='notice'>You pour the Monkey Energy in [src].</span>")
I.reagents.remove_reagent(/datum/reagent/consumable/monkey_energy, I.reagents.get_reagent_amount(/datum/reagent/consumable/monkey_energy))
update_icon()
return
if(istype(I, /obj/item/reagent_containers/food/drinks))
if(I.reagents.has_reagent(/datum/reagent/consumable/monkey_energy))
grill_fuel += (20 * (I.reagents.get_reagent_amount(/datum/reagent/consumable/monkey_energy)))
to_chat(user, "<span class='notice'>You pour the Monkey Energy in [src].</span>")
I.reagents.remove_reagent(/datum/reagent/consumable/monkey_energy, I.reagents.get_reagent_amount(/datum/reagent/consumable/monkey_energy))
update_icon()
return
else if(IS_EDIBLE(I))
if(HAS_TRAIT(I, TRAIT_NODROP) || (I.item_flags & (ABSTRACT | DROPDEL)))
return ..()
else if(HAS_TRAIT(I, TRAIT_FOOD_GRILLED))
to_chat(user, "<span class='notice'>[I] has already been grilled!</span>")
return
else if(grill_fuel <= 0)
to_chat(user, "<span class='warning'>There is not enough fuel!</span>")
return
else if(!grilled_item && user.transferItemToLoc(I, src))
grilled_item = I
ADD_TRAIT(grilled_item, TRAIT_FOOD_GRILLED, "boomers")
to_chat(user, "<span class='notice'>You put the [grilled_item] on [src].</span>")
update_icon()
grill_loop.start()
return
..()
/obj/machinery/grill/process(delta_time)