From 4f18f35509d1dcdcd23144467b5b50ef9a3a5b96 Mon Sep 17 00:00:00 2001 From: cib Date: Sat, 5 May 2012 03:01:55 -0700 Subject: [PATCH 1/4] Implemented #977 - Epidemic improvements --- code/game/gamemodes/epidemic/epidemic.dm | 40 ++++++++++++++++++------ 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/code/game/gamemodes/epidemic/epidemic.dm b/code/game/gamemodes/epidemic/epidemic.dm index 9a45abbb274..bcccc00b9ad 100644 --- a/code/game/gamemodes/epidemic/epidemic.dm +++ b/code/game/gamemodes/epidemic/epidemic.dm @@ -13,6 +13,7 @@ var/virus_name = "" var/stage = 0 + var/doctors = 0 /////////////////////////// //Announces the game type// @@ -26,7 +27,7 @@ //Gets the round setup, cancelling if there's not enough players at the start// /////////////////////////////////////////////////////////////////////////////// /datum/game_mode/epidemic/pre_setup() - var/doctors = 0 + doctors = 0 for(var/mob/new_player/player in world) if(player.mind.assigned_role in list("Chief Medical Officer","Medical Doctor")) doctors++ @@ -65,8 +66,15 @@ comm.messagetitle.Add("Cent. Com. CONFIDENTIAL REPORT") comm.messagetext.Add(intercepttext) + world << sound('commandreport.ogg') + // add an extra law to the AI to make sure it cooperates with the heads + var/extra_law = "Crew authorized to know of pathogen [virus_name]'s existence are: Heads of command, any crew member with loyalty implant. Do not allow unauthorized personnel to gain knowledge of [virus_name]. Aid authorized personnel in quarantining and neutrlizing the outbreak. This law overrides all other laws." + for(var/mob/living/silicon/ai/M in world) + M.add_ion_law(extra_law) + M << "\red " + extra_law + /datum/game_mode/epidemic/proc/announce_to_kill_crew() var/intercepttext = "CONFIDENTIAL REPORT
" intercepttext += "PATHOGEN [virus_name] IS STILL PRESENT ON [station_name()]. IN COMPLIANCE WITH NANOTRASEN LAWS FOR INTERSTELLAR SAFETY, EMERGENCY SAFETY MEASURES HAVE BEEN AUTHORIZED. ALL INFECTED CREW MEMBERS ON [station_name()] ARE TO BE NEUTRALIZED AND DISPOSED OF IN A MANNER THAT WILL DESTROY ALL TRACES OF THE PATHOGEN. FAILURE TO COMPLY WILL RESULT IN IMMEDIATE DESTRUCTION OF [station_name].
" @@ -84,33 +92,45 @@ /datum/game_mode/epidemic/post_setup() + // make sure viral outbreak events don't happen on this mode + EventTypes.Remove(/datum/event/viralinfection) + + // scan the crew for possible infectees var/list/crew = list() for(var/mob/living/carbon/human/H in world) if(H.client) + // heads should not be infected + if(H.mind.assigned_role in command_positions) continue crew += H if(crew.len < 2) world << "\red There aren't enough players for this mode!" + world << "\red Rebooting world in 5 seconds." + + if(blackbox) + blackbox.save_all_data_to_sql() + sleep(50) + world.Reboot() var/datum/disease2/disease/lethal = new lethal.makerandom(1) lethal.infectionchance = 5 - var/datum/disease2/disease/nonlethal = new - nonlethal.makerandom(0) - nonlethal.infectionchance = 0 + // the more doctors, the more will be infected + var/lethal_amount = doctors * 2 - for(var/i = 0, i < crew.len / 3, i++) + // keep track of initial infectees + var/list/infectees = list() + + for(var/i = 0, i < lethal_amount, i++) var/mob/living/carbon/human/H = pick(crew) if(H.virus2) i-- continue H.virus2 = lethal.getcopy() + infectees += H - for(var/i = 0, i < crew.len / 3, i++) - var/mob/living/carbon/human/H = pick(crew) - if(H.virus2) - continue - H.virus2 = nonlethal.getcopy() + var/mob/living/carbon/human/patient_zero = pick(infectees) + patient_zero.virus2.stage = 3 cruiser_arrival = world.time + (10 * 90 * 60) stage = 1 From 9eedd968dd975b0656e1b74a1265c517a9fa172a Mon Sep 17 00:00:00 2001 From: cib Date: Sat, 5 May 2012 03:02:19 -0700 Subject: [PATCH 2/4] Ryetalyn now actually is effective against jitteryness. --- code/modules/chemical/Chemistry-Reagents.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm index dbe506380c2..954a9585731 100644 --- a/code/modules/chemical/Chemistry-Reagents.dm +++ b/code/modules/chemical/Chemistry-Reagents.dm @@ -881,6 +881,7 @@ datum data++ M.mutations = 0 M.disabilities = 0 + M.jitteriness = 0 if(volume > REAGENTS_OVERDOSE) M:adjustToxLoss(1) // switch(data) From cd3e8d8ba9abe6f9da43fd647bcfde0624c031bf Mon Sep 17 00:00:00 2001 From: cib Date: Sat, 5 May 2012 04:03:26 -0700 Subject: [PATCH 3/4] Fixed bug #872 --- code/modules/admin/admin.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 71811b312da..46471941d3c 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -179,10 +179,10 @@ var/global/BSACooldown = 0 if(!reason) return - log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetBanExp(mins)]") + log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetBanExp(mins + CMinutes)]") - ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetBanExp(mins)]") - message_admins("\blue [key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetBanExp(mins)]", 1) + ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetBanExp(mins + CMinutes)]") + message_admins("\blue [key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetBanExp(mins + CMinutes)]", 1) Banlist.cd = "/base/[banfolder]" Banlist["reason"] << reason Banlist["temp"] << temp From 9bf184c20303f9a609955f2a8720d435953de556 Mon Sep 17 00:00:00 2001 From: cib Date: Sat, 5 May 2012 06:07:18 -0700 Subject: [PATCH 4/4] Possible fix for #675: Added another check to make sure every mob only receives a broadcast message once. --- code/game/machinery/telecomms/broadcaster.dm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm index 707e68225c4..f8d209f6f58 100644 --- a/code/game/machinery/telecomms/broadcaster.dm +++ b/code/game/machinery/telecomms/broadcaster.dm @@ -281,6 +281,9 @@ var var/list/heard_garbled = list() // garbled message (ie "f*c* **u, **i*er!") var/list/heard_gibberish= list() // completely screwed over message (ie "F%! (O*# *#!<>&**%!") + // Make sure everyone only hears the message once + var/list/already_heard = list() + for (var/mob/R in receive) /* --- Loop through the receivers and categorize them --- */ @@ -291,6 +294,12 @@ var if(istype(M, /mob/new_player)) // we don't want new players to hear messages. rare but generates runtimes. continue + // We'll skip those guys who have already heard the message + if (R in already_heard) + continue + + already_heard += R + // --- Check for compression --- if(compression > 0)