[MIRROR] Some griddle fixes (#2235)

* Some griddle fixes (#55548)

* GriddleFixes

* based

* make bacon burn properly

* Some griddle fixes

Co-authored-by: Qustinnus <Floydje123@hotmail.com>
This commit is contained in:
SkyratBot
2020-12-19 03:52:50 +01:00
committed by GitHub
co-authored by Qustinnus
parent 6fd3b6f51f
commit f50d7f31cc
3 changed files with 21 additions and 9 deletions
+1
View File
@@ -823,6 +823,7 @@
food_reagents = list(/datum/reagent/consumable/nutriment/protein = 2, /datum/reagent/consumable/nutriment/vitamin = 1, /datum/reagent/consumable/cooking_oil = 2)
tastes = list("bacon" = 1)
foodtypes = MEAT | BREAKFAST
burns_on_grill = TRUE
/obj/item/food/meat/slab/gondola
name = "gondola meat"
@@ -27,6 +27,11 @@
grill_loop = new(list(src), FALSE)
variant = rand(1,3)
/obj/machinery/griddle/crowbar_act(mob/living/user, obj/item/I)
. = ..()
if(default_deconstruction_crowbar(I, ignore_panel = TRUE))
return
/obj/machinery/griddle/attackby(obj/item/I, mob/user, params)
. = ..()
if(griddled_objects.len >= max_items)
@@ -61,19 +66,22 @@
item_to_grill.flags_1 |= IS_ONTOP_1
RegisterSignal(item_to_grill, COMSIG_MOVABLE_MOVED, .proc/ItemMoved)
RegisterSignal(item_to_grill, COMSIG_GRILL_COMPLETED, .proc/GrillCompleted)
RegisterSignal(item_to_grill, COMSIG_PARENT_QDELETING, .proc/ItemRemovedFromGrill)
update_grill_audio()
/obj/machinery/griddle/proc/ItemRemovedFromGrill(obj/item/I)
I.flags_1 &= ~IS_ONTOP_1
griddled_objects -= I
vis_contents -= I
UnregisterSignal(I, list(COMSIG_GRILL_COMPLETED, COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING))
update_grill_audio()
/obj/machinery/griddle/proc/ItemMoved(obj/item/I, atom/OldLoc, Dir, Forced)
SIGNAL_HANDLER
I.flags_1 &= ~IS_ONTOP_1
griddled_objects -= I
vis_contents -= I
UnregisterSignal(I, COMSIG_GRILL_COMPLETED)
update_grill_audio()
ItemRemovedFromGrill(I)
/obj/machinery/griddle/proc/GrillCompleted(obj/item/source, atom/grilled_result)
SIGNAL_HANDLER
griddled_objects -= source //Old object
AddToGrill(grilled_result)
/obj/machinery/griddle/proc/update_grill_audio()
@@ -82,6 +90,9 @@
else
grill_loop.stop()
///Override to prevent storage dumping onto the griddle until I figure out how to navigate the mess that is storage code to allow me to nicely move the dumped objects onto the griddle.
/obj/machinery/griddle/get_dumping_location(obj/item/storage/source, mob/user)
return
/obj/machinery/griddle/process(delta_time)
..()
+3 -3
View File
@@ -271,9 +271,9 @@
var/mob/living/L = A
L.adjust_fire_stacks(fire_stack_strength * 0.5 * delta_time)
L.IgniteMob()
else if(istype(A, /obj/item) && DT_PROB(10, delta_time))
var/obj/item/O = A
O.microwave_act()
else if(istype(A, /obj/item))
var/obj/item/grilled_item = A
SEND_SIGNAL(grilled_item, COMSIG_ITEM_GRILLED, src, delta_time) //Not a big fan, maybe make this use fire_act() in the future.
/obj/structure/bonfire/process(delta_time)
if(!CheckOxygen())