Merge branch 'master' into upstream-merge-33498

This commit is contained in:
LetterJay
2017-12-19 17:50:11 -06:00
committed by GitHub
284 changed files with 5080 additions and 1897 deletions
+44 -9
View File
@@ -10,6 +10,8 @@
var/virus_type
var/max_severity = 3
/datum/round_event/disease_outbreak/announce(fake)
priority_announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/ai/outbreak7.ogg')
@@ -17,6 +19,7 @@
/datum/round_event/disease_outbreak/setup()
announceWhen = rand(15, 30)
/datum/round_event/disease_outbreak/start()
var/advanced_virus = FALSE
max_severity = 3 + max(FLOOR((world.time - control.earliest_start)/6000, 1),0) //3 symptoms at 20 minutes, plus 1 per 10 minutes
@@ -46,16 +49,48 @@
continue
var/datum/disease/D
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
if(!H.dna || (H.disabilities & BLIND)) //A blindness disease would be the worst.
continue
D = new virus_type()
var/datum/disease/dnaspread/DS = D
DS.strain_data["name"] = H.real_name
DS.strain_data["UI"] = H.dna.uni_identity
DS.strain_data["SE"] = H.dna.struc_enzymes
if(!advanced_virus)
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
if(!H.dna || (H.has_disability(BLIND))) //A blindness disease would be the worst.
continue
D = new virus_type()
var/datum/disease/dnaspread/DS = D
DS.strain_data["name"] = H.real_name
DS.strain_data["UI"] = H.dna.uni_identity
DS.strain_data["SE"] = H.dna.struc_enzymes
else
D = new virus_type()
else
D = new virus_type()
D = make_virus(max_severity, max_severity)
D.carrier = TRUE
H.AddDisease(D)
if(advanced_virus)
var/datum/disease/advance/A = D
var/list/name_symptoms = list() //for feedback
for(var/datum/symptom/S in A.symptoms)
name_symptoms += S.name
message_admins("An event has triggered a random advanced virus outbreak on [key_name_admin(H)]! It has these symptoms: [english_list(name_symptoms)]")
log_game("An event has triggered a random advanced virus outbreak on [key_name(H)]! It has these symptoms: [english_list(name_symptoms)]")
break
/datum/round_event/disease_outbreak/proc/make_virus(max_symptoms, max_level)
if(max_symptoms > SYMPTOM_LIMIT)
max_symptoms = SYMPTOM_LIMIT
var/datum/disease/advance/A = new(FALSE, null)
A.symptoms = list()
var/list/datum/symptom/possible_symptoms = list()
for(var/symptom in subtypesof(/datum/symptom))
var/datum/symptom/S = symptom
if(initial(S.level) > max_level)
continue
if(initial(S.level) <= 0) //unobtainable symptoms
continue
possible_symptoms += S
for(var/i in 1 to max_symptoms)
var/datum/symptom/chosen_symptom = pick_n_take(possible_symptoms)
if(chosen_symptom)
var/datum/symptom/S = new chosen_symptom
A.symptoms += S
A.Refresh() //just in case someone already made and named the same disease
return A
+1 -1
View File
@@ -12,7 +12,7 @@
for(var/speciestype in subtypesof(/datum/species))
var/datum/species/S = new speciestype()
if(!S.dangerous_existence)
if(!S.dangerous_existence && !S.blacklisted)
all_species += speciestype
var/datum/species/new_species = pick(all_species)