/obj/screen --> /atom/movable/screen

This commit is contained in:
Artur
2021-07-29 13:57:19 +03:00
parent 30016f38a8
commit 82ccfc40dc
173 changed files with 1267 additions and 1267 deletions
+1 -1
View File
@@ -91,7 +91,7 @@
var/multicam_on = FALSE
var/obj/screen/movable/pic_in_pic/ai/master_multicam
var/atom/movable/screen/movable/pic_in_pic/ai/master_multicam
var/list/multicam_screens = list()
var/list/all_eyes = list()
var/max_multicams = 6
+16 -16
View File
@@ -1,34 +1,34 @@
//Picture in picture
/obj/screen/movable/pic_in_pic/ai
/atom/movable/screen/movable/pic_in_pic/ai
var/mob/living/silicon/ai/ai
var/mutable_appearance/highlighted_background
var/highlighted = FALSE
var/mob/camera/aiEye/pic_in_pic/aiEye
/obj/screen/movable/pic_in_pic/ai/Initialize()
/atom/movable/screen/movable/pic_in_pic/ai/Initialize()
. = ..()
aiEye = new /mob/camera/aiEye/pic_in_pic()
aiEye.screen = src
/obj/screen/movable/pic_in_pic/ai/Destroy()
/atom/movable/screen/movable/pic_in_pic/ai/Destroy()
set_ai(null)
QDEL_NULL(aiEye)
return ..()
/obj/screen/movable/pic_in_pic/ai/Click()
/atom/movable/screen/movable/pic_in_pic/ai/Click()
..()
if(ai)
ai.select_main_multicam_window(src)
/obj/screen/movable/pic_in_pic/ai/make_backgrounds()
/atom/movable/screen/movable/pic_in_pic/ai/make_backgrounds()
..()
highlighted_background = new /mutable_appearance()
highlighted_background.icon = 'icons/misc/pic_in_pic.dmi'
highlighted_background.icon_state = "background_highlight"
highlighted_background.layer = SPACE_LAYER
/obj/screen/movable/pic_in_pic/ai/add_background()
/atom/movable/screen/movable/pic_in_pic/ai/add_background()
if((width > 0) && (height > 0))
var/matrix/M = matrix()
M.Scale(width + 0.5, height + 0.5)
@@ -37,35 +37,35 @@
standard_background.transform = M
add_overlay(highlighted ? highlighted_background : standard_background)
/obj/screen/movable/pic_in_pic/ai/set_view_size(width, height, do_refresh = TRUE)
/atom/movable/screen/movable/pic_in_pic/ai/set_view_size(width, height, do_refresh = TRUE)
aiEye.static_visibility_range = (round(max(width, height) / 2) + 1)
if(ai)
ai.camera_visibility(aiEye)
..()
/obj/screen/movable/pic_in_pic/ai/set_view_center(atom/target, do_refresh = TRUE)
/atom/movable/screen/movable/pic_in_pic/ai/set_view_center(atom/target, do_refresh = TRUE)
..()
aiEye.setLoc(get_turf(target))
/obj/screen/movable/pic_in_pic/ai/refresh_view()
/atom/movable/screen/movable/pic_in_pic/ai/refresh_view()
..()
aiEye.setLoc(get_turf(center))
/obj/screen/movable/pic_in_pic/ai/proc/highlight()
/atom/movable/screen/movable/pic_in_pic/ai/proc/highlight()
if(highlighted)
return
highlighted = TRUE
cut_overlay(standard_background)
add_overlay(highlighted_background)
/obj/screen/movable/pic_in_pic/ai/proc/unhighlight()
/atom/movable/screen/movable/pic_in_pic/ai/proc/unhighlight()
if(!highlighted)
return
highlighted = FALSE
cut_overlay(highlighted_background)
add_overlay(standard_background)
/obj/screen/movable/pic_in_pic/ai/proc/set_ai(mob/living/silicon/ai/new_ai)
/atom/movable/screen/movable/pic_in_pic/ai/proc/set_ai(mob/living/silicon/ai/new_ai)
if(ai)
ai.multicam_screens -= src
ai.all_eyes -= aiEye
@@ -120,7 +120,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
invisibility = INVISIBILITY_OBSERVER
mouse_opacity = MOUSE_OPACITY_ICON
icon_state = "ai_pip_camera"
var/obj/screen/movable/pic_in_pic/ai/screen
var/atom/movable/screen/movable/pic_in_pic/ai/screen
var/list/cameras_telegraphed = list()
var/telegraph_cameras = TRUE
var/telegraph_range = 7
@@ -204,7 +204,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
if(!silent)
to_chat(src, "<span class='warning'>Cannot place more than [max_multicams] multicamera windows.</span>")
return
var/obj/screen/movable/pic_in_pic/ai/C = new /obj/screen/movable/pic_in_pic/ai()
var/atom/movable/screen/movable/pic_in_pic/ai/C = new /atom/movable/screen/movable/pic_in_pic/ai()
C.set_view_size(3, 3, FALSE)
C.set_view_center(get_turf(eyeobj))
C.set_ai(src)
@@ -235,7 +235,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
reset_perspective(GLOB.ai_camera_room_landmark)
if(client)
for(var/V in multicam_screens)
var/obj/screen/movable/pic_in_pic/P = V
var/atom/movable/screen/movable/pic_in_pic/P = V
P.show_to(client)
/mob/living/silicon/ai/proc/end_multicam()
@@ -245,7 +245,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
select_main_multicam_window(null)
if(client)
for(var/V in multicam_screens)
var/obj/screen/movable/pic_in_pic/P = V
var/atom/movable/screen/movable/pic_in_pic/P = V
P.unshow_to(client)
reset_perspective()
to_chat(src, "<span class='notice'>Multiple-camera viewing mode deactivated.</span>")
+1 -1
View File
@@ -6,7 +6,7 @@
make_laws()
/mob/living/silicon/proc/post_lawchange(announce = TRUE)
throw_alert("newlaw", /obj/screen/alert/newlaw)
throw_alert("newlaw", /atom/movable/screen/alert/newlaw)
if(announce && last_lawchange_announce != world.time)
to_chat(src, "<b>Your laws have been changed.</b>")
addtimer(CALLBACK(src, .proc/show_laws), 0)
@@ -58,15 +58,15 @@
if(0.75 to INFINITY)
clear_alert("charge")
if(0.5 to 0.75)
throw_alert("charge", /obj/screen/alert/lowcell, 1)
throw_alert("charge", /atom/movable/screen/alert/lowcell, 1)
if(0.25 to 0.5)
throw_alert("charge", /obj/screen/alert/lowcell, 2)
throw_alert("charge", /atom/movable/screen/alert/lowcell, 2)
if(0.01 to 0.25)
throw_alert("charge", /obj/screen/alert/lowcell, 3)
throw_alert("charge", /atom/movable/screen/alert/lowcell, 3)
else
throw_alert("charge", /obj/screen/alert/emptycell)
throw_alert("charge", /atom/movable/screen/alert/emptycell)
else
throw_alert("charge", /obj/screen/alert/nocell)
throw_alert("charge", /atom/movable/screen/alert/nocell)
//Robots on fire
/mob/living/silicon/robot/handle_fire()
@@ -23,9 +23,9 @@
robot_modules_background.layer = HUD_LAYER //Objects that appear on screen are on layer ABOVE_HUD_LAYER, UI should be just below it.
robot_modules_background.plane = HUD_PLANE
inv1 = new /obj/screen/robot/module1()
inv2 = new /obj/screen/robot/module2()
inv3 = new /obj/screen/robot/module3()
inv1 = new /atom/movable/screen/robot/module1()
inv2 = new /atom/movable/screen/robot/module2()
inv3 = new /atom/movable/screen/robot/module3()
previous_health = health
@@ -598,7 +598,7 @@
if(wires.is_cut(WIRE_LOCKDOWN))
state = TRUE
if(state)
throw_alert("locked", /obj/screen/alert/locked)
throw_alert("locked", /atom/movable/screen/alert/locked)
else
clear_alert("locked")
locked_down = state
@@ -611,7 +611,7 @@
module.rebuild_modules()
update_icons()
if(emagged)
throw_alert("hacked", /obj/screen/alert/hacked)
throw_alert("hacked", /atom/movable/screen/alert/hacked)
else
clear_alert("hacked")
@@ -26,15 +26,15 @@
var/previous_health
//Hud stuff
var/obj/screen/inv1 = null
var/obj/screen/inv2 = null
var/obj/screen/inv3 = null
var/obj/screen/lamp_button = null
var/obj/screen/thruster_button = null
var/obj/screen/hands = null
var/atom/movable/screen/inv1 = null
var/atom/movable/screen/inv2 = null
var/atom/movable/screen/inv3 = null
var/atom/movable/screen/lamp_button = null
var/atom/movable/screen/thruster_button = null
var/atom/movable/screen/hands = null
var/shown_robot_modules = 0 //Used to determine whether they have the module menu shown or not
var/obj/screen/robot_modules_background
var/atom/movable/screen/robot_modules_background
//3 Modules can be activated at any one time.
var/obj/item/robot_module/module = null
@@ -90,14 +90,14 @@
///Lamp brightness. Starts at 3, but can be 1 - 5.
var/lamp_intensity = 3
///Lamp button reference
var/obj/screen/robot/lamp/lampButton
var/atom/movable/screen/robot/lamp/lampButton
var/sight_mode = 0
hud_possible = list(ANTAG_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_BATT_HUD, DIAG_TRACK_HUD)
///The reference to the built-in tablet that borgs carry.
var/obj/item/modular_computer/tablet/integrated/modularInterface
var/obj/screen/robot/modPC/interfaceButton
var/atom/movable/screen/robot/modPC/interfaceButton
var/list/upgrades = list()
@@ -144,6 +144,6 @@
P.on_hit(src, 0, def_zone)
return BULLET_ACT_HIT
/mob/living/silicon/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash/static)
/mob/living/silicon/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /atom/movable/screen/fullscreen/flash/static)
if(affect_silicon)
return ..()