Fixes AI being able to control not working APCs (#22523)

* Makes destructive analyzer stay in the same menu after deconstruction

* adds conditional check before toggling APC

* Revert

* Update and rename ai_onclick.dm to put the warning message in the right place

* Rename file back to ai_onclick.dm

* logic breakup

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

---------

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
Daniel Lenrd
2023-10-01 14:32:35 +01:00
committed by GitHub
co-authored by Burzah
parent 7b02971f32
commit 97c2452dec
+6
View File
@@ -177,6 +177,12 @@
// APC
/obj/machinery/power/apc/AICtrlClick(mob/living/user) // turns off/on APCs.
if(stat & BROKEN)
return
if(aidisabled)
to_chat(user, "<span class='warning'>Unable to interface: Connection refused.</span>")
return
toggle_breaker(user)