Advanced camera consoles use a list for z lock rather than a single z level (#30661)

* Refactor Abductor Console

* Station lock
This commit is contained in:
KorPhaeron
2017-09-28 05:24:34 -05:00
committed by CitadelStationBot
parent 2d48a0cf50
commit 6fca708b33
4 changed files with 13 additions and 8 deletions

View File

@@ -9,7 +9,7 @@
var/datum/action/innate/vest_disguise_swap/vest_disguise_action = new
var/datum/action/innate/set_droppoint/set_droppoint_action = new
var/obj/machinery/abductor/console/console
z_lock = ZLEVEL_STATION_PRIMARY
station_lock_override = TRUE
icon = 'icons/obj/abductor.dmi'
icon_state = "camera"

View File

@@ -3,7 +3,8 @@
desc = "Used to access the various cameras on the station."
icon_screen = "cameras"
icon_keyboard = "security_key"
var/z_lock = null // Lock use to this zlevel
var/list/z_lock = list() // Lock use to these z levels
var/station_lock_override = FALSE
var/mob/camera/aiEye/remote/eyeobj
var/mob/living/current_user = null
var/list/networks = list("SS13")
@@ -13,6 +14,11 @@
light_color = LIGHT_COLOR_RED
/obj/machinery/computer/camera_advanced/Initialize()
. = ..()
if(station_lock_override)
z_lock = GLOB.station_z_levels.Copy()
/obj/machinery/computer/camera_advanced/syndie
icon_keyboard = "syndie_key"
@@ -76,7 +82,7 @@
if(!eyeobj.eye_initialized)
var/camera_location
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
if(!C.can_use() || z_lock && C.z != z_lock)
if(!C.can_use() || z_lock.len && !(C.z in z_lock))
continue
if(C.network & networks)
camera_location = get_turf(C)
@@ -201,7 +207,7 @@
var/list/L = list()
for (var/obj/machinery/camera/cam in GLOB.cameranet.cameras)
if(origin.z_lock && cam.z != origin.z_lock)
if(origin.z_lock.len && !(cam.z in origin.z_lock))
continue
L.Add(cam)

View File

@@ -1,7 +1,6 @@
/obj/machinery/computer/camera_advanced/shuttle_docker
name = "navigation computer"
desc = "Used to designate a precise transit location for a spacecraft."
z_lock = ZLEVEL_STATION_PRIMARY
jump_action = null
var/datum/action/innate/shuttledocker_rotate/rotate_action = new
var/datum/action/innate/shuttledocker_place/place_action = new
@@ -133,7 +132,7 @@
if(!V)
continue
var/obj/docking_port/stationary/S = V
if(z_lock && (S.z != z_lock))
if(z_lock.len && !(S.z in z_lock))
continue
if((S.id == shuttlePortId) || jumpto_ports[S.id])
continue
@@ -222,7 +221,7 @@
if(!V)
continue
var/obj/docking_port/stationary/S = V
if(console.z_lock && (S.z != console.z_lock))
if(console.z_lock.len && !(S.z in console.z_lock))
continue
if(console.jumpto_ports[S.id])
L[S.name] = S

View File

@@ -47,8 +47,8 @@
desc = "Used to designate a precise transit location for the syndicate shuttle."
icon_screen = "syndishuttle"
icon_keyboard = "syndie_key"
z_lock = ZLEVEL_STATION_PRIMARY
shuttleId = "syndicate"
station_lock_override = TRUE
shuttlePortId = "syndicate_custom"
shuttlePortName = "custom location"
jumpto_ports = list("syndicate_ne" = 1, "syndicate_nw" = 1, "syndicate_n" = 1, "syndicate_se" = 1, "syndicate_sw" = 1, "syndicate_s" = 1)