mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 23:17:02 +01:00
Merge pull request #66 from Miniature/master
AI freelook stuff - should work perfectly now
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user