mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-29 19:42:42 +00:00
-Makes a lot of unsuitable events excluded from faking. Some of them could do with reworking to make them function, like the infestation and prison breaks, but for now i just had to exclude them -Adds an In-character/descriptive name, used for the announcement apologising for the mistake -Fixes an issue where using debug Trigger Event verb would fill the events list with empty severe events and cause runtime errors
44 lines
1.5 KiB
Plaintext
44 lines
1.5 KiB
Plaintext
/datum/event/disease_outbreak
|
|
announceWhen = 15
|
|
ic_name = "a viral biohazard"
|
|
|
|
/datum/event/disease_outbreak/announce()
|
|
command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
|
|
|
|
/datum/event/disease_outbreak/setup()
|
|
announceWhen = rand(15, 30)
|
|
|
|
/datum/event/disease_outbreak/start()
|
|
var/virus_type = pick(/datum/disease/dnaspread, /datum/disease/advance/flu, /datum/disease/advance/cold, /datum/disease/brainrot, /datum/disease/magnitis)
|
|
|
|
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
|
|
var/foundAlready = 0 // don't infect someone that already has the virus
|
|
var/turf/T = get_turf(H)
|
|
if(!T)
|
|
continue
|
|
if(isNotStationLevel(T.z))
|
|
continue
|
|
for(var/datum/disease/D in H.viruses)
|
|
foundAlready = 1
|
|
if(H.stat == 2 || foundAlready)
|
|
continue
|
|
|
|
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
|
|
if((!H.dna) || (H.sdisabilities & BLIND)) //A blindness disease would be the worst.
|
|
continue
|
|
var/datum/disease/dnaspread/D = new
|
|
D.strain_data["name"] = H.real_name
|
|
D.strain_data["UI"] = H.dna.UI.Copy()
|
|
D.strain_data["SE"] = H.dna.SE.Copy()
|
|
D.carrier = 1
|
|
D.holder = H
|
|
D.affected_mob = H
|
|
H.viruses += D
|
|
break
|
|
else
|
|
var/datum/disease/D = new virus_type
|
|
D.carrier = 1
|
|
D.holder = H
|
|
D.affected_mob = H
|
|
H.viruses += D
|
|
break |