From 863a9deb7b9bc612fb4a4b3caf1c1665e9a9f017 Mon Sep 17 00:00:00 2001 From: cib Date: Sat, 9 Feb 2013 17:55:53 +0100 Subject: [PATCH] Added NT relation preference. --- code/game/gamemodes/game_mode.dm | 16 +++- code/game/gamemodes/intercept_report.dm | 110 +++++++----------------- code/game/gamemodes/traitor/traitor.dm | 6 ++ code/modules/client/preferences.dm | 9 ++ 4 files changed, 62 insertions(+), 79 deletions(-) diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index ecac47c66df..f948f769061 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -204,12 +204,12 @@ Implants; /datum/game_mode/proc/send_intercept() - var/intercepttext = "Cent. Com. Update Requested staus information:
" + var/intercepttext = "Cent. Com. Update Requested status information:
" intercepttext += " Cent. Com has recently been contacted by the following syndicate affiliated organisations in your area, please investigate any information you may have:" var/list/possible_modes = list() possible_modes.Add("revolution", "wizard", "nuke", "traitor", "malf", "changeling", "cult") - possible_modes -= "[ticker.mode]" + //possible_modes -= "[ticker.mode]" var/number = pick(2, 3) var/i = 0 for(i = 0, i < number, i++) @@ -428,3 +428,15 @@ proc/display_roundstart_logout_report() for(var/mob/M in mob_list) if(M.client && M.client.holder) M << msg + + +proc/get_nt_opposed() + var/list/dudes = list() + for(var/mob/living/carbon/human/man in player_list) + if(man.client) + if(man.client.prefs.nanotrasen_relation == "Opposed") + dudes += man + else if(man.client.prefs.nanotrasen_relation == "Skeptical" && prob(50)) + dudes += man + if(dudes.len == 0) return null + return pick(dudes) \ No newline at end of file diff --git a/code/game/gamemodes/intercept_report.dm b/code/game/gamemodes/intercept_report.dm index 35b5f42c699..f4e1b706c0a 100644 --- a/code/game/gamemodes/intercept_report.dm +++ b/code/game/gamemodes/intercept_report.dm @@ -111,114 +111,70 @@ return num2text(md5(num2text(rand(1,10000)))) */ +/datum/intercept_text/proc/get_suspect() + var/list/dudes = list() + for(var/mob/living/carbon/human/man in player_list) if(man.client && man.client.prefs.nanotrasen_relation == "Opposed") + dudes += man + for(var/i = 0, i < max(player_list.len/10,2), i++) + dudes += pick(player_list) + return pick(dudes) + /datum/intercept_text/proc/build_traitor(datum/mind/correct_person) var/name_1 = pick(src.org_names_1) var/name_2 = pick(src.org_names_2) - /* - var/fingerprints - var/traitor_name - var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher) - if(prob(prob_right_dude) && ticker.mode == "traitor") - if(correct_person:assigned_role=="MODE") - traitor_name = pick_mob() - else - traitor_name = correct_person:current - else if(prob(prob_right_dude)) - traitor_name = pick_mob() - else - fingerprints = pick_fingerprints() - */ + var/mob/living/carbon/human/H = get_suspect() + var/fingerprints = num2text(md5(H.dna.uni_identity)) + var/traitor_name = H.real_name + var/prob_right_dude = rand(1, 100) src.text += "

The [name_1] [name_2] implied an undercover operative was acting on their behalf on the station currently." src.text += "It would be in your best interests to suspect everybody, as these undercover operatives could have implants which trigger them to have their memories removed until they are needed. He, or she, could even be a high ranking officer." - /* + src.text += "After some investigation, we " - if(traitor_name) + if(prob(50)) src.text += "are [prob_right_dude]% sure that [traitor_name] may have been involved, and should be closely observed." src.text += "
Note: This group are known to be untrustworthy, so do not act on this information without proper discourse." else src.text += "discovered the following set of fingerprints ([fingerprints]) on sensitive materials, and their owner should be closely observed." src.text += "However, these could also belong to a current Cent. Com employee, so do not act on this without reason." - */ + /datum/intercept_text/proc/build_cult(datum/mind/correct_person) var/name_1 = pick(src.org_names_1) var/name_2 = pick(src.org_names_2) - /* - var/traitor_name - var/traitor_job - var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher) - var/prob_right_job = rand(prob_correct_job_lower, prob_correct_job_higher) - if(prob(prob_right_job) && is_convertable_to_cult(correct_person)) - if (correct_person) - if(correct_person:assigned_role=="MODE") - traitor_job = pick(get_all_jobs()) - else - traitor_job = correct_person:assigned_role - else - var/list/job_tmp = get_all_jobs() - job_tmp.Remove("Captain", "Chaplain", "AI", "Cyborg", "Security Officer", "Detective", "Head Of Security", "Head of Personnel", "Chief Engineer", "Research Director", "Chief Medical Officer") - traitor_job = pick(job_tmp) - if(prob(prob_right_dude) && ticker.mode == "cult") - if(correct_person:assigned_role=="MODE") - traitor_name = src.pick_mob() - else - traitor_name = correct_person:current - else - traitor_name = pick_mob() - */ + + var/prob_right_dude = rand(1, 100) + var/mob/living/carbon/human/H = get_suspect() + var/traitor_job = H.mind.assigned_role + src.text += "

