diff --git a/code/WorkInProgress/AI_Visibility.dm b/code/WorkInProgress/AI_Visibility.dm index 59c23695132..6400c479ca8 100644 --- a/code/WorkInProgress/AI_Visibility.dm +++ b/code/WorkInProgress/AI_Visibility.dm @@ -312,7 +312,7 @@ var/datum/cameranet/cameranet = new() /proc/checkcameravis(atom/A) for(var/obj/machinery/camera/C in view(A,7)) - if(!C.status) + if(!C.status || C.stat == 2) continue return 1 return 0 \ No newline at end of file diff --git a/code/game/machinery/camera.dm b/code/game/machinery/camera.dm index 313eb9275f0..1905f673c2d 100644 --- a/code/game/machinery/camera.dm +++ b/code/game/machinery/camera.dm @@ -6,6 +6,8 @@ return ..() if (world.time <= usr:lastDblClick+2) return ..() + if(istype(usr, /mob/living/silicon/ai) && usr.client.eye == usr:eyeobj) + return ..() //try to find the closest working camera in the same area, switch to it var/area/A = get_area(src) @@ -93,6 +95,12 @@ usr.machine = usr spawn (0) + if(client.eye == eyeobj) + if(checkcameravis(target)) + eyeobj.loc = target.loc + else + usr << "Target is not on or near any active cameras on the station." + return while (usr:cameraFollow == target) if (usr:cameraFollow == null) return diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index d89e68f49ce..1247c8e74b4 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -80,10 +80,10 @@ //if(icon_state == initial(icon_state)) var/icontype = "" + var/list/icons = list("Blue", "HAL9000", "Monochrome", "Rainbow", "HAL9000 Mark2", "Inverted", "Firewall", "Green", "Text", "Smiley", "Angry", "Dorf", "Matrix") if (src.name == "B.A.N.N.E.D." && src.ckey == "Spaceman96") - icontype = input("Please, select a display!", "AI", null/*, null*/) in list("B.A.N.N.E.D.", "Blue", "HAL9000", "Monochrome", "Rainbow", "HAL9000 Mark2", "Inverted", "Firewall", "Green", "Text", "Smiley", "Angry", "Dorf", "Matrix") - else - icontype = input("Please, select a display!", "AI", null/*, null*/) in list("Blue", "HAL9000", "Monochrome", "Rainbow", "HAL9000 Mark2", "Inverted", "Firewall", "Green", "Text", "Smiley", "Angry", "Dorf", "Matrix") + icons += "B.A.N.N.E.D." + icontype = input("Please, select a display!", "AI", null/*, null*/) in icons if(icontype == "Blue") icon_state = "ai" else if(icontype == "HAL9000") @@ -346,9 +346,12 @@ // ok, we're alive, camera is good and in our network... - machine = src - src:current = C - reset_view(C) + if(client.eye == eyeobj) + eyeobj.loc = C.loc + else + machine = src + src:current = C + reset_view(C) return 1 /mob/living/silicon/ai/triggerAlarm(var/class, area/A, var/O, var/alarmsource)