diff --git a/code/modules/smithing/smith_machinery.dm b/code/modules/smithing/smith_machinery.dm index 3bc35938cf0..67647c142e8 100644 --- a/code/modules/smithing/smith_machinery.dm +++ b/code/modules/smithing/smith_machinery.dm @@ -37,6 +37,9 @@ /obj/machinery/smithing/power_change() if(!..()) return + // If power is lost during operation, reset the operating flag to prevent the machine from getting stuck + if(stat & NOPOWER && operating) + operating = FALSE update_icon(UPDATE_ICON_STATE) /obj/machinery/smithing/item_interaction(mob/living/user, obj/item/used, list/modifiers) @@ -80,6 +83,8 @@ update_icon(ALL) for(var/i in 1 to loops) if(stat & (NOPOWER|BROKEN)) + operating = FALSE + update_icon(ALL) return FALSE use_power(500) if(operation_sound)