mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Fix: Reset smithing machinery operation state when power is lost during operation, preventing equipment from getting stuck (#29419)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user