test maybe revert

This commit is contained in:
Molti
2023-12-01 18:48:47 -06:00
parent 0e421ebf5f
commit 98c5ef1b93
3 changed files with 42 additions and 31 deletions

View File

@@ -75,7 +75,6 @@
#define PIPECRAWL_IMAGES_PLANE 20
///AI Camera Static
#define CAMERA_STATIC_LAYER 21
#define CAMERA_STATIC_PLANE 21
///Anything that wants to be part of the game plane, but also wants to draw above literally everything else

View File

@@ -204,6 +204,7 @@
if(visible_icon && eye_user.client)
eye_user.client.images -= user_image
user_image = image(icon,loc,icon_state,FLY_LAYER)
SET_PLANE(user_image, ABOVE_GAME_PLANE, destination)
eye_user.client.images += user_image
/mob/camera/aiEye/remote/relaymove(mob/user,direct)

View File

@@ -17,6 +17,7 @@
var/static_visibility_range = 16
var/ai_detector_visible = TRUE
var/ai_detector_color = COLOR_RED
interaction_range = INFINITY
/mob/camera/aiEye/Initialize(mapload)
. = ..()
@@ -25,6 +26,13 @@
update_ai_detect_hud()
setLoc(loc, TRUE)
/mob/camera/aiEye/examine(mob/user) //Displays a silicon's laws to ghosts
. = ..()
if(istype(ai) && ai.laws && isobserver(user))
. += "<b>[ai] has the following laws:</b>"
for(var/law in ai.laws.get_law_list(include_zeroth = TRUE))
. += law
/mob/camera/aiEye/proc/update_ai_detect_hud()
var/datum/atom_hud/ai_detector/hud = GLOB.huds[DATA_HUD_AI_DETECT]
var/list/old_images = hud_list[AI_DETECT_HUD]
@@ -71,30 +79,32 @@
// It will also stream the chunk that the new loc is in.
/mob/camera/aiEye/proc/setLoc(T, force_update = FALSE)
if(ai)
if(!(isturf(ai.loc) || istype(ai.loc, /obj/machinery/ai/data_core)))
return
T = get_turf(T)
if(!force_update && (T == get_turf(src)) )
return //we are already here!
if (T)
forceMove(T)
else
moveToNullspace()
if(use_static)
ai.camera_visibility(src)
if(ai.client && !ai.multicam_on)
ai.client.eye = src
update_ai_detect_hud()
update_parallax_contents()
//Holopad
if(istype(ai.current, /obj/machinery/holopad))
var/obj/machinery/holopad/H = ai.current
H.move_hologram(ai, T)
if(ai.camera_light_on)
ai.light_cameras()
if(ai.master_multicam)
ai.master_multicam.refresh_view()
if(!ai)
return
if(!(isturf(ai.loc) || istype(ai.loc, /obj/machinery/ai/data_core)))
return
T = get_turf(T)
if(!force_update && (T == get_turf(src)) )
return //we are already here!
if (T)
forceMove(T)
else
moveToNullspace()
if(use_static)
ai.camera_visibility(src)
if(ai.client && !ai.multicam_on)
ai.client.eye = src
update_ai_detect_hud()
update_parallax_contents()
//Holopad
if(istype(ai.current, /obj/machinery/holopad))
var/obj/machinery/holopad/H = ai.current
H.move_hologram(ai, T)
if(ai.camera_light_on)
ai.light_cameras()
if(ai.master_multicam)
ai.master_multicam.refresh_view()
/mob/camera/aiEye/Move()
return 0
@@ -120,12 +130,13 @@
return ..()
/atom/proc/move_camera_by_click()
if(isAI(usr))
var/mob/living/silicon/ai/AI = usr
if(AI.eyeobj && (AI.multicam_on || (AI.client.eye == AI.eyeobj)) && (AI.eyeobj.z == z))
AI.cameraFollow = null
if (isturf(loc) || isturf(src))
AI.eyeobj.setLoc(src)
if(!isAI(usr))
return
var/mob/living/silicon/ai/AI = usr
if(AI.eyeobj && (AI.multicam_on || (AI.client.eye == AI.eyeobj)) && (AI.eyeobj.z == z))
AI.cameraFollow = null
if (isturf(loc) || isturf(src))
AI.eyeobj.setLoc(src)
// This will move the AIEye. It will also cause lights near the eye to light up, if toggled.
// This is handled in the proc below this one.