mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 23:17:02 +01:00
Message Monitor
This commit is contained in:
@@ -34,6 +34,23 @@
|
||||
|
||||
light_color = LIGHT_COLOR_DARKGREEN
|
||||
|
||||
/obj/machinery/computer/message_monitor/Initialize()
|
||||
..()
|
||||
return INITIALIZE_HINT_LATELOAD // Give the message server time to initialize
|
||||
|
||||
/obj/machinery/computer/message_monitor/LateInitialize()
|
||||
//Is the server isn't linked to a server, and there's a server available, default it to the first one in the list.
|
||||
if(!linkedServer)
|
||||
if(length(GLOB.message_servers))
|
||||
linkedServer = GLOB.message_servers[1]
|
||||
RegisterSignal(linkedServer, COMSIG_PARENT_QDELETING, .proc/unlink_server)
|
||||
|
||||
/obj/machinery/computer/message_monitor/proc/unlink_server()
|
||||
linkedServer = null
|
||||
|
||||
/obj/machinery/computer/message_monitor/Destroy()
|
||||
customrecepient = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/message_monitor/screwdriver_act(mob/user, obj/item/I)
|
||||
if(emag) //Stops people from just unscrewing the monitor and putting it back to get the console working again.
|
||||
@@ -71,14 +88,6 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/message_monitor/Initialize()
|
||||
..()
|
||||
//Is the server isn't linked to a server, and there's a server available, default it to the first one in the list.
|
||||
if(!linkedServer)
|
||||
if(GLOB.message_servers && GLOB.message_servers.len > 0)
|
||||
linkedServer = GLOB.message_servers[1]
|
||||
return
|
||||
|
||||
/obj/machinery/computer/message_monitor/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -60,14 +60,16 @@ GLOBAL_LIST_EMPTY(message_servers)
|
||||
var/active = TRUE
|
||||
var/decryptkey = "password"
|
||||
|
||||
/obj/machinery/message_server/New()
|
||||
/obj/machinery/message_server/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.message_servers += src
|
||||
decryptkey = GenerateKey()
|
||||
send_pda_message("System Administrator", "system", "This is an automated message. The messaging system is functioning correctly.")
|
||||
..()
|
||||
|
||||
/obj/machinery/message_server/Destroy()
|
||||
GLOB.message_servers -= src
|
||||
QDEL_LIST(pda_msgs)
|
||||
QDEL_LIST(rc_msgs)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/message_server/process()
|
||||
|
||||
Reference in New Issue
Block a user