mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 16:10:02 +01:00
NTNet Extensibility (#22908)
Fixes https://github.com/Aurorastation/Aurora.3/issues/21944 Spiritual successor of https://github.com/Aurorastation/Aurora.3/pull/22352 Cherrypicked changes from the C3 Crew Management branch, this PR contains all NTNet extensibility features, including Field Relay construction, off-site camera usage (contingent on standing up remote hardware and being out of jamming), etc. This also fixes a handful of outstanding telecomms and view/mobeye-related bugs adjacent to where I was working. changes: - rscadd: "Adds NTNet extensibility, requires new machinery constructed on away-site z-levels." - rscadd: "Breaks NTNet Relay machinery into Quantum Relay ('core' obj on Horizon) and Field Relay (deployable off-site constructions)." - qol: "Embedded cameras (basically every video camera EXCEPT those which are installed on walls) can now be viewed from NTNet-connected z-level, not just connected ones." - rscadd: "Adds several public camera monitor consoles to the Horizon (near where public sensor grid feed consoles already exist)." - rscadd: "Adds some spare camera console boards to Horizon technical storage." - qol: "Adds action button for 'cancel-camera-view' verb while viewing cameras or looking up/down z-level." - bugfix: "Fixes Jockey comms (frequency was missing from ANTAG_FREQS)." - bugfix: "Fixes look-up/look-down actions intermittently failing without first using cancel-camera-view."
This commit is contained in:
@@ -13,6 +13,6 @@
|
||||
on_open_network = TRUE
|
||||
GLOB.cameranet.add_source(src)
|
||||
else
|
||||
GLOB.cameranet.update_visibility(src)
|
||||
GLOB.cameranet.update_visibility(src, FALSE)
|
||||
|
||||
invalidateCameraCache()
|
||||
|
||||
@@ -2325,9 +2325,7 @@
|
||||
|
||||
/mob/living/proc/look_up_open_space(var/turf/T)
|
||||
if(client && !MOB_IS_INCAPACITATED(INCAPACITATION_DISABLED))
|
||||
if(z_eye)
|
||||
reset_view(null)
|
||||
QDEL_NULL(z_eye)
|
||||
if(z_eye && clear_z_eye())
|
||||
return
|
||||
var/turf/above = GET_TURF_ABOVE(T)
|
||||
if(TURF_IS_MIMICING(above))
|
||||
@@ -2348,9 +2346,7 @@
|
||||
|
||||
/mob/living/proc/look_down_open_space(var/turf/T)
|
||||
if(client && !MOB_IS_INCAPACITATED(INCAPACITATION_DISABLED))
|
||||
if(z_eye)
|
||||
reset_view(null)
|
||||
QDEL_NULL(z_eye)
|
||||
if(z_eye && clear_z_eye())
|
||||
return
|
||||
if(TURF_IS_MIMICING(T) && GET_TURF_BELOW(T))
|
||||
z_eye = new /atom/movable/z_observer/z_down(T, src, T)
|
||||
|
||||
@@ -923,6 +923,9 @@ default behaviour is:
|
||||
|
||||
/mob/living/Destroy()
|
||||
cameraFollow = null
|
||||
if(camera_view_cancel_action)
|
||||
camera_view_cancel_action.Remove(src)
|
||||
QDEL_NULL(camera_view_cancel_action)
|
||||
if (length(actions))
|
||||
for (var/datum/action/action in actions)
|
||||
action.Remove(src)
|
||||
|
||||
@@ -502,6 +502,8 @@
|
||||
if(A.CheckRemoval(src))
|
||||
A.Remove(src)
|
||||
|
||||
update_camera_view_action()
|
||||
|
||||
for(var/obj/item/I in src)
|
||||
if(!I.action_button_name)
|
||||
continue
|
||||
@@ -549,6 +551,41 @@
|
||||
|
||||
return
|
||||
|
||||
/mob/living/proc/is_viewing_z_eye()
|
||||
return client && z_eye && client.eye == z_eye
|
||||
|
||||
/mob/living/is_viewing_remote_view()
|
||||
return ..() || is_viewing_z_eye()
|
||||
|
||||
/mob/living/proc/clear_z_eye()
|
||||
if(!z_eye)
|
||||
return FALSE
|
||||
var/was_viewing_z_eye = is_viewing_z_eye()
|
||||
if(was_viewing_z_eye)
|
||||
reset_view(null)
|
||||
QDEL_NULL(z_eye)
|
||||
update_camera_view_action()
|
||||
return was_viewing_z_eye
|
||||
|
||||
/mob/living/proc/update_camera_view_action()
|
||||
if(is_viewing_remote_view())
|
||||
if(!camera_view_cancel_action)
|
||||
camera_view_cancel_action = new
|
||||
camera_view_cancel_action.Grant(src)
|
||||
else if(camera_view_cancel_action?.owner)
|
||||
camera_view_cancel_action.Remove(src)
|
||||
|
||||
/mob/living/proc/cancel_remote_view()
|
||||
if(istype(machine, /obj/structure/machinery/computer/ship))
|
||||
var/obj/structure/machinery/computer/ship/ship_console = machine
|
||||
if(ship_console.viewing_overmap(src))
|
||||
ship_console.unlook(src)
|
||||
update_camera_view_action()
|
||||
return
|
||||
|
||||
cancel_camera()
|
||||
update_camera_view_action()
|
||||
|
||||
/mob/living/update_action_buttons()
|
||||
if(!hud_used) return
|
||||
if(!client) return
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
var/mob/living/cameraFollow = null
|
||||
var/list/datum/action/actions = list()
|
||||
var/datum/action/cancel_camera_view/camera_view_cancel_action
|
||||
|
||||
/// Time of death
|
||||
var/tod = null
|
||||
|
||||
@@ -270,7 +270,7 @@
|
||||
src.unset_machine()
|
||||
src.reset_view(null)
|
||||
return 0
|
||||
if (stat == 2 || !C.status || !(src.network in C.network)) return 0
|
||||
if (stat == 2 || !C.can_use() || !(src.network in C.network)) return 0
|
||||
|
||||
// ok, we're alive, camera is good and in our network...
|
||||
|
||||
|
||||
@@ -411,8 +411,20 @@
|
||||
else
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = loc
|
||||
if(istype(src, /mob/living))
|
||||
var/mob/living/living_mob = src
|
||||
living_mob.update_camera_view_action()
|
||||
return
|
||||
|
||||
/mob/proc/is_viewing_camera()
|
||||
return client && istype(client.eye, /obj/structure/machinery/camera)
|
||||
|
||||
/mob/proc/is_viewing_overmap()
|
||||
return client && istype(client.eye, /obj/effect/overmap)
|
||||
|
||||
/mob/proc/is_viewing_remote_view()
|
||||
return is_viewing_camera() || is_viewing_overmap()
|
||||
|
||||
|
||||
/mob/proc/show_inv(mob/user)
|
||||
user.set_machine(src)
|
||||
@@ -716,6 +728,9 @@
|
||||
set name = "Cancel Camera View"
|
||||
set category = "OOC"
|
||||
unset_machine()
|
||||
if(isliving(src))
|
||||
var/mob/living/living_mob = src
|
||||
living_mob.clear_z_eye()
|
||||
reset_view(null)
|
||||
|
||||
/mob/Topic(href, href_list)
|
||||
|
||||
Reference in New Issue
Block a user