/mob/living/proc/find_nearby_disease()//only tries to find Contact and Blood spread diseases. Airborne ones are handled by breath_airborne_diseases() if(buckled)//Riding a vehicle? return if(HAS_TRAIT(src, TRAIT_MOVE_FLYING))//Flying? return //Now to check for stuff that's on the floor var/checked = FALSE var/block var/bleeding for(var/obj/effect/decal/cleanable/yucky in loc) if(!length(yucky.diseases)) continue if(!checked) if(lying) block = check_contact_sterility(BODY_ZONE_EVERYTHING) bleeding = check_bodypart_bleeding(BODY_ZONE_EVERYTHING) else block = check_contact_sterility(BODY_ZONE_LEGS) bleeding = check_bodypart_bleeding(BODY_ZONE_LEGS) checked = TRUE assume_contact_diseases(yucky.diseases, yucky, block, bleeding) return FALSE //This one is used for one-way infections, such as getting splashed with someone's blood due to clobbering them to death /mob/living/proc/oneway_contact_diseases(mob/living/carbon/L, block=0, bleeding=0) assume_contact_diseases(L.diseases,L,block,bleeding) //This one is used for two-ways infections, such as hand-shakes, hugs, punches, people bumping into each others, etc /mob/living/proc/share_contact_diseases(mob/living/carbon/L, block=0, bleeding=0) L.assume_contact_diseases(diseases ,src,block,bleeding) assume_contact_diseases(L.diseases, L, block, bleeding) ///////////////////////DISEASE STUFF/////////////////////////////////////////////////////////////////// //Blocked is whether clothing prevented the spread of contact/blood /mob/living/proc/assume_contact_diseases(list/disease_list, atom/source, blocked=0, bleeding=0) if(!length(disease_list)) return for(var/datum/disease/acute/V as anything in disease_list) if (!V) message_admins("[key_name(src)] is trying to assume contact diseases from touching \a [source], but the disease_list contains an ID ([V.uniqueID]-[V.subID]) that isn't associated to an actual disease datum! Ping Dwasint about it please.") return if(!blocked && V.spread_flags & DISEASE_SPREAD_CONTACT_SKIN) infect_disease(V, notes="(Contact, from [source])") /* else if(suitable_colony() && V.spread & SPREAD_COLONY) infect_disease(V, notes="(Colonized, from [source])") */ else if(!blocked && bleeding && (V.spread_flags & DISEASE_SPREAD_BLOOD)) infect_disease(V, notes="(Blood, from [source])") //Called in Life() by humans (in handle_breath.dm), monkeys and mice /mob/living/proc/breath_airborne_diseases()//only tries to find Airborne spread diseases. Blood and Contact ones are handled by find_nearby_disease() if (!check_airborne_sterility() && isturf(loc))//checking for sterile mouth protections breath_airborne_diseases_from_clouds() for(var/obj/effect/decal/cleanable/C in loc) if (!length(C.diseases)) continue for(var/datum/disease/acute/V as anything in C.diseases) if(V.spread_flags & DISEASE_SPREAD_AIRBORNE) infect_disease(V, notes="(Airborne, from [C])") /mob/living/proc/breath_airborne_diseases_from_clouds() var/sanity = 0 for(var/obj/effect/pathogen_cloud/cloud in range(1, src)) if(sanity > 10) break sanity++ //anything more than 10 and you aint getting air really if (!cloud.sourceIsCarrier || cloud.source != src || cloud.modified) for (var/datum/disease/acute/V in cloud.viruses) //if (V.spread & SPREAD_AIRBORNE) //Anima Syndrome allows for clouds of non-airborne viruses infect_disease(V, notes="(Airborne, from a pathogenic cloud[cloud.source ? " created by [key_name(cloud.source)]" : ""])") /mob/living/proc/handle_virus_updates(seconds_per_tick, times_fired) if(HAS_TRAIT(src, TRAIT_GODMODE) || HAS_TRAIT(src, TRAIT_VIRUSIMMUNE)) return FALSE if(stat != DEAD && isopenturf(loc)) // if we're dead or inside a locker/body bag/etc, don't bother find_nearby_disease()//getting diseases from blood/mucus/vomit splatters and open dishes activate_diseases(seconds_per_tick, times_fired) /mob/living/proc/activate_diseases(seconds_per_tick, times_fired) if (length(diseases)) var/active_disease = pick(diseases)//only one disease will activate its effects at a time. for (var/datum/disease/disease as anything in diseases) var/datum/disease/acute/acute_disease = disease if(istype(acute_disease)) acute_disease.activate(src, active_disease != acute_disease, seconds_per_tick) if((src.radiation > 0)) if (prob(50))//radiation turns your body into an inefficient pathogenic incubator. acute_disease.incubate(src, 1) //effect mutations won't occur unless the mob also has ingested mutagen //and even if they occur, the new effect will have a badness similar to the old one, so helpful pathogen won't instantly become deadly ones. else if(istype(disease)) if(stat != DEAD || disease.process_dead) disease.stage_act(seconds_per_tick, times_fired) else //Slowly decay back to regular strength immune system while you are sick if(immune_system?.strength > 1) immune_system.strength = max(immune_system.strength - 0.01, 1) /mob/living/proc/try_contact_infect(datum/disease/acute/D, zone = BODY_ZONE_EVERYTHING, note = "Try Contact Infect") if(!(D.spread_flags & DISEASE_SPREAD_CONTACT_SKIN)) return var/block = check_contact_sterility(zone) if(!block) infect_disease(D, notes = note)