mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-06 06:52:39 +00:00
3591 individual conflicts Update build.js Update install_node.sh Update byond.js oh my fucking god hat slow huh holy shit we all fall down 2 more I missed 2900 individual conflicts 2700 Individual conflicts replaces yarn file with tg version, bumping us down to 2200-ish Down to 2000 individual conflicts 140 down mmm aaaaaaaaaaaaaaaaaaa not yt 575 soon 900 individual conflicts 600 individual conflicts, 121 file conflicts im not okay 160 across 19 files 29 in 4 files 0 conflicts, compiletime fix time some minor incap stuff missed ticks weird dupe definition stuff missed ticks 2 incap fixes undefs and pie fix Radio update and some extra minor stuff returns a single override no more dupe definitions, 175 compiletime errors Unticked file fix sound and emote stuff honk and more radio stuff
40 lines
2.0 KiB
Plaintext
40 lines
2.0 KiB
Plaintext
/datum/round_event_control/fake_virus
|
|
name = "Fake Virus"
|
|
typepath = /datum/round_event/fake_virus
|
|
weight = 20
|
|
category = EVENT_CATEGORY_HEALTH
|
|
description = "Some crewmembers suffer from temporary hypochondria."
|
|
|
|
/datum/round_event/fake_virus/start()
|
|
var/list/fake_virus_victims = list()
|
|
for(var/mob/living/carbon/human/victim in GLOB.player_list)
|
|
if(victim.stat != CONSCIOUS || HAS_TRAIT(victim, TRAIT_VIRUSIMMUNE))
|
|
continue
|
|
if(!(victim.mind?.assigned_role.job_flags & JOB_CREW_MEMBER))
|
|
continue
|
|
// SKYRAT EDIT ADD START - Station/area event candidate filtering
|
|
if(engaged_role_play_check(fake_virus_victims, station = TRUE, dorms = TRUE))
|
|
continue
|
|
// SKYRAT EDIT ADD END
|
|
fake_virus_victims += victim
|
|
|
|
//first we do hard status effect victims
|
|
var/defacto_min = min(3, length(fake_virus_victims))
|
|
if(defacto_min <= 0)// event will hit 1-3 people by default, but will do 1-2 or just 1 if only those many candidates are available
|
|
return
|
|
for(var/i in 1 to rand(1, defacto_min))
|
|
var/mob/living/carbon/human/hypochondriac = pick_n_take(fake_virus_victims)
|
|
hypochondriac.apply_status_effect(/datum/status_effect/fake_virus)
|
|
announce_to_ghosts(hypochondriac)
|
|
|
|
//then we do light one-message victims who simply cough or whatever once (have to repeat the process since the last operation modified our candidates list)
|
|
defacto_min = min(5, length(fake_virus_victims))
|
|
if(defacto_min <= 0)
|
|
return
|
|
for(var/i in 1 to rand(1, defacto_min))
|
|
var/mob/living/carbon/human/onecoughman = pick_n_take(fake_virus_victims)
|
|
if(prob(25))//1/4 odds to get a spooky message instead of coughing out loud
|
|
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), onecoughman, span_warning("[pick("Your head hurts.", "Your head pounds.")]")), rand(3 SECONDS, 15 SECONDS))
|
|
else
|
|
addtimer(CALLBACK(onecoughman, TYPE_PROC_REF(/mob, emote), pick("cough", "sniff")), rand(3 SECONDS, 15 SECONDS))//deliver the message with a slightly randomized time interval so there arent multiple people coughing at the exact same time
|