mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
[MIRROR] Adds the message server key to the Chief Engineer's memories. [MDB IGNORE] (#25401)
* Adds the message server key to the Chief Engineer's memories. (#80063) ## About The Pull Request Like the captain has innate knowledge of the golden safe code, the Chief Engineer should know the daily key of the message server. ## Why It's Good For The Game It's a perk of the job. ## Changelog 🆑 add: Added the daily (roundstart) message server key to the Chief Engineer's memories. /🆑 --------- Co-authored-by: distributivgesetz <distributivgesetz93@ gmail.com> * Adds the message server key to the Chief Engineer's memories. --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> Co-authored-by: distributivgesetz <distributivgesetz93@ gmail.com>
This commit is contained in:
co-authored by
distributivgesetz
Ghom
parent
ad8ff4db19
commit
cdd7725743
@@ -213,3 +213,26 @@
|
||||
"[protagonist_name] being arrested by security for [crimes].",
|
||||
"[protagonist_name] committing the crimes of [crimes].",
|
||||
)
|
||||
|
||||
/datum/memory/key/message_server_key
|
||||
var/decrypt_key
|
||||
|
||||
/datum/memory/key/message_server_key/New(
|
||||
datum/mind/memorizer_mind,
|
||||
atom/protagonist,
|
||||
atom/deuteragonist,
|
||||
atom/antagonist,
|
||||
decrypt_key,
|
||||
)
|
||||
src.decrypt_key = decrypt_key
|
||||
return ..()
|
||||
|
||||
/datum/memory/key/message_server_key/get_names()
|
||||
return list("The daily message server key is [decrypt_key]. Keep it a secret from the clown.")
|
||||
|
||||
/datum/memory/key/message_server_key/get_starts()
|
||||
return list(
|
||||
"A sticky note attached to a monitor with [decrypt_key] written on it.",
|
||||
"Poly the parrot screaming \"[decrypt_key]!\" over and over again.",
|
||||
"[protagonist_name] spilling coffee over the message monitor while typing [decrypt_key].",
|
||||
)
|
||||
|
||||
@@ -101,9 +101,6 @@
|
||||
|
||||
/obj/machinery/telecomms/message_server/Initialize(mapload)
|
||||
. = ..()
|
||||
if (!decryptkey)
|
||||
decryptkey = generate_key()
|
||||
|
||||
if (calibrating)
|
||||
calibrating += world.time
|
||||
say("Calibrating... Estimated wait time: [rand(3, 9)] minutes.")
|
||||
@@ -122,17 +119,6 @@
|
||||
if(calibrating)
|
||||
. += span_warning("It's still calibrating.")
|
||||
|
||||
/**
|
||||
* Handles generating a key for the message server, returning it. Doesn't assign
|
||||
* it in this proc, you have to do so yourself.
|
||||
*/
|
||||
/obj/machinery/telecomms/message_server/proc/generate_key()
|
||||
var/generated_key
|
||||
generated_key += pick("the", "if", "of", "as", "in", "a", "you", "from", "to", "an", "too", "little", "snow", "dead", "drunk", "rosebud", "duck", "al", "le")
|
||||
generated_key += pick("diamond", "beer", "mushroom", "assistant", "clown", "captain", "twinkie", "security", "nuke", "small", "big", "escape", "yellow", "gloves", "monkey", "engine", "nuclear", "ai")
|
||||
generated_key += pick("1", "2", "3", "4", "5", "6", "7", "8", "9", "0")
|
||||
return generated_key
|
||||
|
||||
/obj/machinery/telecomms/message_server/process()
|
||||
. = ..()
|
||||
if(calibrating && calibrating <= world.time)
|
||||
@@ -172,9 +158,24 @@
|
||||
id = "Messaging Server"
|
||||
network = "tcommsat"
|
||||
autolinkers = list("messaging")
|
||||
decryptkey = null //random
|
||||
calibrating = 0
|
||||
|
||||
GLOBAL_VAR(preset_station_message_server_key)
|
||||
|
||||
/obj/machinery/telecomms/message_server/preset/Initialize(mapload)
|
||||
. = ..()
|
||||
// Just in case there are multiple preset messageservers somehow once the CE arrives,
|
||||
// we want those on the station to share the same preset default decrypt key shown in his memories.
|
||||
var/is_on_station = is_station_level(z)
|
||||
if(is_on_station && GLOB.preset_station_message_server_key)
|
||||
decryptkey = GLOB.preset_station_message_server_key
|
||||
return
|
||||
//Generate a random password for the message server
|
||||
decryptkey = pick("the", "if", "of", "as", "in", "a", "you", "from", "to", "an", "too", "little", "snow", "dead", "drunk", "rosebud", "duck", "al", "le")
|
||||
decryptkey += pick("diamond", "beer", "mushroom", "assistant", "clown", "captain", "twinkie", "security", "nuke", "small", "big", "escape", "yellow", "gloves", "monkey", "engine", "nuclear", "ai")
|
||||
decryptkey += "[rand(0, 9)]"
|
||||
if(is_on_station)
|
||||
GLOB.preset_station_message_server_key = decryptkey
|
||||
|
||||
// Root messaging signal datum
|
||||
/datum/signal/subspace/messaging
|
||||
|
||||
@@ -48,6 +48,10 @@
|
||||
voice_of_god_power = 1.4 //Command staff has authority
|
||||
|
||||
|
||||
/datum/job/chief_engineer/after_spawn(mob/living/spawned, client/player_client)
|
||||
. = ..()
|
||||
spawned.add_mob_memory(/datum/memory/key/message_server_key, decrypt_key = GLOB.preset_station_message_server_key)
|
||||
|
||||
/datum/job/chief_engineer/get_captaincy_announcement(mob/living/captain)
|
||||
return "Due to staffing shortages, newly promoted Acting Captain [captain.real_name] on deck!"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user