Skip to content

Commit

Permalink
TGS Test Merge (#5925)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Sep 9, 2024
2 parents 0d7bb30 + defe54c commit 8900922
Show file tree
Hide file tree
Showing 42 changed files with 137 additions and 233 deletions.
2 changes: 0 additions & 2 deletions code/datums/agents/tools/conceal_gloves.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@

icon_state = "black"
item_state = "bgloves"

siemens_coefficient = 0
permeability_coefficient = 0.05
flags_cold_protection = BODY_FLAG_HANDS
min_cold_protection_temperature = GLOVES_MIN_COLD_PROT
flags_heat_protection = BODY_FLAG_HANDS
Expand Down
12 changes: 8 additions & 4 deletions code/datums/disease.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,20 @@ GLOBAL_LIST_INIT(diseases, typesof(/datum/disease) - /datum/disease)
how_spread = force_spread

if(how_spread == SPECIAL || how_spread == NON_CONTAGIOUS || how_spread == BLOOD)//does not spread
return
return FALSE

if(stage < contagious_period) //the disease is not contagious at this stage
return
return FALSE

if(!source)//no holder specified
if(affected_mob)//no mob affected holder
source = affected_mob
else //no source and no mob affected. Rogue disease. Break
return
return FALSE

var/mob/source_mob = source
if(istype(source_mob) && !source_mob.can_pass_disease())
return FALSE

var/check_range = airborne_range//defaults to airborne - range 2

Expand All @@ -122,7 +126,7 @@ GLOBAL_LIST_INIT(diseases, typesof(/datum/disease) - /datum/disease)

if(isturf(source.loc))
FOR_DOVIEW(var/mob/living/carbon/victim, check_range, source, HIDE_INVISIBLE_OBSERVER)
if(isturf(victim.loc))
if(isturf(victim.loc) && victim.can_pass_disease())
if(AStar(source.loc, victim.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, check_range))
victim.contract_disease(src, 0, 1, force_spread)
FOR_DOVIEW_END
Expand Down
70 changes: 1 addition & 69 deletions code/datums/diseases/mob_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,36 +49,10 @@
if(prob(15/virus.permeability_mod)) return //the power of immunity compels this disease! but then you forgot resistances
var/passed = 1

//chances to target this zone
var/head_ch
var/body_ch
var/hands_ch
var/feet_ch

if(spread_type == -5)
spread_type = virus.spread_type

switch(spread_type)
if(CONTACT_HANDS)
head_ch = 0
body_ch = 0
hands_ch = 100
feet_ch = 0
if(CONTACT_FEET)
head_ch = 0
body_ch = 0
hands_ch = 0
feet_ch = 100
else
head_ch = 100
body_ch = 100
hands_ch = 25
feet_ch = 25


var/target_zone = pick(head_ch;1,body_ch;2,hands_ch;3,feet_ch;4)//1 - head, 2 - body, 3 - hands, 4- feet

passed = check_disease_pass_clothes(target_zone)
passed = can_pass_disease()

if(passed)
AddDisease(virus)
Expand All @@ -102,45 +76,3 @@
. = ..()
med_hud_set_status()

//returns whether the mob's clothes stopped the disease from passing through
/mob/proc/check_disease_pass_clothes(target_zone)
return 1

/mob/living/carbon/human/check_disease_pass_clothes(target_zone)
var/obj/item/clothing/Cl
var/protection = 0
switch(target_zone)
if(1)
if(isobj(head) && !istype(head, /obj/item/paper))
Cl = head
protection += (Cl.permeability_coefficient*100)-100
if(isobj(wear_mask))
Cl = wear_mask
protection += (Cl.permeability_coefficient*100)-100
if(2)//arms and legs included
if(isobj(wear_suit))
Cl = wear_suit
protection += (Cl.permeability_coefficient*100)-100
if(isobj(WEAR_BODY))
Cl = WEAR_BODY
protection += (Cl.permeability_coefficient*100)-100
if(3)
if(isobj(wear_suit) && wear_suit.flags_armor_protection & BODY_FLAG_HANDS)
Cl = wear_suit
protection += (Cl.permeability_coefficient*100)-100

if(isobj(gloves))
Cl = gloves
protection += (Cl.permeability_coefficient*100)-100
if(4)
if(isobj(wear_suit) && wear_suit.flags_armor_protection & BODY_FLAG_FEET)
Cl = wear_suit
protection += (Cl.permeability_coefficient*100)-100

if(isobj(shoes))
Cl = shoes
protection += (Cl.permeability_coefficient*100)-100
else
to_chat(src, "Something bad happened with disease target zone code, tell a dev or admin ")
return prob(clamp(protection, 5, 90))

5 changes: 0 additions & 5 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,8 @@
var/list/actions
/// list of paths of action datums to give to the item on New().
var/list/actions_types

//var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible

/// for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets)
var/gas_transfer_coefficient = 1
/// for chemicals/diseases
var/permeability_coefficient = 1
/// for electrical admittance/conductance (electrocution checks and shit)
var/siemens_coefficient = 1
/// How much clothing is slowing you down. Negative values speeds you up
Expand Down
42 changes: 12 additions & 30 deletions code/game/objects/structures/crates_lockers/closets/l3closet.dm
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
/obj/structure/closet/l3closet
name = "level-3 biohazard suit closet"
desc = "It's a storage unit for level-3 biohazard gear."
icon_state = "bio"
icon_closed = "bio"
icon_opened = "bioopen"
icon_state = "bio_general"
icon_closed = "bio_general"
icon_opened = "bio_generalopen"

/obj/structure/closet/l3closet/Initialize()
. = ..()
new /obj/item/clothing/suit/bio_suit/general( src )
new /obj/item/clothing/head/bio_hood/general( src )

new /obj/item/clothing/suit/bio_suit( src )
new /obj/item/clothing/head/bio_hood( src )

/obj/structure/closet/l3closet/general
icon_state = "bio_general"
icon_closed = "bio_general"
icon_opened = "bio_generalopen"
/obj/structure/closet/l3closet/medical
icon_state = "bio_medical"
icon_closed = "bio_medical"
icon_opened = "bio_medicalopen"

/obj/structure/closet/l3closet/general/Initialize()
/obj/structure/closet/l3closet/medical/Initialize()
. = ..()
contents = list()
new /obj/item/clothing/suit/bio_suit/general( src )
new /obj/item/clothing/head/bio_hood/general( src )

new /obj/item/clothing/suit/bio_suit/medical( src )
new /obj/item/clothing/head/bio_hood/medical( src )

/obj/structure/closet/l3closet/virology
icon_state = "bio_virology"
Expand All @@ -33,9 +31,6 @@
contents = list()
new /obj/item/clothing/suit/bio_suit/virology( src )
new /obj/item/clothing/head/bio_hood/virology( src )
new /obj/item/clothing/mask/breath(src)
new /obj/item/tank/oxygen(src)


/obj/structure/closet/l3closet/security
icon_state = "bio_security"
Expand All @@ -48,19 +43,6 @@
new /obj/item/clothing/suit/bio_suit/security( src )
new /obj/item/clothing/head/bio_hood/security( src )


/obj/structure/closet/l3closet/janitor
icon_state = "bio_janitor"
icon_closed = "bio_janitor"
icon_opened = "bio_janitoropen"

/obj/structure/closet/l3closet/janitor/Initialize()
. = ..()
contents = list()
new /obj/item/clothing/suit/bio_suit/janitor( src )
new /obj/item/clothing/head/bio_hood/janitor( src )


/obj/structure/closet/l3closet/scientist
icon_state = "bio_scientist"
icon_closed = "bio_scientist"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@
siemens_coefficient = 0.9
flags_armor_protection = BODY_FLAG_FEET
flags_equip_slot = SLOT_FEET
permeability_coefficient = 0.50

slowdown = SHOES_SLOWDOWN
blood_overlay_type = "feet"
/// The currently inserted item.
Expand Down
3 changes: 1 addition & 2 deletions code/modules/clothing/gloves/color.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
icon_state = "insulated"
item_state = "insulated"
siemens_coefficient = 0
permeability_coefficient = 0.05

flags_cold_protection = BODY_FLAG_HANDS
min_cold_protection_temperature = GLOVES_MIN_COLD_PROT
flags_heat_protection = BODY_FLAG_HANDS
Expand All @@ -16,7 +16,6 @@
icon_state = "insulated"
item_state = "insulated"
siemens_coefficient = 1 //Set to a default of 1, gets overridden in New()
permeability_coefficient = 0.05

/obj/item/clothing/gloves/fyellow/New()
siemens_coefficient = pick(0,0.5,0.5,0.5,0.5,0.75,1.5)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/clothing/gloves/marine_gloves.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
icon_state = "black"
item_state = "black"
siemens_coefficient = 0.6
permeability_coefficient = 0.05

flags_cold_protection = BODY_FLAG_HANDS
flags_heat_protection = BODY_FLAG_HANDS
min_cold_protection_temperature = GLOVES_MIN_COLD_PROT
Expand Down Expand Up @@ -84,7 +84,7 @@
icon_state = "yellow"
item_state = "ygloves"
siemens_coefficient = 0
permeability_coefficient = 0.01

adopts_squad_color = FALSE

/obj/item/clothing/gloves/marine/techofficer/commander
Expand Down
7 changes: 3 additions & 4 deletions code/modules/clothing/gloves/miscellaneous.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
icon_state = "black"
item_state = "swat_gl"
siemens_coefficient = 0.6
permeability_coefficient = 0.05


flags_cold_protection = BODY_FLAG_HANDS
min_cold_protection_temperature = GLOVES_MIN_COLD_PROT
Expand All @@ -34,7 +34,7 @@
icon_state = "black"
item_state = "swat_gl"
siemens_coefficient = 0
permeability_coefficient = 0.05

flags_cold_protection = BODY_FLAG_HANDS
min_cold_protection_temperature = GLOVES_MIN_COLD_PROT
flags_heat_protection = BODY_FLAG_HANDS
Expand All @@ -46,14 +46,13 @@
icon_state = "latex"
item_state = "lgloves"
siemens_coefficient = 0.30
permeability_coefficient = 0.35
armor_bio = CLOTHING_ARMOR_LOW

/obj/item/clothing/gloves/botanic_leather
desc = "These leather gloves protect against thorns, barbs, prickles, spikes and other harmful objects of floral origin."
name = "botanist's leather gloves"
icon_state = "leather"
item_state = "ggloves"
permeability_coefficient = 0.9
siemens_coefficient = 0.9


Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/head/hardhat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
hardhat_color = "red"
name = "firefighter helmet"
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.01

flags_inventory = NOPRESSUREDMAGE|BLOCKSHARPOBJ|COVERMOUTH|ALLOWINTERNALS|COVEREYES|BLOCKGASEFFECT|ALLOWREBREATH|ALLOWCPR
flags_heat_protection = BODY_FLAG_HEAD|BODY_FLAG_FACE|BODY_FLAG_EYES
flags_cold_protection = BODY_FLAG_HEAD|BODY_FLAG_FACE|BODY_FLAG_EYES
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/head/helmet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@ GLOBAL_LIST_INIT(allowed_helmet_items, list(
armor_rad = CLOTHING_ARMOR_HIGHPLUS
force = 0 //"The M3 MOPP mask would be a normal weapon if you were to hit someone with it."
throwforce = 0
flags_inventory = BLOCKSHARPOBJ
flags_inventory = BLOCKSHARPOBJ|BLOCKGASEFFECT
flags_marine_helmet = NO_FLAGS
flags_atom = NO_SNOW_TYPE|NO_NAME_OVERRIDE
flags_inv_hide = HIDEEARS|HIDEALLHAIR
Expand Down
1 change: 0 additions & 1 deletion code/modules/clothing/head/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
name = "plague doctor's hat"
desc = "These were once used by Plague doctors. They're pretty much useless."
icon_state = "plaguedoctor"
permeability_coefficient = 0.01
siemens_coefficient = 0.9
flags_armor_protection = 0

Expand Down
5 changes: 2 additions & 3 deletions code/modules/clothing/masks/breath.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
flags_armor_protection = 0
w_class = SIZE_SMALL
gas_transfer_coefficient = 0.10
permeability_coefficient = 0.50

var/hanging = 0

Expand Down Expand Up @@ -37,7 +36,7 @@
name = "medical mask"
icon_state = "medical"
item_state = "medical"
permeability_coefficient = 0.01




Expand Down Expand Up @@ -235,4 +234,4 @@
flags_armor_protection = 0
w_class = SIZE_SMALL
gas_transfer_coefficient = 0.10
permeability_coefficient = 0.50

1 change: 0 additions & 1 deletion code/modules/clothing/masks/gasmask.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
w_class = SIZE_SMALL
item_state = "gas_alt"
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.9
armor_melee = CLOTHING_ARMOR_NONE
armor_bullet = CLOTHING_ARMOR_NONE
armor_laser = CLOTHING_ARMOR_NONE
Expand Down
3 changes: 1 addition & 2 deletions code/modules/clothing/masks/miscellaneous.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
flags_inventory = COVERMOUTH
flags_armor_protection = 0
gas_transfer_coefficient = 0.90
permeability_coefficient = 0.3
armor_melee = CLOTHING_ARMOR_NONE
armor_bullet = CLOTHING_ARMOR_NONE
armor_laser = CLOTHING_ARMOR_NONE
armor_energy = CLOTHING_ARMOR_NONE
armor_bomb = CLOTHING_ARMOR_NONE
armor_bio = CLOTHING_ARMOR_NONE
armor_bio = CLOTHING_ARMOR_LOW
armor_rad = CLOTHING_ARMOR_NONE
armor_internaldamage = CLOTHING_ARMOR_NONE

Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/shoes/colour.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
/obj/item/clothing/shoes/white
name = "white shoes"
icon_state = "white"
permeability_coefficient = 0.01


/obj/item/clothing/shoes/leather
name = "leather shoes"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/shoes/marine_shoes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
/obj/item/clothing/shoes/veteran/pmc/commando
name = "\improper PMC commando boots"
desc = "A pair of heavily armored, acid-resistant boots."
permeability_coefficient = 0.01

armor_bio = CLOTHING_ARMOR_HIGH
siemens_coefficient = 0.2
unacidable = TRUE
Expand Down
Loading

0 comments on commit 8900922

Please sign in to comment.