mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-28 03:01:37 +00:00
* Get pants that match or else you gonna look silly yo
* Posters
* Fix other hud elements
* Rereviewed
* Update shotglass.dm
* Fix for new merged PRs
* Typo
* Coming across other stuff
* Update theblob.dm
* No takebacksies
* smh i forget to leave a comment
* Updated for the detgun and cards
* Should have rerun langserver again
* No longer plastic, more in scope
* Damn you bluespace
* Reverting turret logic, out of scope at this point
* Tweak that part
* Went over energy guns again, and fixed UI White's sprite sheet
* Welding masks, glasses, and JUSTICE
* Update portable_atmospherics.dm
* Cleaning up, clearing things up
* Review and suggestions
* Update valve.dm
* More tweaks
* Missing character
* Not distinct lightmasks, so they can be overlays
* Update generator.dm
* Add parameter so holodeck doesn't try to make a perfect copy
* Update unsorted.dm
* Spiders
* Better fix for spiders, fix vamps too
* Ghosts
* Update telekinesis.dm
* Cleaning up old procs
* It's set up to not copy datums... Unless they're in a list
* Donuts, duct tape, and detgun. D3VR coming to Early Access
* Update procs that interact with doors so they call update_state instead
* Forgot one spot, and actually might as well just force lock
* Cleaning up other things... Sigh, and kitty ears
* oops
* Getting used to how it works
* blinds
* Going back to the suit obscuring thing, so it doesn't update all the time
* Missed that from merging master
* I made this PR and forgot about it
* Fix runtimes in cards
* Make things a bit more unified
* Update update_icons.dm
* yarn, really?
* Update library_equipment.dm
* Update shieldgen.dm
* Every time Charlie merges something, I go back and see if I can improve things further
* what's this? more?
* Update misc_special.dm
* wow, paper
* Review
* More reviews
* To be sure, seems like being broken messed something sometimes
* Brought airlocks closer to how TG works to iron out some stuff
* Pizza and morgue
* Doesn't seem to hurt, tried with holodeck
* Revert "Doesn't seem to hurt, tried with holodeck"
This reverts commit 158529302b.
* Icon conflict
* Fix organ damage
* Don't ask how. Why. It's like that on prod too.
* Cutting down on things and updating from TG.
* More flexible. Just in case the thing you stuck it on didn't destroy.
* Hydro was one the things I touched earlier on, better rework it
* Reviews
* Cleaning up further, also bri'ish
* Undo a change I did, and switch over to a more recent implementation
* Update biogenerator.dm
* Rolling back to old airlocks, but with new duct taped note
* Functionally the same. I'd just rather not have the smoothing happen there
* Went over APCs again
* Fix welding helmet names in species files
* Update airlock.dm
* Update persistent_overlay.dm
* Oh, topic
133 lines
4.1 KiB
Plaintext
133 lines
4.1 KiB
Plaintext
GLOBAL_LIST_EMPTY(message_servers)
|
|
|
|
/datum/data_pda_msg
|
|
var/recipient = "Unspecified" //name of the person
|
|
var/sender = "Unspecified" //name of the sender
|
|
var/message = "Blank" //transferred message
|
|
|
|
/datum/data_pda_msg/New(param_rec = "", param_sender = "", param_message = "")
|
|
|
|
if(param_rec)
|
|
recipient = param_rec
|
|
if(param_sender)
|
|
sender = param_sender
|
|
if(param_message)
|
|
message = param_message
|
|
|
|
/datum/data_rc_msg
|
|
var/rec_dpt = "Unspecified" //name of the person
|
|
var/send_dpt = "Unspecified" //name of the sender
|
|
var/message = "Blank" //transferred message
|
|
var/stamp = "Unstamped"
|
|
var/id_auth = "Unauthenticated"
|
|
var/priority = "Normal"
|
|
|
|
/datum/data_rc_msg/New(param_rec = "", param_sender = "", param_message = "", param_stamp = "", param_id_auth = "", param_priority)
|
|
if(param_rec)
|
|
rec_dpt = param_rec
|
|
if(param_sender)
|
|
send_dpt = param_sender
|
|
if(param_message)
|
|
message = param_message
|
|
if(param_stamp)
|
|
stamp = param_stamp
|
|
if(param_id_auth)
|
|
id_auth = param_id_auth
|
|
if(param_priority)
|
|
switch(param_priority)
|
|
if(1)
|
|
priority = "Normal"
|
|
if(2)
|
|
priority = "High"
|
|
if(3)
|
|
priority = "Extreme"
|
|
else
|
|
priority = "Undetermined"
|
|
|
|
/obj/machinery/message_server
|
|
name = "Messaging Server"
|
|
desc = "A machine that processes and routes PDA and request console messages."
|
|
icon = 'icons/obj/machines/telecomms.dmi'
|
|
icon_state = "message_server"
|
|
density = TRUE
|
|
anchored = TRUE
|
|
use_power = IDLE_POWER_USE
|
|
idle_power_usage = 10
|
|
active_power_usage = 100
|
|
|
|
var/list/datum/data_pda_msg/pda_msgs = list()
|
|
var/list/datum/data_rc_msg/rc_msgs = list()
|
|
var/active = TRUE
|
|
var/decryptkey = "password"
|
|
|
|
/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()
|
|
if(active && (stat & (BROKEN | NOPOWER)))
|
|
active = FALSE
|
|
update_icon(UPDATE_ICON_STATE)
|
|
return
|
|
if(prob(3))
|
|
playsound(loc, "computer_ambience", 50, 1)
|
|
|
|
/obj/machinery/message_server/proc/send_pda_message(recipient = "", sender = "", message = "")
|
|
pda_msgs += new/datum/data_pda_msg(recipient,sender,message)
|
|
|
|
/obj/machinery/message_server/proc/send_rc_message(recipient = "", sender = "", message = "", stamp = "", id_auth = "", priority = 1)
|
|
rc_msgs += new/datum/data_rc_msg(recipient,sender,message,stamp,id_auth)
|
|
var/authmsg = "[message]"
|
|
if(id_auth)
|
|
authmsg += " - [id_auth]"
|
|
if(stamp)
|
|
authmsg += " - [stamp]"
|
|
for(var/C in GLOB.allRequestConsoles)
|
|
var/obj/machinery/requests_console/RC = C
|
|
if(ckey(RC.department) == ckey(recipient))
|
|
if(RC.inoperable())
|
|
RC.message_log.Add(list(list("Message lost due to console failure. Please contact [station_name()]'s system administrator or AI for technical assistance.")))
|
|
continue
|
|
if(RC.newmessagepriority < priority)
|
|
RC.newmessagepriority = priority
|
|
RC.icon_state = "req_comp[priority]"
|
|
switch(priority)
|
|
if(2)
|
|
if(!RC.silent)
|
|
playsound(RC.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
|
RC.atom_say("PRIORITY Alert in [sender]")
|
|
RC.message_log.Add(list(list("High Priority message from [sender]:", "[authmsg]")))
|
|
else
|
|
if(!RC.silent)
|
|
playsound(RC.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
|
RC.atom_say("Message from [sender]")
|
|
RC.message_log.Add(list(list("Message [sender]:", "[authmsg]")))
|
|
RC.set_light(2)
|
|
|
|
/obj/machinery/message_server/attack_hand(user as mob)
|
|
to_chat(user, "You toggle PDA message passing from [active ? "On" : "Off"] to [active ? "Off" : "On"]")
|
|
active = !active
|
|
update_icon(UPDATE_ICON_STATE)
|
|
|
|
/obj/machinery/message_server/update_icon_state()
|
|
icon_state = "[initial(icon_state)][panel_open ? "_o" : null][active ? null : "_off"]"
|
|
|
|
/obj/machinery/blackbox_recorder
|
|
icon = 'icons/obj/stationobjs.dmi'
|
|
icon_state = "blackbox"
|
|
name = "Blackbox Recorder"
|
|
density = TRUE
|
|
anchored = TRUE
|
|
use_power = IDLE_POWER_USE
|
|
idle_power_usage = 10
|
|
active_power_usage = 100
|
|
|