mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-06 07:22:42 +00:00
Implemented #977 - Epidemic improvements
This commit is contained in:
@@ -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 = "<FONT size = 3 color='red'><B>CONFIDENTIAL REPORT</FONT><HR>"
|
||||
intercepttext += "<FONT size = 2;color='red'><B>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].</B></FONT><BR>"
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user