Files
kiwistation/code/modules/events/spontaneous_appendicitis.dm
T
vuonojenmustaturska 39375d5cc2 Replaces a bunch of mob loops with hopefully better ones (#32786)
* Free codebase churn

* fixes dviewmob

* a commit

* Partial revert "Free codebase churn"

This reverts commit 9dd41b3860c331637bbc85e694dd32dc59768ad5.

* better fix to dviewmob

* renames living_mob_list to alive_mob_list, adds mob_living_list and carbon_list

* make some use out of the shiny carbon list

* make some use out of the shiny new living list

* more things, also make the mobs subsystem (Life) use living list

* bonus

* domo arigato mr. roboto

* compile fixes, also made the drone code less dumb

* better?

* make admin message prettier

* honk

* fixes blobs

* rev fixes

* one small thing
2017-11-16 23:08:40 +01:00

29 lines
963 B
Plaintext

/datum/round_event_control/spontaneous_appendicitis
name = "Spontaneous Appendicitis"
typepath = /datum/round_event/spontaneous_appendicitis
weight = 20
max_occurrences = 4
earliest_start = 6000
min_players = 5 // To make your chance of getting help a bit higher.
/datum/round_event/spontaneous_appendicitis
fakeable = FALSE
/datum/round_event/spontaneous_appendicitis/start()
for(var/mob/living/carbon/human/H in shuffle(GLOB.alive_mob_list))
if(!H.client)
continue
if(H.stat == DEAD)
continue
if(!H.getorgan(/obj/item/organ/appendix)) //Don't give the disease to some who lacks it, only for it to be auto-cured
continue
var/foundAlready = FALSE //don't infect someone that already has appendicitis
for(var/datum/disease/appendicitis/A in H.viruses)
foundAlready = TRUE
break
if(foundAlready)
continue
var/datum/disease/D = new /datum/disease/appendicitis
H.ForceContractDisease(D)
break