[MIRROR] removes permeability, rolling it into bio armor [MDB IGNORE] (#13435)

* removes permeability, rolling it into bio armor

* e

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-05-09 01:16:27 +01:00
committed by GitHub
co-authored by Fikou Gandalf
parent a86a017f02
commit c1a1683db6
130 changed files with 214 additions and 304 deletions
+7 -7
View File
@@ -97,18 +97,18 @@
/datum/component/infective/proc/try_infect_equipped(datum/source, mob/living/L, slot)
SIGNAL_HANDLER
var/old_permeability
var/old_bio_armor
if(isitem(parent))
//if you are putting an infective item on, it obviously will not protect you, so set its permeability high enough that it will never block ContactContractDisease()
var/obj/item/I = parent
old_permeability = I.permeability_coefficient
I.permeability_coefficient = 1.01
//if you are putting an infective item on, it obviously will not protect you, so set its bio armor low enough that it will never block ContactContractDisease()
var/obj/item/equipped_item = parent
old_bio_armor = equipped_item.armor.getRating(BIO)
equipped_item.armor.setRating(bio = 0)
try_infect(L, slot2body_zone(slot))
if(isitem(parent))
var/obj/item/I = parent
I.permeability_coefficient = old_permeability
var/obj/item/equipped_item = parent
equipped_item.armor.setRating(bio = old_bio_armor)
/datum/component/infective/proc/try_infect_crossed(datum/source, atom/movable/arrived, atom/old_loc, list/atom/old_locs)
SIGNAL_HANDLER
+39 -55
View File
@@ -32,84 +32,68 @@
D.try_infect(src)
/mob/living/carbon/ContactContractDisease(datum/disease/D, target_zone)
if(!CanContractDisease(D))
/mob/living/carbon/ContactContractDisease(datum/disease/disease, target_zone)
if(!CanContractDisease(disease))
return FALSE
var/obj/item/clothing/Cl = null
var/passed = TRUE
var/head_ch = 80
var/body_ch = 100
var/hands_ch = 35
var/feet_ch = 15
var/head_chance = 80
var/body_chance = 100
var/hands_chance = 35/2
var/feet_chance = 15/2
if(prob(15/D.permeability_mod))
if(prob(15/disease.spreading_modifier))
return
if(satiety>0 && prob(satiety/10)) // positive satiety makes it harder to contract the disease.
return
//Lefts and rights do not matter for arms and legs, they both run the same checks
if(!target_zone)
target_zone = pick(head_ch;BODY_ZONE_HEAD,body_ch;BODY_ZONE_CHEST,hands_ch;BODY_ZONE_L_ARM,feet_ch;BODY_ZONE_L_LEG)
target_zone = pick_weight(list(
BODY_ZONE_HEAD = head_chance,
BODY_ZONE_CHEST = body_chance,
BODY_ZONE_R_ARM = hands_chance,
BODY_ZONE_L_ARM = hands_chance,
BODY_ZONE_R_LEG = feet_chance,
BODY_ZONE_L_LEG = feet_chance,
))
else
target_zone = check_zone(target_zone)
if(ismonkey(src))
var/mob/living/carbon/human/M = src
switch(target_zone)
if(BODY_ZONE_HEAD)
if(M.wear_mask && isobj(M.wear_mask))
Cl = M.wear_mask
passed = prob((Cl.permeability_coefficient*100) - 1)
else if(ishuman(src))
var/mob/living/carbon/human/H = src
if(ishuman(src))
var/mob/living/carbon/human/infecting_human = src
switch(target_zone)
if(BODY_ZONE_HEAD)
if(isobj(H.head) && !istype(H.head, /obj/item/paper))
Cl = H.head
passed = prob((Cl.permeability_coefficient*100) - 1)
if(passed && isobj(H.wear_mask))
Cl = H.wear_mask
passed = prob((Cl.permeability_coefficient*100) - 1)
if(passed && isobj(H.wear_neck))
Cl = H.wear_neck
passed = prob((Cl.permeability_coefficient*100) - 1)
if(isobj(infecting_human.head))
passed = prob(100-infecting_human.head.armor.getRating(BIO))
if(passed && isobj(infecting_human.wear_mask))
passed = prob(100-infecting_human.wear_mask.armor.getRating(BIO))
if(passed && isobj(infecting_human.wear_neck))
passed = prob(100-infecting_human.wear_neck.armor.getRating(BIO))
if(BODY_ZONE_CHEST)
if(isobj(H.wear_suit))
Cl = H.wear_suit
passed = prob((Cl.permeability_coefficient*100) - 1)
if(passed && isobj(ITEM_SLOT_ICLOTHING))
Cl = ITEM_SLOT_ICLOTHING
passed = prob((Cl.permeability_coefficient*100) - 1)
if(isobj(infecting_human.wear_suit))
passed = prob(100-infecting_human.wear_suit.armor.getRating(BIO))
if(passed && isobj(infecting_human.w_uniform))
passed = prob(100-infecting_human.w_uniform.armor.getRating(BIO))
if(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&HANDS)
Cl = H.wear_suit
passed = prob((Cl.permeability_coefficient*100) - 1)
if(passed && isobj(H.gloves))
Cl = H.gloves
passed = prob((Cl.permeability_coefficient*100) - 1)
if(isobj(infecting_human.wear_suit) && infecting_human.wear_suit.body_parts_covered&HANDS)
passed = prob(100-infecting_human.wear_suit.armor.getRating(BIO))
if(passed && isobj(infecting_human.gloves))
passed = prob(100-infecting_human.gloves.armor.getRating(BIO))
if(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&FEET)
Cl = H.wear_suit
passed = prob((Cl.permeability_coefficient*100) - 1)
if(passed && isobj(H.shoes))
Cl = H.shoes
passed = prob((Cl.permeability_coefficient*100) - 1)
if(isobj(infecting_human.wear_suit) && infecting_human.wear_suit.body_parts_covered&FEET)
passed = prob(100-infecting_human.wear_suit.armor.getRating(BIO))
if(passed && isobj(infecting_human.shoes))
passed = prob(100-infecting_human.shoes.armor.getRating(BIO))
if(passed)
D.try_infect(src)
disease.try_infect(src)
/mob/living/proc/AirborneContractDisease(datum/disease/D, force_spread)
if( ((D.spread_flags & DISEASE_SPREAD_AIRBORNE) || force_spread) && prob((50*D.permeability_mod) - 1))
ForceContractDisease(D)
/mob/living/proc/AirborneContractDisease(datum/disease/disease, force_spread)
if(((disease.spread_flags & DISEASE_SPREAD_AIRBORNE) || force_spread) && prob((50*disease.spreading_modifier) - 1))
ForceContractDisease(disease)
/mob/living/carbon/AirborneContractDisease(datum/disease/D, force_spread)
if(internal)
+2 -2
View File
@@ -28,7 +28,7 @@
var/cure_chance = 4
var/carrier = FALSE //If our host is only a carrier
var/bypasses_immunity = FALSE //Does it skip species virus immunity check? Some things may diseases and not viruses
var/permeability_mod = 1
var/spreading_modifier = 1
var/severity = DISEASE_SEVERITY_NONTHREAT
var/list/required_organs = list()
var/needs_all_cures = TRUE
@@ -147,7 +147,7 @@
//note that stage is not copied over - the copy starts over at stage 1
var/static/list/copy_vars = list("name", "visibility_flags", "disease_flags", "spread_flags", "form", "desc", "agent", "spread_text",
"cure_text", "max_stages", "stage_prob", "viable_mobtypes", "cures", "infectivity", "cure_chance",
"bypasses_immunity", "permeability_mod", "severity", "required_organs", "needs_all_cures", "strain_data",
"bypasses_immunity", "spreading_modifier", "severity", "required_organs", "needs_all_cures", "strain_data",
"infectable_biotypes", "process_dead")
var/datum/disease/D = copy_type ? new copy_type() : new type()
+1 -1
View File
@@ -7,7 +7,7 @@
cure_chance = 10
agent = "Shitty Adrenal Glands"
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 1
spreading_modifier = 1
desc = "If left untreated the subject will suffer from lethargy, dizziness and periodic loss of conciousness."
severity = DISEASE_SEVERITY_MEDIUM
disease_flags = CAN_CARRY|CAN_RESIST
+1 -1
View File
@@ -253,7 +253,7 @@
else
SetSpread(DISEASE_SPREAD_BLOOD)
permeability_mod = max(CEILING(0.4 * properties["transmittable"], 1), 1)
spreading_modifier = max(CEILING(0.4 * properties["transmittable"], 1), 1)
cure_chance = clamp(7.5 - (0.5 * properties["resistance"]), 5, 10) // can be between 5 and 10
stage_prob = max(0.5 * properties["stage_rate"], 1)
SetSeverity(properties["severity"])
+1 -1
View File
@@ -5,7 +5,7 @@
cures = list(/datum/reagent/medicine/spaceacillin)
agent = "XY-rhinovirus"
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 0.5
spreading_modifier = 0.5
desc = "If left untreated the subject will contract the flu."
severity = DISEASE_SEVERITY_NONTHREAT
+1 -1
View File
@@ -7,7 +7,7 @@
cure_chance = 5
agent = "H13N1 flu virion"
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 0.75
spreading_modifier = 0.75
desc = "If left untreated the subject will feel quite unwell."
severity = DISEASE_SEVERITY_MINOR
+1 -1
View File
@@ -7,7 +7,7 @@
cure_chance = 5
agent = "1nqu1s1t10n flu virion"
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 0.75
spreading_modifier = 0.75
desc = "If left untreated the subject will burn to death for being a heretic."
severity = DISEASE_SEVERITY_DANGEROUS
+1 -1
View File
@@ -9,7 +9,7 @@
agent = "Gravitokinetic Bipotential SADS+"
viable_mobtypes = list(/mob/living/carbon/human)
disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
permeability_mod = 1
spreading_modifier = 1
severity = DISEASE_SEVERITY_BIOHAZARD
/datum/disease/gbs/stage_act(delta_time, times_fired)
+1 -1
View File
@@ -6,7 +6,7 @@
cure_text = "Heart replacement surgery to cure. Defibrillation (or as a last resort, uncontrolled electric shocking) may also be effective after the onset of cardiac arrest. Penthrite can also mitigate cardiac arrest."
agent = "Shitty Heart"
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 1
spreading_modifier = 1
desc = "If left untreated the subject will die!"
severity = "Dangerous!"
disease_flags = CAN_CARRY|CAN_RESIST
+1 -1
View File
@@ -7,7 +7,7 @@
agent = "Fukkos Miracos"
viable_mobtypes = list(/mob/living/carbon/human)
disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
permeability_mod = 0.75
spreading_modifier = 0.75
desc = "This disease disrupts the magnetic field of your body, making it act as if a powerful magnet. Injections of iron help stabilize the field."
severity = DISEASE_SEVERITY_MEDIUM
infectable_biotypes = MOB_ORGANIC|MOB_ROBOTIC
+1 -1
View File
@@ -6,7 +6,7 @@
agent = "Consuming Live Parasites"
spread_text = "Non-Biological"
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 1
spreading_modifier = 1
desc = "If left untreated the subject will passively lose nutrients, and eventually lose their liver."
severity = DISEASE_SEVERITY_HARMFUL
disease_flags = CAN_CARRY|CAN_RESIST
+1 -1
View File
@@ -7,7 +7,7 @@
cure_chance = 50
agent = "H0NI<42 Virus"
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 0.75
spreading_modifier = 0.75
desc = "If left untreated the subject will probably drive others to insanity."
severity = DISEASE_SEVERITY_MEDIUM
+1 -1
View File
@@ -9,7 +9,7 @@
viable_mobtypes = list(/mob/living/carbon/human)
desc = "A DNA-altering retrovirus that scrambles the structural and unique enzymes of a host constantly."
severity = DISEASE_SEVERITY_HARMFUL
permeability_mod = 0.4
spreading_modifier = 0.4
stage_prob = 1
var/restcure = 0
+1 -1
View File
@@ -7,7 +7,7 @@
cures = list("plasma")
agent = "Unknown"
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 1
spreading_modifier = 1
severity = DISEASE_SEVERITY_BIOHAZARD
/datum/disease/rhumba_beat/stage_act(delta_time, times_fired)
+1 -1
View File
@@ -104,7 +104,7 @@
spread_text = "Unknown"
spread_flags = DISEASE_SPREAD_NON_CONTAGIOUS
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 1
spreading_modifier = 1
cure_chance = 0.5
disease_flags = CAN_CARRY|CAN_RESIST
desc = "A neutered but still dangerous descendent of the ancient \"Jungle Fever\", victims will eventually genetically backtrack into a primate. \
+1 -1
View File
@@ -8,7 +8,7 @@
agent = "Rincewindus Vulgaris"
viable_mobtypes = list(/mob/living/carbon/human)
disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
permeability_mod = 0.75
spreading_modifier = 0.75
desc = "Some speculate that this virus is the cause of the Space Wizard Federation's existence. Subjects affected show the signs of brain damage, yelling obscure sentences or total gibberish. On late stages subjects sometime express the feelings of inner power, and, cite, 'the ability to control the forces of cosmos themselves!' A gulp of strong, manly spirits usually reverts them to normal, humanlike, condition."
severity = DISEASE_SEVERITY_HARMFUL
required_organs = list(/obj/item/bodypart/head)
+1 -2
View File
@@ -209,11 +209,10 @@
icon_state = "black"
inhand_icon_state = "blackgloves"
siemens_coefficient = 0
permeability_coefficient = 0.05
strip_delay = 80
cold_protection = HANDS
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
heat_protection = HANDS
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
resistance_flags = NONE
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 80, ACID = 50)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 90, FIRE = 80, ACID = 50)