mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
Fixes techfab print runtime for non apc areas (#83768)
## About The Pull Request Same problem for techfabs as mentioned in #83587 ## Changelog 🆑 fix: techfabs don't runtime & hang when printing in no apc areas /🆑
This commit is contained in:
@@ -384,11 +384,14 @@
|
||||
if(!directly_use_energy(charge_per_item)) // provide the wait time until lathe is ready
|
||||
var/area/my_area = get_area(src)
|
||||
var/obj/machinery/power/apc/my_apc = my_area.apc
|
||||
var/charging_wait = my_apc.time_to_charge(charge_per_item)
|
||||
if(!isnull(charging_wait))
|
||||
say("Unable to continue production, APC overload. Wait [DisplayTimeText(charging_wait, round_seconds_to = 1)] and try again.")
|
||||
if(!QDELETED(my_apc))
|
||||
var/charging_wait = my_apc.time_to_charge(charge_per_item)
|
||||
if(!isnull(charging_wait))
|
||||
say("Unable to continue production, APC overload. Wait [DisplayTimeText(charging_wait, round_seconds_to = 1)] and try again.")
|
||||
else
|
||||
say("Unable to continue production, power grid overload.")
|
||||
else
|
||||
say("Unable to continue production, power grid overload.")
|
||||
say("Unable to continue production, no APC in area.")
|
||||
finalize_build()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user