Files
Bubberstation/code/datums/request_message.dm
distributivgesetz f8b41f9442 Changes occurrences of recieve in code to receive (#80065)
## About The Pull Request

I've stumbled across this enough to finally go through the entire
codebase and fix it. I left out changelogs simply because rewriting
history logs is bad.
## Why It's Good For The Game

I find it pretty annoying because I stumble across words that are
misspelled for a few seconds, and I'm likely not the only one who feels
like this. Less spelling mistakes in code are better.
## Changelog
🆑
spellcheck: Occurrences of "recieve" has been changed to "receive".
/🆑
2023-12-02 14:50:57 -07:00

58 lines
2.1 KiB
Plaintext

/datum/request_message
/// The r5tname of the department request console that sent the message
var/sender_department = ""
/// The time when the message arrived
var/received_time = null
/// The message itself
var/content = ""
/// The name on the ID that verified the message
var/message_verified_by = ""
/// The name of the stamp that verified the message
var/message_stamped_by = ""
/// The priority of the message
var/priority = ""
/// The radio frequency the message should be broadcasted on
var/radio_freq = null
/// The type of the request
var/request_type = ""
/// A list to be appended after the message, for example, list of ores
var/appended_list = list()
/datum/request_message/New(data)
sender_department = data["sender_department"]
received_time = station_time_timestamp()
content = data["message"]
message_verified_by = data["verified"]
message_stamped_by = data["stamped"]
priority = data["priority"]
radio_freq = data["notify_freq"]
request_type = data["ore_update"] ? ORE_UPDATE_REQUEST : data["request_type"]
var/list/data_appended_list = data["appended_list"]
if(data_appended_list && data_appended_list.len)
appended_list = data_appended_list
/// Retrieves the alert spoken/blared by the requests console that receives this message
/datum/request_message/proc/get_alert()
var/authenticated = ""
if(message_verified_by)
authenticated = ", Verified by [message_verified_by] (Authenticated)"
else if (message_stamped_by)
authenticated = ", Stamped by [message_stamped_by] (Authenticated)"
return "Message from [sender_department][authenticated]"
/// Converts the message into a format for the tgui ui_data json
/datum/request_message/proc/message_ui_data()
var/list/ui_data = list()
ui_data["sender_department"] = sender_department
ui_data["received_time"] = received_time
ui_data["content"] = content
ui_data["message_verified_by"] = message_verified_by
ui_data["message_stamped_by"] = message_stamped_by
ui_data["priority"] = priority
ui_data["request_type"] = request_type
ui_data["appended_list"] = appended_list
return ui_data