Files
Bubberstation/code/modules/events/spontaneous_appendicitis.dm
SkyratBot 208bc743d2 [MIRROR] makes some events only work on crewmembers, and some not work on centcom (#488)
* makes some events only work on crewmembers, and some not work on centcom (#52966)

brain trauma, fake virus, and heart attack only work on crewmembers.
mass hallucination and appendicitis don't give the effect/pick to people on centcom, respectively

* makes some events only work on crewmembers, and some not work on centcom

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
2020-08-24 21:40:12 +02:00

35 lines
1.2 KiB
Plaintext

/datum/round_event_control/spontaneous_appendicitis
name = "Spontaneous Appendicitis"
typepath = /datum/round_event/spontaneous_appendicitis
weight = 20
max_occurrences = 4
earliest_start = 10 MINUTES
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
if(!(H.mob_biotypes & MOB_ORGANIC)) //biotype sleeper bugs strike again, once again making appendicitis pick a target that can't take it
continue
if(H.z in SSmapping.levels_by_trait(ZTRAIT_CENTCOM))//not for admin/ooc stuff
continue
var/foundAlready = FALSE //don't infect someone that already has appendicitis
for(var/datum/disease/appendicitis/A in H.diseases)
foundAlready = TRUE
break
if(foundAlready)
continue
var/datum/disease/D = new /datum/disease/appendicitis()
H.ForceContractDisease(D, FALSE, TRUE)
announce_to_ghosts(H)
break