mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 08:03:43 +01:00
beepbeep
This commit is contained in:
+14
-10
@@ -39,14 +39,18 @@
|
||||
|
||||
//cleans up ALL references :)
|
||||
/datum/holocall/Destroy()
|
||||
if(!qdeleted(user))
|
||||
user.reset_perspective()
|
||||
if(user.client)
|
||||
for(var/datum/camerachunk/chunk in eye.visibleCameraChunks)
|
||||
chunk.remove(eye)
|
||||
user.remote_control = null
|
||||
user = null
|
||||
QDEL_NULL(eye)
|
||||
|
||||
user.reset_perspective()
|
||||
|
||||
user = null
|
||||
hologram.HC = null
|
||||
hologram = null
|
||||
calling_holopad.outgoing_call = null
|
||||
if(hologram)
|
||||
hologram.HC = null
|
||||
hologram = null
|
||||
|
||||
for(var/I in dialed_holopads)
|
||||
var/obj/machinery/hologram/holopad/H = I
|
||||
@@ -54,12 +58,14 @@
|
||||
dialed_holopads.Cut()
|
||||
|
||||
if(calling_holopad)
|
||||
calling_holopad.outgoing_call = null
|
||||
calling_holopad.SetLightsAndPower()
|
||||
calling_holopad = null
|
||||
if(connected_holopad)
|
||||
connected_holopad.SetLightsAndPower()
|
||||
connected_holopad = null
|
||||
|
||||
|
||||
return ..()
|
||||
|
||||
//Gracefully disconnects a holopad `H` from a call. Pads not in the call are ignored. Notifies participants of the disconnection
|
||||
@@ -76,7 +82,7 @@
|
||||
//Forcefully disconnects a holopad `H` from a call. Pads not in the call are ignored.
|
||||
/datum/holocall/proc/ConnectionFailure(obj/machinery/hologram/holopad/H, graceful = FALSE)
|
||||
if(H == connected_holopad || H == calling_holopad)
|
||||
if(!graceful)
|
||||
if(!graceful && H != calling_holopad)
|
||||
calling_holopad.atom_say("Connection failure.")
|
||||
qdel(src)
|
||||
return
|
||||
@@ -142,9 +148,7 @@
|
||||
. = !qdeleted(user) && !user.incapacitated() && !qdeleted(calling_holopad) && !(calling_holopad.stat & NOPOWER) && user.loc == calling_holopad.loc
|
||||
|
||||
if(.)
|
||||
if(connected_holopad)
|
||||
. = !qdeleted(connected_holopad) && !(connected_holopad.stat & NOPOWER)
|
||||
else
|
||||
if(!connected_holopad)
|
||||
. = world.time < (call_start_time + HOLOPAD_MAX_DIAL_TIME)
|
||||
if(!.)
|
||||
calling_holopad.atom_say("No answer recieved.")
|
||||
|
||||
@@ -65,19 +65,25 @@ var/list/holopads = list()
|
||||
|
||||
/obj/machinery/hologram/holopad/Destroy()
|
||||
if(outgoing_call)
|
||||
LAZYADD(holo_calls, outgoing_call)
|
||||
outgoing_call = null
|
||||
outgoing_call.ConnectionFailure(src)
|
||||
|
||||
for(var/I in holo_calls)
|
||||
var/datum/holocall/HC = I
|
||||
HC.ConnectionFailure(src)
|
||||
LAZYCLEARLIST(holo_calls)
|
||||
|
||||
for (var/I in masters)
|
||||
clear_holo(I)
|
||||
holopads -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/hologram/holopad/power_change()
|
||||
if (powered())
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
stat |= ~NOPOWER
|
||||
if(outgoing_call)
|
||||
outgoing_call.ConnectionFailure(src)
|
||||
|
||||
/obj/machinery/hologram/holopad/RefreshParts()
|
||||
var/holograph_range = 4
|
||||
for(var/obj/item/weapon/stock_parts/capacitor/B in component_parts)
|
||||
@@ -116,7 +122,7 @@ var/list/holopads = list()
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/hologram/holopad/attack_hand(mob/living/carbon/human/user)
|
||||
/obj/machinery/hologram/holopad/AltClick(mob/living/carbon/human/user)
|
||||
|
||||
if(..())
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user