Refactors virus spreading
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
var/magboot_state = "magboots"
|
||||
var/magpulse = 0
|
||||
var/slowdown_active = 2
|
||||
permeability_coefficient = 0.05
|
||||
actions_types = list(/datum/action/item_action/toggle)
|
||||
strip_delay = 70
|
||||
equip_delay_other = 70
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
armor = list(melee = 25, bullet = 25, laser = 25, energy = 25, bomb = 50, bio = 10, rad = 0, fire = 70, acid = 50)
|
||||
strip_delay = 70
|
||||
resistance_flags = 0
|
||||
permeability_coefficient = 0.05 //Thick soles, and covers the ankle
|
||||
pockets = /obj/item/storage/internal/pocket/shoes
|
||||
|
||||
/obj/item/clothing/shoes/combat/swat //overpowered boots for death squads
|
||||
@@ -38,6 +39,7 @@
|
||||
icon_state = "wizard"
|
||||
strip_delay = 50
|
||||
equip_delay_other = 50
|
||||
permeability_coefficient = 0.9
|
||||
|
||||
/obj/item/clothing/shoes/sandal/marisa
|
||||
desc = "A pair of magic black shoes."
|
||||
@@ -54,7 +56,7 @@
|
||||
desc = "A pair of yellow rubber boots, designed to prevent slipping on wet surfaces."
|
||||
name = "galoshes"
|
||||
icon_state = "galoshes"
|
||||
permeability_coefficient = 0.05
|
||||
permeability_coefficient = 0.01
|
||||
flags_1 = NOSLIP_1
|
||||
slowdown = SHOES_SLOWDOWN+1
|
||||
strip_delay = 50
|
||||
@@ -102,6 +104,7 @@
|
||||
strip_delay = 50
|
||||
equip_delay_other = 50
|
||||
resistance_flags = 0
|
||||
permeability_coefficient = 0.05 //Thick soles, and covers the ankle
|
||||
pockets = /obj/item/storage/internal/pocket/shoes
|
||||
|
||||
/obj/item/clothing/shoes/jackboots/fast
|
||||
@@ -112,6 +115,7 @@
|
||||
desc = "Boots lined with 'synthetic' animal fur."
|
||||
icon_state = "winterboots"
|
||||
item_state = "winterboots"
|
||||
permeability_coefficient = 0.15
|
||||
cold_protection = FEET|LEGS
|
||||
min_cold_protection_temperature = SHOES_MIN_TEMP_PROTECT
|
||||
heat_protection = FEET|LEGS
|
||||
@@ -125,6 +129,7 @@
|
||||
item_state = "jackboots"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
|
||||
permeability_coefficient = 0.15
|
||||
strip_delay = 40
|
||||
equip_delay_other = 40
|
||||
pockets = /obj/item/storage/internal/pocket/shoes
|
||||
@@ -171,6 +176,7 @@
|
||||
item_state = "roman"
|
||||
strip_delay = 100
|
||||
equip_delay_other = 100
|
||||
permeability_coefficient = 0.9
|
||||
|
||||
/obj/item/clothing/shoes/griffin
|
||||
name = "griffon boots"
|
||||
@@ -188,6 +194,7 @@
|
||||
resistance_flags = FIRE_PROOF
|
||||
pockets = /obj/item/storage/internal/pocket/shoes
|
||||
actions_types = list(/datum/action/item_action/bhop)
|
||||
permeability_coefficient = 0.05
|
||||
var/jumpdistance = 5 //-1 from to see the actual distance, e.g 4 goes over 3 tiles
|
||||
var/jumpspeed = 3
|
||||
var/recharging_rate = 60 //default 6 seconds between each dash
|
||||
|
||||
@@ -869,7 +869,12 @@
|
||||
var/obj/item/device/flightpack/pack = null
|
||||
var/mob/living/carbon/human/wearer = null
|
||||
var/active = FALSE
|
||||
<<<<<<< HEAD
|
||||
resistance_flags = FIRE_PROOF
|
||||
=======
|
||||
permeability_coefficient = 0.01
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
>>>>>>> db0c10e... Refactors virus spreading (#31066)
|
||||
|
||||
/obj/item/clothing/shoes/flightshoes/Destroy()
|
||||
pack = null
|
||||
|
||||
@@ -147,6 +147,7 @@
|
||||
|
||||
var/obj/item/reagent_containers/food/snacks/meat/slab/allmeat[meat_produced]
|
||||
var/obj/item/stack/sheet/animalhide/skin
|
||||
var/list/datum/disease/diseases = mob_occupant.get_static_viruses()
|
||||
|
||||
if(ishuman(occupant))
|
||||
var/mob/living/carbon/human/gibee = occupant
|
||||
@@ -180,26 +181,28 @@
|
||||
mob_occupant.death(1)
|
||||
mob_occupant.ghostize()
|
||||
qdel(src.occupant)
|
||||
spawn(src.gibtime)
|
||||
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
operating = FALSE
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/turf/nearby_turfs = RANGE_TURFS(3,T) - T
|
||||
if(skin)
|
||||
skin.forceMove(loc)
|
||||
skin.throw_at(pick(nearby_turfs),meat_produced,3)
|
||||
for (var/i=1 to meat_produced)
|
||||
var/obj/item/meatslab = allmeat[i]
|
||||
meatslab.forceMove(loc)
|
||||
meatslab.throw_at(pick(nearby_turfs),i,3)
|
||||
for (var/turfs=1 to meat_produced)
|
||||
var/turf/gibturf = pick(nearby_turfs)
|
||||
if (!gibturf.density && src in view(gibturf))
|
||||
new gibtype(gibturf,i)
|
||||
addtimer(CALLBACK(src, .proc/make_meat, skin, allmeat, meat_produced, gibtype, diseases), gibtime)
|
||||
|
||||
pixel_x = initial(pixel_x) //return to its spot after shaking
|
||||
operating = FALSE
|
||||
update_icon()
|
||||
/obj/machinery/gibber/proc/make_meat(obj/item/stack/sheet/animalhide/skin, list/obj/item/reagent_containers/food/snacks/meat/slab/allmeat, meat_produced, gibtype, list/datum/disease/diseases)
|
||||
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
operating = FALSE
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/turf/nearby_turfs = RANGE_TURFS(3,T) - T
|
||||
if(skin)
|
||||
skin.forceMove(loc)
|
||||
skin.throw_at(pick(nearby_turfs),meat_produced,3)
|
||||
for (var/i=1 to meat_produced)
|
||||
var/obj/item/meatslab = allmeat[i]
|
||||
meatslab.forceMove(loc)
|
||||
meatslab.throw_at(pick(nearby_turfs),i,3)
|
||||
for (var/turfs=1 to meat_produced)
|
||||
var/turf/gibturf = pick(nearby_turfs)
|
||||
if (!gibturf.density && src in view(gibturf))
|
||||
new gibtype(gibturf,i,diseases)
|
||||
|
||||
pixel_x = initial(pixel_x) //return to its spot after shaking
|
||||
operating = FALSE
|
||||
update_icon()
|
||||
|
||||
//auto-gibs anything that bumps into it
|
||||
/obj/machinery/gibber/autogibber
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
for(var/thing in O.viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(!(D.spread_flags & SPECIAL))
|
||||
if(!(D.spread_flags & VIRUS_SPREAD_SPECIAL))
|
||||
B.data["viruses"] += D.Copy()
|
||||
if(O.has_dna())
|
||||
B.data["blood_DNA"] = O.dna.unique_enzymes
|
||||
|
||||
@@ -846,7 +846,7 @@
|
||||
agent = "dragon's blood"
|
||||
desc = "What do dragons have to do with Space Station 13?"
|
||||
stage_prob = 20
|
||||
severity = BIOHAZARD
|
||||
severity = VIRUS_SEVERITY_BIOHAZARD
|
||||
visibility_flags = 0
|
||||
stage1 = list("Your bones ache.")
|
||||
stage2 = list("Your skin feels scaly.")
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
if(blood_data["viruses"])
|
||||
for(var/thing in blood_data["viruses"])
|
||||
var/datum/disease/D = thing
|
||||
if((D.spread_flags & SPECIAL) || (D.spread_flags & NON_CONTAGIOUS))
|
||||
if((D.spread_flags & VIRUS_SPREAD_SPECIAL) || (D.spread_flags & VIRUS_SPREAD_NON_CONTAGIOUS))
|
||||
continue
|
||||
C.ForceContractDisease(D)
|
||||
if(!(blood_data["blood_type"] in get_safe_blood(C.dna.blood_type)))
|
||||
@@ -258,14 +258,14 @@
|
||||
temp_blood_DNA |= drop.blood_DNA.Copy() //we transfer the dna from the drip to the splatter
|
||||
qdel(drop)//the drip is replaced by a bigger splatter
|
||||
else
|
||||
drop = new(T)
|
||||
drop = new(T, get_static_viruses())
|
||||
drop.transfer_mob_blood_dna(src)
|
||||
return
|
||||
|
||||
// Find a blood decal or create a new one.
|
||||
var/obj/effect/decal/cleanable/blood/B = locate() in T
|
||||
if(!B)
|
||||
B = new /obj/effect/decal/cleanable/blood/splatter(T)
|
||||
B = new /obj/effect/decal/cleanable/blood/splatter(T, get_static_viruses())
|
||||
B.transfer_mob_blood_dna(src) //give blood info to the blood decal.
|
||||
if(temp_blood_DNA)
|
||||
B.blood_DNA |= temp_blood_DNA
|
||||
|
||||
@@ -756,7 +756,7 @@
|
||||
B.damaged_brain = 0
|
||||
for(var/thing in viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(D.severity != NONTHREAT)
|
||||
if(D.severity != VIRUS_SEVERITY_POSITIVE)
|
||||
D.cure(0)
|
||||
if(admin_revive)
|
||||
regenerate_limbs()
|
||||
|
||||
@@ -113,13 +113,13 @@
|
||||
|
||||
for(var/thing in viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(D.IsSpreadByTouch())
|
||||
user.ContractDisease(D)
|
||||
if(D.spread_flags & VIRUS_SPREAD_CONTACT_SKIN)
|
||||
user.ContactContractDisease(D)
|
||||
|
||||
for(var/thing in user.viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(D.IsSpreadByTouch())
|
||||
ContractDisease(D)
|
||||
if(D.spread_flags & VIRUS_SPREAD_CONTACT_SKIN)
|
||||
ContactContractDisease(D)
|
||||
|
||||
if(lying && surgeries.len)
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
@@ -132,13 +132,13 @@
|
||||
/mob/living/carbon/attack_paw(mob/living/carbon/monkey/M)
|
||||
for(var/thing in viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(D.IsSpreadByTouch())
|
||||
M.ContractDisease(D)
|
||||
if(D.spread_flags & VIRUS_SPREAD_CONTACT_SKIN)
|
||||
M.ContactContractDisease(D)
|
||||
|
||||
for(var/thing in M.viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(D.IsSpreadByTouch())
|
||||
ContractDisease(D)
|
||||
if(D.spread_flags & VIRUS_SPREAD_CONTACT_SKIN)
|
||||
ContactContractDisease(D)
|
||||
|
||||
if(M.a_intent == INTENT_HELP)
|
||||
help_shake_act(M)
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
|
||||
/mob/living/carbon/human/spawn_gibs(with_bodyparts)
|
||||
if(with_bodyparts)
|
||||
new /obj/effect/gibspawner/human(get_turf(src), dna)
|
||||
new /obj/effect/gibspawner/human(get_turf(src), dna, get_static_viruses())
|
||||
else
|
||||
new /obj/effect/gibspawner/humanbodypartless(get_turf(src), dna)
|
||||
new /obj/effect/gibspawner/humanbodypartless(get_turf(src), dna, get_static_viruses())
|
||||
|
||||
/mob/living/carbon/human/spawn_dust(just_ash = FALSE)
|
||||
if(just_ash)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
return
|
||||
|
||||
/mob/living/proc/spawn_gibs()
|
||||
new /obj/effect/gibspawner/generic(get_turf(src))
|
||||
new /obj/effect/gibspawner/generic(get_turf(src), null, get_static_viruses())
|
||||
|
||||
/mob/living/proc/spill_organs()
|
||||
return
|
||||
|
||||
@@ -108,6 +108,17 @@
|
||||
//Even if we don't push/swap places, we "touched" them, so spread fire
|
||||
spreadFire(M)
|
||||
|
||||
//Also diseases
|
||||
for(var/thing in viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(D.spread_flags & VIRUS_SPREAD_CONTACT_SKIN)
|
||||
M.ContactContractDisease(D)
|
||||
|
||||
for(var/thing in M.viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(D.spread_flags & VIRUS_SPREAD_CONTACT_SKIN)
|
||||
ContactContractDisease(D)
|
||||
|
||||
if(now_pushing)
|
||||
return 1
|
||||
|
||||
@@ -507,7 +518,7 @@
|
||||
if((newdir in GLOB.cardinals) && (prob(50)))
|
||||
newdir = turn(get_dir(target_turf, start), 180)
|
||||
if(!blood_exists)
|
||||
new /obj/effect/decal/cleanable/trail_holder(start)
|
||||
new /obj/effect/decal/cleanable/trail_holder(start, get_static_viruses())
|
||||
|
||||
for(var/obj/effect/decal/cleanable/trail_holder/TH in start)
|
||||
if((!(newdir in TH.existing_dirs) || trail_type == "trails_1" || trail_type == "trails_2") && TH.existing_dirs.len <= 16) //maximum amount of overlays is 16 (all light & heavy directions filled)
|
||||
|
||||
@@ -376,8 +376,8 @@
|
||||
var/datum/disease/D = thing
|
||||
//the medibot can't detect viruses that are undetectable to Health Analyzers or Pandemic machines.
|
||||
if(!(D.visibility_flags & HIDDEN_SCANNER || D.visibility_flags & HIDDEN_PANDEMIC) \
|
||||
&& D.severity != NONTHREAT \
|
||||
&& (D.stage > 1 || (D.spread_flags & AIRBORNE))) // medibot can't detect a virus in its initial stage unless it spreads airborne.
|
||||
&& D.severity != VIRUS_SEVERITY_POSITIVE \
|
||||
&& (D.stage > 1 || (D.spread_flags & VIRUS_SPREAD_AIRBORNE))) // medibot can't detect a virus in its initial stage unless it spreads airborne.
|
||||
return 1 //STOP DISEASE FOREVER
|
||||
|
||||
return 0
|
||||
@@ -428,8 +428,8 @@
|
||||
var/datum/disease/D = thing
|
||||
//detectable virus
|
||||
if((!(D.visibility_flags & HIDDEN_SCANNER)) || (!(D.visibility_flags & HIDDEN_PANDEMIC)))
|
||||
if(D.severity != NONTHREAT) //virus is harmful
|
||||
if((D.stage > 1) || (D.spread_flags & AIRBORNE))
|
||||
if(D.severity != VIRUS_SEVERITY_POSITIVE) //virus is harmful
|
||||
if((D.stage > 1) || (D.spread_flags & VIRUS_SPREAD_AIRBORNE))
|
||||
virus = 1
|
||||
|
||||
if(!reagent_id && (virus))
|
||||
|
||||
@@ -1000,7 +1000,7 @@
|
||||
var/datum/disease/parrot_possession/P = new
|
||||
P.parrot = src
|
||||
loc = H
|
||||
H.ContractDisease(P)
|
||||
H.ForceContractDisease(P)
|
||||
parrot_interest = null
|
||||
H.visible_message("<span class='danger'>[src] dive bombs into [H]'s chest and vanishes!</span>", "<span class='userdanger'>[src] dive bombs into your chest, vanishing! This can't be good!</span>")
|
||||
|
||||
|
||||
@@ -336,6 +336,18 @@
|
||||
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
|
||||
//Share diseases that are spread by touch
|
||||
for(var/thing in viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(D.spread_flags & VIRUS_SPREAD_CONTACT_SKIN)
|
||||
M.ContactContractDisease(D)
|
||||
|
||||
for(var/thing in M.viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(D.spread_flags & VIRUS_SPREAD_CONTACT_SKIN)
|
||||
ContactContractDisease(D)
|
||||
|
||||
add_logs(src, M, "grabbed", addition="passive grab")
|
||||
if(!supress_message)
|
||||
visible_message("<span class='warning'>[src] has grabbed [M] passively!</span>")
|
||||
@@ -941,6 +953,16 @@
|
||||
/mob/proc/get_idcard()
|
||||
return
|
||||
|
||||
/mob/proc/get_static_viruses() //used when creating blood and other infective objects
|
||||
if(!LAZYLEN(viruses))
|
||||
return
|
||||
var/list/datum/disease/diseases = list()
|
||||
for(var/datum/disease/D in viruses)
|
||||
var/static_virus = D.Copy()
|
||||
diseases += static_virus
|
||||
return diseases
|
||||
|
||||
|
||||
/mob/vv_get_dropdown()
|
||||
. = ..()
|
||||
. += "---"
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
M.jitteriness = 0
|
||||
for(var/thing in M.viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(D.severity == NONTHREAT)
|
||||
if(D.severity == VIRUS_SEVERITY_POSITIVE)
|
||||
continue
|
||||
D.cure()
|
||||
..()
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
for(var/thing in data["viruses"])
|
||||
var/datum/disease/D = thing
|
||||
|
||||
if((D.spread_flags & SPECIAL) || (D.spread_flags & NON_CONTAGIOUS))
|
||||
if((D.spread_flags & VIRUS_SPREAD_SPECIAL) || (D.spread_flags & VIRUS_SPREAD_NON_CONTAGIOUS))
|
||||
continue
|
||||
|
||||
if(method == TOUCH || method == VAPOR)
|
||||
M.ContractDisease(D)
|
||||
if((method == TOUCH || method == VAPOR) && (D.spread_flags & VIRUS_SPREAD_CONTACT_FLUIDS))
|
||||
M.ContactContractDisease(D)
|
||||
else //ingest, patch or inject
|
||||
M.ForceContractDisease(D)
|
||||
|
||||
@@ -1058,7 +1058,7 @@
|
||||
|
||||
/datum/reagent/xenomicrobes/reaction_mob(mob/M, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0)
|
||||
if(method==PATCH || method==INGEST || method==INJECT || (method == VAPOR && prob(min(reac_volume,100)*(1 - touch_protection))))
|
||||
M.ContractDisease(new /datum/disease/transformation/xeno(0))
|
||||
M.ForceContractDisease(new /datum/disease/transformation/xeno(0))
|
||||
|
||||
/datum/reagent/fungalspores
|
||||
name = "Tubercle bacillus Cosmosis microbes"
|
||||
|
||||
Reference in New Issue
Block a user