Fixes admin disease naming, basic disease trigger (#48628)

This commit is contained in:
skoglol
2020-01-07 09:54:55 -05:00
committed by Emmett Gaines
parent 13790ebb5a
commit 135251ece3
3 changed files with 6 additions and 5 deletions
+4 -3
View File
@@ -248,7 +248,7 @@
SetSpread(DISEASE_SPREAD_CONTACT_FLUIDS)
else
SetSpread(DISEASE_SPREAD_BLOOD)
permeability_mod = max(CEILING(0.4 * properties["transmittable"], 1), 1)
cure_chance = 15 - CLAMP(properties["resistance"], -5, 5) // can be between 10 and 20
stage_prob = max(properties["stage_rate"], 2)
@@ -419,7 +419,7 @@
// Should be only 1 entry left, but if not let's only return a single entry
var/datum/disease/advance/to_return = pick(diseases)
to_return.Refresh(1)
to_return.Refresh(TRUE)
return to_return
/proc/SetViruses(datum/reagent/R, list/data)
@@ -464,8 +464,9 @@
var/new_name = stripped_input(user, "Name your new disease.", "New Name")
if(!new_name)
return
D.AssignName(new_name)
D.Refresh()
D.AssignName(new_name) //Updates the master copy
D.name = new_name //Updates our copy
var/list/targets = list("Random")
targets += sortNames(GLOB.human_list)
+1 -1
View File
@@ -444,7 +444,7 @@
var/datum/round_event_control/disease_outbreak/DC = locate(/datum/round_event_control/disease_outbreak) in SSevents.control
E = DC.runEvent()
if("Choose")
var/virus = input("Choose the virus to spread", "BIOHAZARD") as null|anything in sortList(typesof(/datum/disease, /proc/cmp_typepaths_asc))
var/virus = input("Choose the virus to spread", "BIOHAZARD") as null|anything in sortList(typesof(/datum/disease), /proc/cmp_typepaths_asc)
var/datum/round_event_control/disease_outbreak/DC = locate(/datum/round_event_control/disease_outbreak) in SSevents.control
var/datum/round_event/disease_outbreak/DO = DC.runEvent()
DO.virus_type = virus
+1 -1
View File
@@ -23,7 +23,7 @@
/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
if(prob(20 + (10 * max_severity)))
if(!virus_type && prob(20 + (10 * max_severity)))
advanced_virus = TRUE
if(!virus_type && !advanced_virus)