mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Virus2 fixes from bay, changelog update.
This commit is contained in:
@@ -72,6 +72,8 @@
|
||||
if (ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
|
||||
if( istype(tmob, /mob/living/carbon) && prob(10) )
|
||||
src.spread_disease_to(AM, "Contact")
|
||||
//BubbleWrap - Should stop you pushing a restrained person out of the way
|
||||
|
||||
if(istype(tmob, /mob/living/carbon/human))
|
||||
|
||||
@@ -59,6 +59,10 @@
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
|
||||
return
|
||||
else
|
||||
if(istype(M,/mob/living/carbon))
|
||||
// log_debug("No gloves, [M] is truing to infect [src]")
|
||||
M.spread_disease_to(src, "Contact")
|
||||
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
@@ -359,6 +359,13 @@
|
||||
if(breath)
|
||||
loc.assume_air(breath)
|
||||
|
||||
//spread some viruses while we are at it
|
||||
if (virus2.len > 0)
|
||||
if (get_infection_chance(src) && prob(20))
|
||||
// log_debug("[src] : Exhaling some viruses")
|
||||
for(var/mob/living/carbon/M in view(1,src))
|
||||
src.spread_disease_to(M)
|
||||
|
||||
|
||||
proc/get_breath_from_internal(volume_needed)
|
||||
if(internal)
|
||||
@@ -1354,14 +1361,15 @@
|
||||
V.cure(src)
|
||||
|
||||
for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
|
||||
if(B.virus2.len && get_infection_chance(src))
|
||||
if(B.virus2.len)
|
||||
for (var/ID in B.virus2)
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
var/datum/disease2/disease/V = B.virus2[ID]
|
||||
infect_virus2(src,V)
|
||||
|
||||
for(var/obj/effect/decal/cleanable/mucus/M in view(1,src))
|
||||
if(M.virus2.len && get_infection_chance(src))
|
||||
if(M.virus2.len)
|
||||
for (var/ID in M.virus2)
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
var/datum/disease2/disease/V = M.virus2[ID]
|
||||
infect_virus2(src,V)
|
||||
|
||||
for (var/ID in virus2)
|
||||
|
||||
@@ -171,14 +171,14 @@
|
||||
V.cure(src)
|
||||
|
||||
for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
|
||||
if(B.virus2.len && get_infection_chance(src))
|
||||
if(B.virus2.len)
|
||||
for (var/ID in B.virus2)
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
var/datum/disease2/disease/V = B.virus2[ID]
|
||||
infect_virus2(src,V)
|
||||
for(var/obj/effect/decal/cleanable/mucus/M in view(1,src))
|
||||
if(M.virus2.len && get_infection_chance(src))
|
||||
if(M.virus2.len)
|
||||
for (var/ID in M.virus2)
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
var/datum/disease2/disease/V = M.virus2[ID]
|
||||
infect_virus2(src,V)
|
||||
|
||||
for (var/ID in virus2)
|
||||
|
||||
@@ -83,7 +83,7 @@ mob/living/carbon/human/proc/handle_pain()
|
||||
for(var/datum/organ/external/E in organs)
|
||||
// amputated limbs don't cause pain
|
||||
if(E.amputated) continue
|
||||
|
||||
if(E.status & ORGAN_DEAD) continue
|
||||
var/dam = E.get_damage()
|
||||
// make the choice of the organ depend on damage,
|
||||
// but also sometimes use one of the less damaged ones
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/datum/disease2/disease
|
||||
var/infectionchance = 10
|
||||
var/infectionchance = 70
|
||||
var/speed = 1
|
||||
var/spreadtype = "Blood" // Can also be "Airborne"
|
||||
var/spreadtype = "Contact" // Can also be "Airborne"
|
||||
var/stage = 1
|
||||
var/stageprob = 10
|
||||
var/dead = 0
|
||||
@@ -25,10 +25,10 @@
|
||||
holder.getrandomeffect()
|
||||
effects += holder
|
||||
uniqueID = rand(0,10000)
|
||||
infectionchance = rand(1,10)
|
||||
infectionchance = rand(60,90)
|
||||
antigen |= text2num(pick(ANTIGENS))
|
||||
antigen |= text2num(pick(ANTIGENS))
|
||||
spreadtype = "Airborne"
|
||||
spreadtype = prob(70) ? "Airborne" : "Contact"
|
||||
|
||||
/datum/disease2/disease/proc/activate(var/mob/living/carbon/mob)
|
||||
if(dead)
|
||||
@@ -38,9 +38,9 @@
|
||||
if(mob.stat == 2)
|
||||
return
|
||||
if(stage <= 1 && clicks == 0) // with a certain chance, the mob may become immune to the disease before it starts properly
|
||||
if(prob(20))
|
||||
if(prob(5))
|
||||
mob.antibodies |= antigen // 20% immunity is a good chance IMO, because it allows finding an immune person easily
|
||||
else
|
||||
|
||||
if(mob.radiation > 50)
|
||||
if(prob(1))
|
||||
majormutate()
|
||||
@@ -65,6 +65,12 @@
|
||||
for(var/datum/disease2/effectholder/e in effects)
|
||||
e.runeffect(mob,stage)
|
||||
|
||||
//Short airborne spread
|
||||
if(src.spreadtype == "Airborne")
|
||||
for(var/mob/living/carbon/M in oview(1,mob))
|
||||
if(airborne_can_reach(get_turf(mob), get_turf(M)))
|
||||
infect_virus2(M,src)
|
||||
|
||||
//fever
|
||||
mob.bodytemperature = max(mob.bodytemperature, min(310+5*stage ,mob.bodytemperature+5*stage))
|
||||
clicks+=speed
|
||||
@@ -75,10 +81,10 @@
|
||||
mob.virus2.Remove("[uniqueID]")
|
||||
|
||||
/datum/disease2/disease/proc/minormutate()
|
||||
uniqueID = rand(0,10000)
|
||||
//uniqueID = rand(0,10000)
|
||||
var/datum/disease2/effectholder/holder = pick(effects)
|
||||
holder.minormutate()
|
||||
infectionchance = min(10,infectionchance + rand(0,1))
|
||||
infectionchance = min(50,infectionchance + rand(0,10))
|
||||
|
||||
/datum/disease2/disease/proc/majormutate()
|
||||
uniqueID = rand(0,10000)
|
||||
|
||||
@@ -134,10 +134,13 @@
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
var/datum/organ/external/E = pick(H.organs)
|
||||
var/organ = pick(list("r_arm","l_arm","r_leg","r_leg"))
|
||||
var/datum/organ/external/E = H.organs_by_name[organ]
|
||||
if (!(E.status & ORGAN_DEAD))
|
||||
E.status |= ORGAN_DEAD
|
||||
H << "<span class='notice'>You can't feel your [E.display_name] anymore...</span>"
|
||||
for (var/datum/organ/external/C in E.children)
|
||||
C.status |= ORGAN_DEAD
|
||||
mob.adjustToxLoss(15*multiplier)
|
||||
|
||||
deactivate(var/mob/living/carbon/mob,var/multiplier)
|
||||
@@ -145,6 +148,8 @@
|
||||
var/mob/living/carbon/human/H = mob
|
||||
for (var/datum/organ/external/E in H.organs)
|
||||
E.status &= ~ORGAN_DEAD
|
||||
for (var/datum/organ/external/C in E.children)
|
||||
C.status &= ~ORGAN_DEAD
|
||||
|
||||
/datum/disease2/effect/immortal
|
||||
name = "Longevity Syndrome"
|
||||
@@ -285,11 +290,8 @@
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*cough")
|
||||
for(var/mob/living/carbon/M in view(1,mob))
|
||||
if(airborne_can_reach(get_turf(mob), get_turf(M)))
|
||||
for (var/datum/disease2/disease/V in mob.virus2)
|
||||
if(V.spreadtype == "Airborne")
|
||||
infect_virus2(M,V)
|
||||
for(var/mob/living/carbon/M in oview(2,mob))
|
||||
mob.spread_disease_to(M)
|
||||
|
||||
/datum/disease2/effect/hungry
|
||||
name = "Appetiser Effect"
|
||||
@@ -320,8 +322,8 @@
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "<span class='notice'>You feel a rush of energy inside you!</span>"
|
||||
if (mob.reagents.get_reagent_amount("hyperzine") < 30)
|
||||
mob.reagents.add_reagent("hyperzine", 10)
|
||||
if (mob.reagents.get_reagent_amount("hyperzine") < 10)
|
||||
mob.reagents.add_reagent("hyperzine", 4)
|
||||
if (prob(30))
|
||||
mob.jitteriness += 10
|
||||
|
||||
|
||||
@@ -1,21 +1,28 @@
|
||||
//Returns 1 if mob can be infected, 0 otherwise. Checks his clothing.
|
||||
proc/get_infection_chance(var/mob/living/carbon/M)
|
||||
proc/get_infection_chance(var/mob/living/carbon/M, var/vector = "Airborne")
|
||||
var/score = 0
|
||||
if (!istype(M))
|
||||
return 0
|
||||
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
if(M:gloves)
|
||||
score += 5
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/space)) score += 10
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10
|
||||
if(istype(M:head, /obj/item/clothing/head/helmet/space)) score += 5
|
||||
if(istype(M:head, /obj/item/clothing/head/bio_hood)) score += 5
|
||||
|
||||
if (vector == "Airborne")
|
||||
if(M.internal) //not breathing infected air helps greatly
|
||||
score = 30
|
||||
if(M.wear_mask)
|
||||
score += 5
|
||||
if(istype(M:wear_mask, /obj/item/clothing/mask/surgical) && !M.internal)
|
||||
score += 10
|
||||
if(M.internal)
|
||||
score += 10
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/space) && istype(M:head, /obj/item/clothing/head/helmet/space)) score += 15
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit) && istype(M:head, /obj/item/clothing/head/bio_hood)) score += 15
|
||||
|
||||
|
||||
if (vector == "Contact")
|
||||
if(M:gloves) score += 15
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/space)) score += 10
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10
|
||||
|
||||
// log_debug("[M]'s resistance to [vector] viruses: [score]")
|
||||
|
||||
if(score >= 30)
|
||||
return 0
|
||||
@@ -29,6 +36,7 @@ proc/get_infection_chance(var/mob/living/carbon/M)
|
||||
return 0
|
||||
else if(score == 5 && prob(35))
|
||||
return 0
|
||||
// log_debug("Infection got through")
|
||||
return 1
|
||||
|
||||
//Checks if table-passing table can reach target (5 tile radius)
|
||||
@@ -46,8 +54,10 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
//Attemptes to infect mob M with virus. Set forced to 1 to ignore protective clothnig
|
||||
/proc/infect_virus2(var/mob/living/carbon/M,var/datum/disease2/disease/disease,var/forced = 0)
|
||||
if(!istype(disease))
|
||||
// log_debug("Bad virus")
|
||||
return
|
||||
if(!istype(M))
|
||||
// log_debug("Bad mob")
|
||||
return
|
||||
if ("[disease.uniqueID]" in M.virus2)
|
||||
return
|
||||
@@ -55,13 +65,16 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
if(M.antibodies & disease.antigen != 0)
|
||||
return
|
||||
|
||||
// log_debug("Infecting [M]")
|
||||
|
||||
if(prob(disease.infectionchance) || forced)
|
||||
// certain clothes can prevent an infection
|
||||
if(!forced && !get_infection_chance(M))
|
||||
if(!forced && !get_infection_chance(M, disease.spreadtype))
|
||||
return
|
||||
|
||||
var/datum/disease2/disease/D = disease.getcopy()
|
||||
D.minormutate()
|
||||
// log_debug("Adding virus")
|
||||
M.virus2["[D.uniqueID]"] = D
|
||||
|
||||
//Infects mob M with random lesser disease, if he doesn't have one
|
||||
@@ -80,3 +93,45 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
//Fancy prob() function.
|
||||
/proc/dprob(var/p)
|
||||
return(prob(sqrt(p)) && prob(sqrt(p)))
|
||||
|
||||
/mob/living/carbon/proc/spread_disease_to(var/mob/living/carbon/victim, var/vector = "Airborne")
|
||||
if (src == victim)
|
||||
return "retardation"
|
||||
|
||||
// log_debug("Spreading [vector] diseases from [src] to [victim]")
|
||||
if (virus2.len > 0)
|
||||
for (var/ID in virus2)
|
||||
log_debug("Attempting virus [ID]")
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
if(V.spreadtype != vector) continue
|
||||
|
||||
if (vector == "Airborne")
|
||||
if(airborne_can_reach(get_turf(src), get_turf(victim)))
|
||||
// log_debug("In range, infecting")
|
||||
infect_virus2(victim,V)
|
||||
else
|
||||
// log_debug("Could not reach target")
|
||||
|
||||
if (vector == "Contact")
|
||||
if (in_range(src, victim))
|
||||
// log_debug("In range, infecting")
|
||||
infect_virus2(victim,V)
|
||||
|
||||
//contact goes both ways
|
||||
if (victim.virus2.len > 0 && vector == "Contact")
|
||||
// log_debug("Spreading [vector] diseases from [victim] to [src]")
|
||||
var/nudity = 1
|
||||
|
||||
if (ishuman(victim))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
var/datum/organ/external/select_area = H.get_organ(src.zone_sel.selecting)
|
||||
var/list/clothes = list(H.head, H.wear_mask, H.wear_suit, H.w_uniform, H.gloves, H.shoes)
|
||||
for(var/obj/item/clothing/C in clothes )
|
||||
if(C && istype(C))
|
||||
if(C.body_parts_covered & select_area.body_part)
|
||||
nudity = 0
|
||||
if (nudity)
|
||||
for (var/ID in victim.virus2)
|
||||
var/datum/disease2/disease/V = victim.virus2[ID]
|
||||
if(V && V.spreadtype != vector) continue
|
||||
infect_virus2(src,V)
|
||||
@@ -53,8 +53,8 @@
|
||||
if(prob(50))
|
||||
user << "The dish shatters"
|
||||
if(virus2.infectionchance > 0)
|
||||
for(var/mob/living/carbon/target in view(null, src))
|
||||
if(airborne_can_reach(src.loc, target.loc))
|
||||
for(var/mob/living/carbon/target in view(1, get_turf(src)))
|
||||
if(airborne_can_reach(get_turf(src), get_turf(target)))
|
||||
if(get_infection_chance(target))
|
||||
infect_virus2(target,src.virus2)
|
||||
del src
|
||||
|
||||
@@ -78,10 +78,11 @@
|
||||
<h2 class="date">[IN DEVELOPMENT]</h2>
|
||||
<h3 class="author">N3X15 updated</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="rscadd">Moved Telecomms to station, satellite is abandoned.</li>
|
||||
<li class="rscadd">Added Centcomm Merch Store to cargo, payable via job objective cash.</li>
|
||||
<li class="rscadd">Re-added roburgers.</li>
|
||||
<li class="rscadd">Add wooden arms and hook hands. Hook hands cannot fire weapons.</li>
|
||||
<li class="rscadd">Major refactor of blood and blood trails so blood of all kinds can be tracked.</li>
|
||||
<li class="rscadd">Major refactor of blood and blood trails so trails of all kinds can be tracked.</li>
|
||||
<li class="rscadd">Mulebots can run over xenos.</li>
|
||||
<li class="rscadd">IV drips are now constructable with two sheets of metal.</li>
|
||||
<li class="bugfix">No more hitting blood/dirt with things; RCDs and other tools ignore cleanables. Fixes dirt making it impossible to fix the floor/seal breaches.</li>
|
||||
@@ -92,6 +93,13 @@
|
||||
<li class="rscadd">Custom amount button on chem dispenser</li>
|
||||
<li class="tweak">Paralysis sting now costs 4 genome points rather than 3, this is a slight change in order to further balance the changeling gamemode.</li>
|
||||
</ul>
|
||||
<h3 class='author'>Chinsky updated:</h3>
|
||||
<ul class='changes bgimages16'>
|
||||
<li class='rscadd'>Added contact-spread viruses. Spread if infected guy touches someone with bare hands, or if someone touches bare infected guy. Biosuits/gloves help.</li>
|
||||
<li class='rscadd'>Changed way airborne viruses spread a bit. Now 20% of breaths will carry viruses to adjacent tiles. Wearing sterile mask cuts down it to 5%. Masks, bio/space suits (only when worn with matching helmet) protect, internals protect completely.</li>
|
||||
<li class='rscadd'>Raised infection chances considerably. They were so low people reported that infection does not work. Now it's 50-90% chance for unprotected folks.</li>
|
||||
<li class="bugfix">Blood puddles and mucus now spread the fun again</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">2013.09.30</h2>
|
||||
|
||||
Reference in New Issue
Block a user