It has been brought to our attention that the [name_1] [name_2] have stumbled upon some dark secrets. They apparently want to spread the dangerous knowledge onto as many stations as they can." src.text += "Watch out for the following: praying to an unfamilar god, preaching the word of \[REDACTED\], sacrifices, magical dark power, living constructs of evil and a portal to the dimension of the underworld." - /* - src.text += "Based on our intelligence, we are [prob_right_job]% sure that if true, someone doing the job of [traitor_job] on your station may have been converted " + + src.text += "Based on our intelligence, we are [prob_right_dude]% sure that if true, someone doing the job of [traitor_job] on your station may have been converted " src.text += "and instilled with the idea of the flimsiness of the real world, seeking to destroy it. " - if(prob(prob_right_dude)) - src.text += "
In addition, we are [prob_right_dude]% sure that [traitor_name] may have also some in to contact with this " - src.text += "organisation." + src.text += "
However, if this information is acted on without substantial evidence, those responsible will face severe repercussions." - */ + /datum/intercept_text/proc/build_rev(datum/mind/correct_person) var/name_1 = pick(src.org_names_1) var/name_2 = pick(src.org_names_2) - /* - var/traitor_name - var/traitor_job - var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher) - var/prob_right_job = rand(prob_correct_job_lower, prob_correct_job_higher) - if(prob(prob_right_job) && is_convertable_to_rev(correct_person)) - if (correct_person) - if(correct_person.assigned_role=="MODE") - traitor_job = pick(get_all_jobs()) - else - traitor_job = correct_person.assigned_role - else - var/list/job_tmp = get_all_jobs() - job_tmp-=nonhuman_positions - job_tmp-=command_positions - job_tmp.Remove("Security Officer", "Detective", "Warden", "MODE") - traitor_job = pick(job_tmp) - if(prob(prob_right_dude) && ticker.mode.config_tag == "revolution") - if(correct_person.assigned_role=="MODE") - traitor_name = src.pick_mob() - else - traitor_name = correct_person.current - else - traitor_name = src.pick_mob() - */ + + var/prob_right_dude = rand(1, 100) + var/mob/living/carbon/human/H = get_suspect() + var/traitor_job = H.mind.assigned_role + src.text += "

It has been brought to our attention that the [name_1] [name_2] are attempting to stir unrest on one of our stations in your sector." src.text += "Watch out for suspicious activity among the crew and make sure that all heads of staff report in periodically." - /* - src.text += "Based on our intelligence, we are [prob_right_job]% sure that if true, someone doing the job of [traitor_job] on your station may have been brainwashed " + + src.text += "Based on our intelligence, we are [prob_right_dude]% sure that if true, someone doing the job of [traitor_job] on your station may have been brainwashed " src.text += "at a recent conference, and their department should be closely monitored for signs of mutiny. " - if(prob(prob_right_dude)) - src.text += "
In addition, we are [prob_right_dude]% sure that [traitor_name] may have also some in to contact with this " - src.text += "organisation." + src.text += "
However, if this information is acted on without substantial evidence, those responsible will face severe repercussions." - */ + /datum/intercept_text/proc/build_wizard(datum/mind/correct_person) diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index b44b415a7d6..895c579b1f7 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -291,3 +291,9 @@ traitor_mob << "Unfortunately, the Syndicate did not provide you with a code response." traitor_mob << "Use the code words in the order provided, during regular conversation, to identify other agents. Proceed with caution, however, as everyone is a potential foe." //End code phrase. + + // Tell them about people they might want to contact. + var/mob/living/carbon/human/M = get_nt_opposed() + if(M != traitor_mob) + traitor_mob << "We have received credible reports that [M.real_name] might be willing to help our cause. If you need assistance, consider contacting them." + traitor_mob.mind.store_memory("Potential Collaborator: [M.real_name]") \ No newline at end of file diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 878fd8f8835..9955cee8092 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -98,6 +98,8 @@ datum/preferences var/sec_record = "" var/disabilities = 0 + var/nanotrasen_relation = "Neutral" + // OOC Metadata: var/metadata = "" var/slot_name = "" @@ -298,6 +300,8 @@ datum/preferences dat += "Backpack Type:
[backbaglist[backbag]]
" + dat += "Nanotrasen Relation:
[nanotrasen_relation]
" + dat += "Preview
" dat += "" @@ -919,6 +923,11 @@ datum/preferences if(new_backbag) backbag = backbaglist.Find(new_backbag) + if("nt_relation") + var/new_relation = input(user, "Choose your relation to NT. Note that this represents what others can find out about your character by researching your background, not what your character actually thinks.", "Character Preference") as null|anything in list("Loyal", "Supportive", "Neutral", "Skeptical", "Opposed") + if(new_relation) + nanotrasen_relation = new_relation + if("flavor_text") var/msg = input(usr,"Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!","Flavor Text",html_decode(flavor_text)) as message