From 789fbc75dc742d74ae25c80ec002c2d4199c30af Mon Sep 17 00:00:00 2001 From: rockdtben Date: Sat, 4 Jun 2011 20:20:32 +0000 Subject: [PATCH] git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1661 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/gamemodes/changeling/changeling.dm | 33 +---------------- code/game/gamemodes/cult/cult.dm | 31 +--------------- code/game/gamemodes/game_mode.dm | 36 +++++++++++++++++++ .../game/gamemodes/malfunction/malfunction.dm | 33 +---------------- code/game/gamemodes/nuclear/nuclear.dm | 29 --------------- code/game/gamemodes/revolution/revolution.dm | 35 +----------------- code/game/gamemodes/traitor/traitor.dm | 31 +--------------- code/game/gamemodes/wizard/wizard.dm | 29 --------------- 8 files changed, 41 insertions(+), 216 deletions(-) diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index 409d63e6462..22f18879c5a 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -133,7 +133,7 @@ for(var/datum/objective/objective in changeling.objectives) changeling.current << "Objective #[obj_count]: [objective.explanation_text]" obj_count++ - + modePlayer = changelings spawn (rand(waittime_l, waittime_h)) send_intercept() @@ -151,37 +151,6 @@ return candidates -//Centcom Update - in testing, copied mostly from Wizard. - - send_intercept() - var/intercepttext = "Cent. Com. Update Requested staus 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]" - var/number = pick(2, 3) - var/i = 0 - for(i = 0, i < number, i++) - possible_modes.Remove(pick(possible_modes)) - possible_modes.Insert(rand(possible_modes.len), "[ticker.mode]") - - var/datum/intercept_text/i_text = new /datum/intercept_text - for(var/A in possible_modes) - intercepttext += i_text.build(A, changeling) - - for (var/obj/machinery/computer/communications/comm in world) - if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept) - var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc ) - intercept.name = "paper- 'Cent. Com. Status Summary'" - intercept.info = intercepttext - - comm.messagetitle.Add("Cent. Com. Status Summary") - comm.messagetext.Add(intercepttext) - - command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.") - world << sound('intercept.ogg') - check_finished() if(!changeling) return 1 diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index e64f4b9230e..6ca28f55ef5 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -56,7 +56,7 @@ cult += pick(cultists_possible) cultists_possible -= cult cultists_number-- - + modePlayer = cult if("sacrifice" in objectives) var/list/possible_targets = get_unconvertables() @@ -151,35 +151,6 @@ cult_mob << "\red You remember one thing from the dark teachings of your master... [wordexp]" cult_mob.mind.store_memory("You remember that [wordexp]", 0, 0) -/datum/game_mode/cult/send_intercept() - var/intercepttext = "Cent. Com. Update Requested staus 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", "cult", "wizard", "nuke", "traitor", "malf", "changeling") - possible_modes -= "[ticker.mode]" - var/number = pick(2, 3) - var/i = 0 - for(i = 0, i < number, i++) - possible_modes.Remove(pick(possible_modes)) - possible_modes.Insert(rand(possible_modes.len), "[ticker.mode]") - - var/datum/intercept_text/i_text = new /datum/intercept_text - for(var/A in possible_modes) - intercepttext += i_text.build(A, pick(cult)) - - for (var/obj/machinery/computer/communications/comm in world) - if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept) - var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc ) - intercept.name = "paper- 'Cent. Com. Status Summary'" - intercept.info = intercepttext - - comm.messagetitle.Add("Cent. Com. Status Summary") - comm.messagetext.Add(intercepttext) - - command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.") - world << sound('intercept.ogg') - /datum/game_mode/cult/proc/add_cultist(datum/mind/cult_mind) if (!cult_mind) return diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 57a0f834cdc..bdde343cd6f 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -1,6 +1,8 @@ /datum/game_mode var/name = "invalid" var/config_tag = null + var/intercept_hacked = 0 + var/list/datum/mind/modePlayer = null var/votable = 1 var/probability = 1 // this includes admin-appointed traitors and multitraitors. Easy! @@ -55,6 +57,40 @@ /datum/game_mode/proc/check_win() /datum/game_mode/proc/send_intercept() + var/intercepttext = "Cent. Com. Update Requested staus 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]" + var/number = pick(2, 3) + var/i = 0 + for(i = 0, i < number, i++) + possible_modes.Remove(pick(possible_modes)) + + if(!intercept_hacked) + possible_modes.Insert(rand(possible_modes.len), "[ticker.mode]") + + shuffle(possible_modes) + + var/datum/intercept_text/i_text = new /datum/intercept_text + for(var/A in possible_modes) + if(modePlayer == null) + intercepttext += i_text.build(A) + else + intercepttext += i_text.build(A, pick(modePlayer)) + + for (var/obj/machinery/computer/communications/comm in world) + if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept) + var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc ) + intercept.name = "paper- 'Cent. Com. Status Summary'" + intercept.info = intercepttext + + comm.messagetitle.Add("Cent. Com. Status Summary") + comm.messagetext.Add(intercepttext) + + command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.") + world << sound('intercept.ogg') /*Added a safety check for traitor keywords. Rev-heads won't get them. Can be expanded otherwise.*/ diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index 9e2721bd5be..c8ba90a8ae3 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -6,7 +6,7 @@ var/const/waittime_h = 1800 // started at 1800 var/AI_win_timeleft = 1800 //started at 1800, in case I change this for testing round end. - var/intercept_hacked = 0 + //var/intercept_hacked = 0 // moved to game_mode.dm var/malf_mode_declared = 0 var/boom = 0 var/apcs = 0 //Adding dis to track how many APCs the AI hacks. --NeoFite @@ -76,37 +76,6 @@ /datum/game_mode/malfunction/proc/hack_intercept() intercept_hacked = 1 -/datum/game_mode/malfunction/send_intercept() - var/intercepttext = "Cent. Com. Update Requested staus 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]" - var/number = pick(2, 3) - var/i = 0 - for(i = 0, i < number, i++) - possible_modes.Remove(pick(possible_modes)) - - if(!intercept_hacked) - possible_modes.Insert(rand(possible_modes.len), "[ticker.mode]") - - var/datum/intercept_text/i_text = new /datum/intercept_text - for(var/A in possible_modes) - intercepttext += i_text.build(A, pick(ticker.minds)) - - for (var/obj/machinery/computer/communications/comm in world) - if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept) - var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc ) - intercept.name = "paper- 'Cent. Com. Status Summary'" - intercept.info = intercepttext - - comm.messagetitle.Add("Cent. Com. Status Summary") - comm.messagetext.Add(intercepttext) - - command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.") - world << sound('intercept.ogg') - /datum/game_mode/malfunction/process() if (apcs >= 3 && malf_mode_declared) AI_win_timeleft = AI_win_timeleft - (apcs/3) //Victory timer now de-increments based on how many APCs are hacked. --NeoFite diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 6807c1e2b09..d89506b445f 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -250,35 +250,6 @@ else return candidates -/datum/game_mode/nuclear/send_intercept() - var/intercepttext = "Cent. Com. Update Requested staus 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 -= "nuke" - var/number = pick(2, 3) - var/i = 0 - for(i = 0, i < number, i++) - possible_modes.Remove(pick(possible_modes)) - possible_modes.Insert(rand(possible_modes.len), "nuke") - - var/datum/intercept_text/i_text = new /datum/intercept_text - for(var/A in possible_modes) - intercepttext += i_text.build(A) - - for (var/obj/machinery/computer/communications/comm in world) - if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept) - var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc ) - intercept.name = "paper- 'Cent. Com. Status Summary'" - intercept.info = intercepttext - - comm.messagetitle.Add("Cent. Com. Status Summary") - comm.messagetext.Add(intercepttext) - - command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.") - world << sound('intercept.ogg') - /datum/game_mode/nuclear/proc/random_radio_frequency() return 1337 diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 60cfadba311..68fc8a0b956 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -69,7 +69,7 @@ rev_mind.current << "Objective #[obj_count]: [objective.explanation_text]" rev_mind.special_role = "Head Revolutionary" obj_count++ - + modePlayer = head_revolutionaries spawn (rand(waittime_l, waittime_h)) send_intercept() @@ -92,39 +92,6 @@ if (!flashspawned) rev_mob << "The Syndicate were unfortunately unable to get you a flash." -////////////////////////////////////////// -//Deals with the communication intercept// -////////////////////////////////////////// -/datum/game_mode/revolution/send_intercept() - var/intercepttext = "Cent. Com. Update Requested staus 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", "cult", "changeling") - possible_modes -= "[ticker.mode]" - var/number = pick(2, 3) - var/i = 0 - for(i = 0, i < number, i++) - possible_modes.Remove(pick(possible_modes)) - possible_modes.Insert(rand(possible_modes.len), "[ticker.mode]") - - var/datum/intercept_text/i_text = new /datum/intercept_text - for(var/A in possible_modes) - intercepttext += i_text.build(A, pick(head_revolutionaries)) - - for (var/obj/machinery/computer/communications/comm in world) - if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept) - var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc ) - intercept.name = "paper- 'Cent. Com. Status Summary'" - intercept.info = intercepttext - - comm.messagetitle.Add("Cent. Com. Status Summary") - comm.messagetext.Add(intercepttext) - - command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.") - world << sound('intercept.ogg') - - ////////////////////////////////////// //Checks if the revs have won or not// ////////////////////////////////////// diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index 7cfff9993fb..d1702caa35e 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -134,6 +134,7 @@ else equip_traitor(traitor.current) + modePlayer = traitors spawn (rand(waittime_l, waittime_h)) send_intercept() @@ -151,36 +152,6 @@ return candidates -/datum/game_mode/traitor/send_intercept() - var/intercepttext = "Cent. Com. Update Requested staus 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]" - var/number = pick(2, 3) - var/i = 0 - for(i = 0, i < number, i++) - possible_modes.Remove(pick(possible_modes)) - possible_modes.Insert(rand(possible_modes.len), "[ticker.mode]") - - var/datum/intercept_text/i_text = new /datum/intercept_text - for(var/A in possible_modes) - intercepttext += i_text.build(A, pick(traitors)) - - for (var/obj/machinery/computer/communications/comm in world) - if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept) - var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc ) - intercept.name = "paper- 'Cent. Com. Status Summary'" - intercept.info = intercepttext - - comm.messagetitle.Add("Cent. Com. Status Summary") - comm.messagetext.Add(intercepttext) - - command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.") - world << sound('intercept.ogg') - - /datum/game_mode/traitor/declare_completion() . = ..() diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index 65a1aecf00b..2ee78b2ecc6 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -202,35 +202,6 @@ wizard_mob << "In your pockets you will find two more important, magical artifacts. Use them as needed." wizard_mob.mind.store_memory("Remember: do not forget to prepare your spells.") -/datum/game_mode/wizard/send_intercept() - var/intercepttext = "Cent. Com. Update Requested staus 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]" - var/number = pick(2, 3) - var/i = 0 - for(i = 0, i < number, i++) - possible_modes.Remove(pick(possible_modes)) - possible_modes.Insert(rand(possible_modes.len), "[ticker.mode]") - - var/datum/intercept_text/i_text = new /datum/intercept_text - for(var/A in possible_modes) - intercepttext += i_text.build(A, wizard) - - for (var/obj/machinery/computer/communications/comm in world) - if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept) - var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc ) - intercept.name = "paper- 'Cent. Com. Status Summary'" - intercept.info = intercepttext - - comm.messagetitle.Add("Cent. Com. Status Summary") - comm.messagetext.Add(intercepttext) - - command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.") - world << sound('intercept.ogg') - /datum/game_mode/wizard/declare_completion() if(finished) world << "\red The wizard has been killed by the crew! The Space Wizards Fediration has been taught a lesson they will not soon forget!"