diff --git a/beestation.dme b/beestation.dme index 3984e4f522e..be2e2124fb6 100644 --- a/beestation.dme +++ b/beestation.dme @@ -2017,6 +2017,7 @@ #include "code\modules\events\supermatter_surge.dm" #include "code\modules\events\vent_clog.dm" #include "code\modules\events\wormholes.dm" +#include "code\modules\events\zombie_outbreak.dm" #include "code\modules\events\holiday\halloween.dm" #include "code\modules\events\holiday\vday.dm" #include "code\modules\events\holiday\xmas.dm" diff --git a/code/modules/events/wizard/blobies.dm b/code/modules/events/wizard/blobies.dm index 7438b462f60..9233a1d2482 100644 --- a/code/modules/events/wizard/blobies.dm +++ b/code/modules/events/wizard/blobies.dm @@ -1,5 +1,5 @@ /datum/round_event_control/wizard/blobies //avast! - name = "Zombie Outbreak" + name = "Blob Zombie Outbreak" weight = 3 typepath = /datum/round_event/wizard/blobies max_occurrences = 3 diff --git a/code/modules/events/zombie_outbreak.dm b/code/modules/events/zombie_outbreak.dm new file mode 100644 index 00000000000..79eef8aa63c --- /dev/null +++ b/code/modules/events/zombie_outbreak.dm @@ -0,0 +1,32 @@ +/datum/round_event_control/zombie_outbreak + name = "Zombie Outbreak" + typepath = /datum/round_event/zombie_outbreak + weight = 5 + max_occurrences = 1 + min_players = 30 + +/datum/round_event/zombie_outbreak + fakeable = FALSE + +/datum/round_event/zombie_outbreak/start() + // The amount of infections among the crew depends on the amount of living, non-AFK, non-silicon players on the station + var/list/living_crew = list() + living_crew = get_living_station_crew() + var/infection_count = round(length(living_crew) / 10) + + for(var/mob/living/carbon/human/H in shuffle(GLOB.player_list)) + if(H.stat == DEAD) + continue + if(!SSjob.GetJob(H.mind.assigned_role) || (H.mind.assigned_role in GLOB.nonhuman_positions)) + continue + if(!H.getorgan(/obj/item/organ/brain)) + continue + if(!(MOB_ORGANIC in H.mob_biotypes)) + continue + if(!H.getorganslot(ORGAN_SLOT_ZOMBIE)) + var/obj/item/organ/zombie_infection/ZI = new() + ZI.Insert(H) + announce_to_ghosts(H) + infection_count -- + if (infection_count <= 0) + break