From d512bc05b3d4c2a19454922c3361f2fa0ed1e465 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Tue, 17 Apr 2018 23:09:19 -0400 Subject: [PATCH] Fixes Theres still an issue with jumping to core and it deleteing the hologram --- code/datums/holocall.dm | 10 +++++----- code/game/machinery/hologram.dm | 8 +++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/code/datums/holocall.dm b/code/datums/holocall.dm index f041d64a70b..a20bfab5a43 100644 --- a/code/datums/holocall.dm +++ b/code/datums/holocall.dm @@ -29,7 +29,7 @@ for(var/I in callees) var/obj/machinery/hologram/holopad/H = I - if(!qdeleted(H) && !(H.stat & NOPOWER)) + if(!QDELETED(H) && !(H.stat & NOPOWER)) dialed_holopads += H var/area/area = get_area(H) LAZYADD(H.holo_calls, src) @@ -44,12 +44,12 @@ /datum/holocall/Destroy() QDEL_NULL(hangup) - var/user_good = !qdeleted(user) + var/user_good = !QDELETED(user) if(user_good) user.reset_perspective() user.remote_control = null - if(exists(eye)) + if(QDELETED(eye)) if(user_good && user.client) for(var/datum/camerachunk/chunk in eye.visibleCameraChunks) chunk.remove(eye) @@ -157,10 +157,10 @@ if((H.stat & NOPOWER)) ConnectionFailure(H) - if(qdeleted(src)) + if(QDELETED(src)) return FALSE - . = !qdeleted(user) && !user.incapacitated() && !qdeleted(calling_holopad) && !(calling_holopad.stat & NOPOWER) && user.loc == calling_holopad.loc + . = !QDELETED(user) && !user.incapacitated() && !QDELETED(calling_holopad) && !(calling_holopad.stat & NOPOWER) && user.loc == calling_holopad.loc if(.) if(!connected_holopad) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index d97f6433a21..24d15fdc3b5 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -52,7 +52,7 @@ var/list/holopads = list() var/temp = "" var/list/holo_calls //array of /datum/holocalls var/datum/holocall/outgoing_call //do not modify the datums only check and call the public procs - var/static/force_answer_call = TRUE //Calls will be automatically answered after a couple rings, here for debugging + var/static/force_answer_call = FALSE //Calls will be automatically answered after a couple rings, here for debugging var/static/list/holopads = list() var/obj/effect/overlay/holoray/ray var/ringing = FALSE @@ -218,7 +218,7 @@ var/list/holopads = list() else if(href_list["disconnectcall"]) var/datum/holocall/call_to_disconnect = locateUID(href_list["disconnectcall"]) - if(exists(call_to_disconnect) && (call_to_disconnect in holo_calls)) + if(!QDELETED(call_to_disconnect)) call_to_disconnect.Disconnect(src) temp = "" @@ -253,7 +253,7 @@ var/list/holopads = list() AI = null - if((stat & NOPOWER) || !validate_user(master)) + if((stat & NOPOWER) || !AI.current || !validate_user(AI)) clear_holo(AI) @@ -297,9 +297,7 @@ var/list/holopads = list() /obj/machinery/hologram/holopad/proc/validate_user(mob/living/user) if(QDELETED(user) || user.incapacitated() || !user.client) - to_chat(world, "FALSE") return FALSE - to_chat(world, "TRUE") return TRUE //Can we display holos there