AI multicamera mode fixes (#91105)

## About The Pull Request
Fixes https://github.com/tgstation/tgstation/issues/38307 
Fixes https://github.com/tgstation/tgstation/issues/77159
Fixes https://github.com/tgstation/tgstation/issues/80465
Fixes https://github.com/tgstation/tgstation/issues/85048
Fixes https://github.com/tgstation/tgstation/issues/90748
Fixes https://github.com/tgstation/tgstation/issues/78878

Fixes camera static being hidden in multicamera mode. Also fixes borders
not being drawn


![image](https://github.com/user-attachments/assets/4eae97b3-b8ac-42de-8cb2-36306f949b57)

## Why It's Good For The Game
Wallhacks bad
## Changelog
🆑

fix: fixed camera static not being drawn for AI in multicamera mode.
Also fixes secondary AI cameras not existing and gives them their AI
name

/🆑
This commit is contained in:
Holoo
2025-05-26 16:30:06 +03:00
committed by GitHub
parent 47b08dd752
commit d3a251abec
6 changed files with 20 additions and 7 deletions

View File

@@ -53,7 +53,8 @@
standard_background = new /mutable_appearance()
standard_background.icon = 'icons/hud/pic_in_pic.dmi'
standard_background.icon_state = "background"
standard_background.layer = SPACE_LAYER
standard_background.layer = LOWER_FLOOR_LAYER
standard_background.appearance_flags = PIXEL_SCALE
/atom/movable/screen/movable/pic_in_pic/proc/add_buttons()
var/static/mutable_appearance/move_tab

View File

@@ -376,6 +376,11 @@
/atom/movable/screen/plane_master/camera_static/proc/eye_changed(datum/hud/source, atom/old_eye, atom/new_eye)
SIGNAL_HANDLER
if(istype(new_eye, /obj/effect/landmark/ai_multicam_room))
if(force_hidden)
unhide_plane(source.mymob)
return
if(!iscameramob(new_eye))
if(!force_hidden)
hide_plane(source.mymob)

View File

@@ -45,7 +45,6 @@
*/
/mob/eye/camera/proc/setLoc(destination, force_update = FALSE)
SHOULD_NOT_SLEEP(TRUE)
SHOULD_CALL_PARENT(TRUE)
destination = get_turf(destination)
if(!force_update && (destination == get_turf(src)))

View File

@@ -79,7 +79,7 @@ GLOBAL_DATUM_INIT(cameranet, /datum/cameranet, new)
var/list/add = visibleChunks - eye.visibleCameraChunks
for(var/datum/camerachunk/chunk as anything in remove)
chunk.remove(eye, FALSE)
chunk.remove(eye)
for(var/datum/camerachunk/chunk as anything in add)
chunk.add(eye)

View File

@@ -44,7 +44,7 @@
seenby -= eye
var/client/client = eye.GetViewerClient()
if(client && eye.use_visibility)
if(client && eye.use_visibility && seenby.len == 0)
client.images -= active_static_images
/// Called when a chunk has changed. I.E: A wall was deleted.
@@ -56,7 +56,7 @@
/**
* Updates the chunk, makes sure that it doesn't update too much. If the chunk isn't being watched it will
* instead be flagged to update the next time an AI Eye moves near it.
*
*
* update_delay_buffer is used for cameras that are moving around, which are cyborg inbuilt cameras and
* mecha onboard cameras. This buffer should be usually lower than UPDATE_BUFFER_TIME because
* otherwise a moving camera can run out of its own view before updating static.

View File

@@ -26,7 +26,8 @@
highlighted_background = new /mutable_appearance()
highlighted_background.icon = 'icons/hud/pic_in_pic.dmi'
highlighted_background.icon_state = "background_highlight"
highlighted_background.layer = SPACE_LAYER
highlighted_background.layer = LOWER_FLOOR_LAYER
highlighted_background.appearance_flags = PIXEL_SCALE
/atom/movable/screen/movable/pic_in_pic/ai/add_background()
if((width > 0) && (height > 0))
@@ -87,6 +88,8 @@
icon = 'icons/hud/pic_in_pic.dmi'
icon_state = "room_background"
turf_flags = NOJAUNT
plane = -19
layer = SPACE_LAYER
/turf/open/ai_visible/Initialize(mapload)
. = ..()
@@ -148,7 +151,11 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
..()
/mob/eye/camera/ai/pic_in_pic/setLoc(turf/destination, force_update = FALSE)
. = ..()
if (destination)
abstract_move(destination)
else
moveToNullspace()
update_visibility()
update_camera_telegraphing()
update_ai_detect_hud()
@@ -215,6 +222,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
C.set_view_size(3, 3, FALSE)
C.set_view_center(get_turf(eyeobj))
C.set_ai(src)
C.aiEye.name = "[name] (Secondary AI Eye)"
if(!silent)
to_chat(src, span_notice("Added new multicamera window."))
return C