[MIRROR] obj screen to atom movable screen (#11719)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-09-21 16:04:35 -07:00
committed by GitHub
parent fd68853af6
commit 303e88c0b2
141 changed files with 1307 additions and 1386 deletions
@@ -32,10 +32,10 @@
// Stuff needed to render the map
var/map_name
var/obj/screen/map_view/cam_screen
var/atom/movable/screen/map_view/cam_screen
var/list/cam_plane_masters
var/obj/screen/background/cam_background
var/obj/screen/skybox/local_skybox
var/atom/movable/screen/background/cam_background
var/atom/movable/screen/skybox/local_skybox
// Stuff for moving cameras
var/turf/last_camera_turf
@@ -65,7 +65,7 @@
cam_plane_masters = get_tgui_plane_masters()
for(var/obj/screen/instance as anything in cam_plane_masters)
for(var/atom/movable/screen/instance as anything in cam_plane_masters)
instance.assigned_map = map_name
instance.del_on_map_removal = FALSE
instance.screen_loc = "[map_name]:CENTER"
+10 -10
View File
@@ -1,17 +1,17 @@
#define DEFAULT_MAP_SIZE 15
/obj/screen/map_view_tg/camera
var/obj/screen/background/cam_background
var/obj/screen/background/cam_foreground
var/obj/screen/skybox/local_skybox
/atom/movable/screen/map_view_tg/camera
var/atom/movable/screen/background/cam_background
var/atom/movable/screen/background/cam_foreground
var/atom/movable/screen/skybox/local_skybox
/obj/screen/map_view_tg/camera/Destroy()
/atom/movable/screen/map_view_tg/camera/Destroy()
QDEL_NULL(cam_background)
QDEL_NULL(cam_foreground)
QDEL_NULL(local_skybox)
return ..()
/obj/screen/map_view_tg/camera/generate_view(map_key)
/atom/movable/screen/map_view_tg/camera/generate_view(map_key)
. = ..()
cam_background = new()
cam_background.del_on_map_removal = FALSE
@@ -37,13 +37,13 @@
cam_foreground.add_overlay(scanlines)
cam_foreground.add_overlay(noise)
/obj/screen/map_view_tg/camera/display_to_client(client/show_to)
/atom/movable/screen/map_view_tg/camera/display_to_client(client/show_to)
show_to.register_map_obj(cam_background)
show_to.register_map_obj(cam_foreground)
show_to.register_map_obj(local_skybox)
. = ..()
/obj/screen/map_view_tg/camera/proc/show_camera(list/visible_turfs, turf/newturf, size_x, size_y)
/atom/movable/screen/map_view_tg/camera/proc/show_camera(list/visible_turfs, turf/newturf, size_x, size_y)
vis_contents = visible_turfs
cam_background.icon_state = "clear"
cam_background.fill_rect(1, 1, size_x, size_y)
@@ -55,7 +55,7 @@
local_skybox.scale_to_view(size_x)
local_skybox.set_position("CENTER", "CENTER", (world.maxx>>1) - newturf.x, (world.maxy>>1) - newturf.y)
/obj/screen/map_view_tg/camera/proc/show_camera_static()
/atom/movable/screen/map_view_tg/camera/proc/show_camera_static()
vis_contents.Cut()
cam_background.icon_state = "scanline2"
cam_background.fill_rect(1, 1, DEFAULT_MAP_SIZE, DEFAULT_MAP_SIZE)
@@ -76,7 +76,7 @@
// Stuff needed to render the map
var/map_name
var/obj/screen/map_view_tg/camera/cam_screen_tg
var/atom/movable/screen/map_view_tg/camera/cam_screen_tg
// Stuff for moving cameras
var/turf/last_camera_turf
+3 -3
View File
@@ -241,11 +241,11 @@
if(!M.client)
return
if(WEAKREF(M) in viewers)
M.overlay_fullscreen("fishbed",/obj/screen/fullscreen/fishbed)
M.overlay_fullscreen("scanlines",/obj/screen/fullscreen/scanline)
M.overlay_fullscreen("fishbed",/atom/movable/screen/fullscreen/fishbed)
M.overlay_fullscreen("scanlines",/atom/movable/screen/fullscreen/scanline)
if(signal_strength <= 1)
M.overlay_fullscreen("whitenoise",/obj/screen/fullscreen/noise)
M.overlay_fullscreen("whitenoise",/atom/movable/screen/fullscreen/noise)
else
M.clear_fullscreen("whitenoise", 0)
else