Fix security camera consoles, hopefully (#13507)

This commit is contained in:
Wildkins
2022-04-14 20:27:39 -03:00
committed by GitHub
parent c0332fa943
commit 8a28865697
16 changed files with 236 additions and 247 deletions
@@ -112,6 +112,11 @@
if(iscarbon(user))
playsound(src, 'sound/machines/pda_click.ogg', 20)
/obj/item/modular_computer/CouldNotUseTopic(var/mob/user)
..()
if(user.machine == src)
user.unset_machine()
/obj/item/modular_computer/emag_act(var/remaining_charges, var/mob/user)
if(computer_emagged)
to_chat(user, SPAN_WARNING("\The [src] has already been emagged."))
@@ -157,12 +157,11 @@
current_camera = null
/datum/nano_module/camera_monitor/check_eye(var/mob/user as mob)
if(istype(ui_host(), /obj/machinery/computer))
var/obj/machinery/computer/C = ui_host()
if (C.use_check_and_message(user) || C.inoperable())
var/obj/item/modular_computer/MC = user.machine
if(istype(MC) && ui_host() == MC)
if(!MC.working || user.blinded || user.stat)
user.unset_machine()
return -1
if(user.blinded)
return -1
if(!current_camera)
return 0
var/viewflag = current_camera.check_eye(user)