diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index b2fb75348f9..2944b13eadf 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -156,3 +156,6 @@ #define STATUS_EFFECT_OFFERING_ITEM /datum/status_effect/offering_item #define STATUS_EFFECT_BLOB_BURST /datum/status_effect/blob_burst + +/// gives you fluff messages for cough, sneeze, headache, etc but without an actual virus +#define STATUS_EFFECT_FAKE_VIRUS /datum/status_effect/fake_virus diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index 046fce28996..ce30731ee02 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -824,3 +824,101 @@ /datum/status_effect/transient/drugged/on_remove() owner.update_druggy_effects() + +#define FAKE_COLD 1 +#define FAKE_FOOD_POISONING 2 +#define FAKE_RETRO_VIRUS 3 +#define FAKE_TURBERCULOSIS 4 + +/datum/status_effect/fake_virus + id = "fake_virus" + duration = 3 MINUTES + status_type = STATUS_EFFECT_REPLACE + tick_interval = 2 + alert_type = null + /// So you dont get the most intense messages immediately + var/msg_stage = 0 + /// Which disease we are going to fake? + var/current_fake_disease + /// Fake virus messages by with three stages + var/list/fake_msg + /// Fake virus emotes with three stages + var/list/fake_emote + +/datum/status_effect/fake_virus/on_creation() + current_fake_disease = pick(FAKE_COLD, FAKE_FOOD_POISONING, FAKE_RETRO_VIRUS, FAKE_TURBERCULOSIS) + switch(current_fake_disease) + if(FAKE_COLD) + fake_msg = list( + list("Your throat feels sore.", "Mucous runs down the back of your throat."), + list("Your muscles ache.", "Your stomach hurts."), + list("Your muscles ache.", "Your stomach hurts.") + ) + fake_emote = list( + list("sneeze", "cough"), + list("sneeze", "cough"), + list("sneeze", "cough") + ) + if(FAKE_FOOD_POISONING) + fake_msg = list( + list("Your stomach feels weird.", "You feel queasy."), + list("Your stomach aches.", "You feel nauseous."), + list("Your stomach hurts.", "You feel sick.") + ) + fake_emote = list( + list(), + list("groan"), + list("groan", "moan") + ) + if(FAKE_RETRO_VIRUS) + fake_msg = list( + list("Your head hurts.", "You feel a tingling sensation in your chest.", "You feel angry."), + list("Your skin feels loose.", "You feel very strange.", "You feel a stabbing pain in your head!", "Your stomach churns."), + list("Your entire body vibrates.") + ) + else + fake_msg = list( + list("Your chest hurts.", "Your stomach violently rumbles!", "You feel a cold sweat form."), + list("You feel a sharp pain from your lower chest!", "You feel air escape from your lungs painfully."), + list("You feel uncomfortably hot...", "You feel like unzipping your jumpsuit", "You feel like taking off some clothes...") + ) + fake_emote = list( + list("cough"), + list("gasp"), + list() + ) + . = ..() + +/datum/status_effect/fake_virus/tick() + var/selected_fake_msg + var/selected_fake_emote + switch(msg_stage) + if(0 to 300) + if(prob(1)) // First stage starts slow, stage 2 and 3 trigger fake msgs/emotes twice as often + if(prob(50) || !length(fake_emote[1])) // 50% chance to trigger either a msg or emote, 100% if it doesnt have an emote + selected_fake_msg = safepick(fake_msg[1]) + else + selected_fake_emote = safepick(fake_emote[1]) + if(301 to 600) + if(prob(2)) + if(prob(50) || !length(fake_emote[2])) + selected_fake_msg = safepick(fake_msg[2]) + else + selected_fake_emote = safepick(fake_emote[2]) + else + if(prob(2)) + if(prob(50) || !length(fake_emote[3])) + selected_fake_msg = safepick(fake_msg[3]) + else + selected_fake_emote = safepick(fake_emote[3]) + + if(selected_fake_msg) + to_chat(owner, selected_fake_msg) + else if(selected_fake_emote) + owner.emote(selected_fake_emote) + msg_stage++ + +#undef FAKE_COLD +#undef FAKE_FOOD_POISONING +#undef FAKE_RETRO_VIRUS +#undef FAKE_TURBERCULOSIS diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm index b4cb217395d..b089714e940 100644 --- a/code/modules/events/event_container.dm +++ b/code/modules/events/event_container.dm @@ -140,6 +140,7 @@ GLOBAL_LIST_EMPTY(event_last_fired) new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Sentience", /datum/event/sentience, 50), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Koi School", /datum/event/carp_migration/koi, 80), + new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Fake Virus", /datum/event/fake_virus, 50), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Disease Outbreak", /datum/event/disease_outbreak, 50, list(ASSIGNMENT_MEDICAL = 25), TRUE) ) diff --git a/code/modules/events/fake_virus.dm b/code/modules/events/fake_virus.dm new file mode 100644 index 00000000000..4da2be32d46 --- /dev/null +++ b/code/modules/events/fake_virus.dm @@ -0,0 +1,26 @@ +/datum/event/fake_virus/start() + var/list/fake_virus_victims = list() + for(var/mob/living/carbon/human/victim in shuffle(GLOB.player_list)) + if(victim.stat == DEAD || victim.InCritical() || victim.mind?.assigned_role == victim.mind?.special_role || victim.mind?.offstation_role) + continue + fake_virus_victims += victim + + //first we do hard status effect victims + var/defacto_min = min(3, length(fake_virus_victims)) + if(defacto_min) // event will hit 1-3 people by default, but will do 1-2 or just 1 if only those many candidates are available + for(var/i in 1 to rand(1, defacto_min)) + var/mob/living/carbon/human/hypochondriac = pick(fake_virus_victims) + hypochondriac.apply_status_effect(STATUS_EFFECT_FAKE_VIRUS) + hypochondriac.create_log(MISC_LOG, "[hypochondriac] has contracted a fake virus.") + fake_virus_victims -= hypochondriac + notify_ghosts("[hypochondriac] now has a fake virus!") + //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) + for(var/i in 1 to rand(1, defacto_min)) + var/mob/living/carbon/human/onecoughman = pick(fake_virus_victims) + if(prob(25)) //1/4 odds to get a spooky message instead of coughing out loud + addtimer(CALLBACK(GLOBAL_PROC, PROC_REF(to_chat), onecoughman, "[pick("Your head hurts.", "Your head pounds.")]"), rand(30, 150)) + else + addtimer(CALLBACK(onecoughman, TYPE_PROC_REF(/mob/, emote), pick("cough", "sniff", "sneeze")), rand(30, 150)) //deliver the message with a slightly randomized time interval so there arent multiple people coughing at the exact same time + fake_virus_victims -= onecoughman diff --git a/paradise.dme b/paradise.dme index 0edc12ae0d6..a5aad876c9f 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1624,6 +1624,7 @@ #include "code\modules\events\event.dm" #include "code\modules\events\event_container.dm" #include "code\modules\events\event_procs.dm" +#include "code\modules\events\fake_virus.dm" #include "code\modules\events\false_alarm.dm" #include "code\modules\events\floorcluwne.dm" #include "code\modules\events\immovable_rod.dm"