mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
[MIRROR] fixes runtime when deconstruct() on a grill with no item in it. [MDB IGNORE] (#16004)
* fixes runtime when deconstruct() on a grill with no item in it. (#69602) * fixes runtime when deconstruct() on a grill with no item in it. Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
This commit is contained in:
@@ -116,7 +116,8 @@
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/grill/deconstruct(disassembled = TRUE)
|
||||
finish_grill()
|
||||
if(grilled_item)
|
||||
finish_grill()
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
new /obj/item/stack/sheet/iron(loc, 5)
|
||||
new /obj/item/stack/rods(loc, 5)
|
||||
@@ -134,9 +135,10 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/grill/proc/finish_grill()
|
||||
SEND_SIGNAL(grilled_item, COMSIG_GRILL_FOOD, grilled_item, grill_time)
|
||||
if(grilled_item)
|
||||
SEND_SIGNAL(grilled_item, COMSIG_GRILL_FOOD, grilled_item, grill_time)
|
||||
UnregisterSignal(grilled_item, COMSIG_GRILL_COMPLETED)
|
||||
grill_time = 0
|
||||
UnregisterSignal(grilled_item, COMSIG_GRILL_COMPLETED)
|
||||
grill_loop.stop()
|
||||
|
||||
///Called when a food is transformed by the grillable component
|
||||
|
||||
Reference in New Issue
Block a user