Harddel Fix Pack #42 + Better Live Reftracking Support (#63877)

* Hard Del Fixes, Ref Tracking Changes
This commit is contained in:
LemonInTheDark
2022-01-12 22:46:13 +01:00
committed by GitHub
parent f3f7720d7e
commit f8aad14ae8
109 changed files with 865 additions and 733 deletions
+14 -27
View File
@@ -8,8 +8,6 @@
move_up_action = null
move_down_action = null
var/datum/action/innate/shuttledocker_rotate/rotate_action = new
var/datum/action/innate/shuttledocker_place/place_action = new
var/shuttleId = ""
var/shuttlePortId = ""
var/shuttlePortName = "custom location"
@@ -29,6 +27,8 @@
/obj/machinery/computer/camera_advanced/shuttle_docker/Initialize(mapload)
. = ..()
GLOB.navigation_computers += src
actions += new /datum/action/innate/shuttledocker_rotate(src)
actions += new /datum/action/innate/shuttledocker_place(src)
if(!mapload)
connect_to_shuttle(SSshuttle.get_containing_shuttle(src))
@@ -68,19 +68,9 @@
/obj/machinery/computer/camera_advanced/shuttle_docker/GrantActions(mob/living/user)
if(jumpto_ports.len)
jump_action = new /datum/action/innate/camera_jump/shuttle_docker
actions += new /datum/action/innate/camera_jump/shuttle_docker(src)
..()
if(rotate_action)
rotate_action.target = user
rotate_action.Grant(user)
actions += rotate_action
if(place_action)
place_action.target = user
place_action.Grant(user)
actions += place_action
/obj/machinery/computer/camera_advanced/shuttle_docker/CreateEye()
shuttle_port = SSshuttle.getShuttle(shuttleId)
if(QDELETED(shuttle_port))
@@ -321,10 +311,9 @@
button_icon_state = "mech_cycle_equip_off"
/datum/action/innate/shuttledocker_rotate/Activate()
if(QDELETED(target) || !isliving(target))
if(QDELETED(owner) || !isliving(owner))
return
var/mob/living/C = target
var/mob/camera/ai_eye/remote/remote_eye = C.remote_control
var/mob/camera/ai_eye/remote/remote_eye = owner.remote_control
var/obj/machinery/computer/camera_advanced/shuttle_docker/origin = remote_eye.origin
origin.rotateLandingSpot()
@@ -334,22 +323,20 @@
button_icon_state = "mech_zoom_off"
/datum/action/innate/shuttledocker_place/Activate()
if(QDELETED(target) || !isliving(target))
if(QDELETED(owner) || !isliving(owner))
return
var/mob/living/C = target
var/mob/camera/ai_eye/remote/remote_eye = C.remote_control
var/mob/camera/ai_eye/remote/remote_eye = owner.remote_control
var/obj/machinery/computer/camera_advanced/shuttle_docker/origin = remote_eye.origin
origin.placeLandingSpot(target)
origin.placeLandingSpot(owner)
/datum/action/innate/camera_jump/shuttle_docker
name = "Jump to Location"
button_icon_state = "camera_jump"
/datum/action/innate/camera_jump/shuttle_docker/Activate()
if(QDELETED(target) || !isliving(target))
if(QDELETED(owner) || !isliving(owner))
return
var/mob/living/C = target
var/mob/camera/ai_eye/remote/remote_eye = C.remote_control
var/mob/camera/ai_eye/remote/remote_eye = owner.remote_control
var/obj/machinery/computer/camera_advanced/shuttle_docker/console = remote_eye.origin
playsound(console, 'sound/machines/terminal_prompt_deny.ogg', 25, FALSE)
@@ -382,7 +369,7 @@
if(isnull(selected))
playsound(console, 'sound/machines/terminal_prompt_deny.ogg', 25, FALSE)
return
if(QDELETED(src) || QDELETED(target) || !isliving(target))
if(QDELETED(src) || QDELETED(owner) || !isliving(owner))
return
playsound(src, "terminal_type", 25, FALSE)
var/turf/T = get_turf(L[selected])
@@ -390,6 +377,6 @@
return
playsound(console, 'sound/machines/terminal_prompt_confirm.ogg', 25, FALSE)
remote_eye.setLoc(T)
to_chat(target, span_notice("Jumped to [selected]."))
C.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash/static)
C.clear_fullscreen("flash", 3)
to_chat(owner, span_notice("Jumped to [selected]."))
owner.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash/static)
owner.clear_fullscreen("flash", 3)