From 8232841a73df74328e74cd0eab4424d0c42240a3 Mon Sep 17 00:00:00 2001 From: alex-gh Date: Mon, 23 Dec 2013 07:39:40 +0100 Subject: [PATCH 1/3] Made message key generation a global helper function. --- code/__HELPERS/names.dm | 7 +++++++ code/modules/research/message_server.dm | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/code/__HELPERS/names.dm b/code/__HELPERS/names.dm index f014f67e5cd..9f2ac483290 100644 --- a/code/__HELPERS/names.dm +++ b/code/__HELPERS/names.dm @@ -230,6 +230,13 @@ var/syndicate_code_response//Code response for traitors. return code_phrase +/proc/GenerateKey() + var/newKey + newKey += pick("the", "if", "of", "as", "in", "a", "you", "from", "to", "an", "too", "little", "snow", "dead", "drunk", "rosebud", "duck", "al", "le") + newKey += pick("diamond", "beer", "mushroom", "assistant", "clown", "captain", "twinkie", "security", "nuke", "small", "big", "escape", "yellow", "gloves", "monkey", "engine", "nuclear", "ai") + newKey += pick("1", "2", "3", "4", "5", "6", "7", "8", "9", "0") + return newKey + /* //This proc tests the gen above. /client/verb/test_code_phrase() diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm index 6ccf529e763..0d6d3448008 100644 --- a/code/modules/research/message_server.dm +++ b/code/modules/research/message_server.dm @@ -71,14 +71,6 @@ var/global/list/obj/machinery/message_server/message_servers = list() ..() return -/obj/machinery/message_server/proc/GenerateKey() - //Feel free to move to Helpers. - var/newKey - newKey += pick("the", "if", "of", "as", "in", "a", "you", "from", "to", "an", "too", "little", "snow", "dead", "drunk", "rosebud", "duck", "al", "le") - newKey += pick("diamond", "beer", "mushroom", "assistant", "clown", "captain", "twinkie", "security", "nuke", "small", "big", "escape", "yellow", "gloves", "monkey", "engine", "nuclear", "ai") - newKey += pick("1", "2", "3", "4", "5", "6", "7", "8", "9", "0") - return newKey - /obj/machinery/message_server/process() //if(decryptkey == "password") // decryptkey = generateKey() From 6e0f7ac0be68cf0c82e0cf79673a3ef3ba2b7b10 Mon Sep 17 00:00:00 2001 From: alex-gh Date: Mon, 23 Dec 2013 08:01:49 +0100 Subject: [PATCH 2/3] Made explosive implants use a random phrase instead of preset one --- code/game/objects/items/weapons/implants/implant.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 26f7ba4dc04..0f85257cd32 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -130,6 +130,10 @@ Implant Specifics:
"} var/phrase = "supercalifragilisticexpialidocious" icon_state = "implant_evil" + New() + ..() + phrase=GenerateKey() + get_data() var/dat = {" Implant Specifications:
From 0fb09aa54bb4fd2191b1bed9d3d19e41b0b1ccb8 Mon Sep 17 00:00:00 2001 From: alex-gh Date: Mon, 23 Dec 2013 08:02:39 +0100 Subject: [PATCH 3/3] Nuke ops now know the code to their explosive implant --- code/game/gamemodes/nuclear/nuclear.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index aaaa37a706d..19f03028b2b 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -193,6 +193,10 @@ for(var/datum/objective/objective in syndicate.objectives) syndicate.current << "Objective #[obj_count]: [objective.explanation_text]" obj_count++ + for(var/obj/item/weapon/implant/explosive/E in syndicate.current.contents) + if (E.implanted) + syndicate.current << "The activation code for your explosive implant is [E.phrase]" + syndicate.store_memory("The activation code for your explosive implant is [E.phrase]") return