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 Mar 15, 2024
2 parents 62bcf08 + 802e540 commit e6d972f
Show file tree
Hide file tree
Showing 15 changed files with 99 additions and 99 deletions.
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(var/mob/living/carbon/victim in oview(check_range, source))
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)

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/head/helmet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,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
45 changes: 14 additions & 31 deletions code/modules/clothing/suits/bio.dm
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
//Biosuit complete with shoes (in the item sprite)
//Standard biosuit, orange stripe

/obj/item/clothing/head/bio_hood
name = "bio hood"
icon_state = "bio"
icon_state = "bio_general"
desc = "A hood that protects the head and face from biological contaminants."
permeability_coefficient = 0.2
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_ULTRAHIGH
armor_bio = CLOTHING_ARMOR_HARDCORE
armor_rad = CLOTHING_ARMOR_MEDIUM
armor_internaldamage = CLOTHING_ARMOR_LOW
flags_inventory = COVEREYES|COVERMOUTH
flags_inventory = COVEREYES|COVERMOUTH|BLOCKGASEFFECT
flags_inv_hide = HIDEFACE|HIDEMASK|HIDEEARS|HIDEALLHAIR
flags_armor_protection = BODY_FLAG_HEAD|BODY_FLAG_FACE|BODY_FLAG_EYES
siemens_coefficient = 0.9
Expand All @@ -26,7 +28,7 @@
/obj/item/clothing/suit/bio_suit
name = "bio suit"
desc = "A suit that protects against biological contamination."
icon_state = "bio"
icon_state = "bio_general"
item_state = "bio_suit"
w_class = SIZE_LARGE//bulky item
gas_transfer_coefficient = 0.01
Expand All @@ -47,7 +49,7 @@
/obj/item/clothing/suit/storage/synthbio
name = "bio suit"
desc = "Synthetic compliant bio-hazard suit. Intended to allow a synthetic to offer the illusion of infection control to humans. Has had most of the internal protective lining removed, allowing it to hold equipment and be lighter to move in."
icon_state = "bio"
icon_state = "bio_general"
item_state = "bio_suit"
allowed = list(
/obj/item/weapon/baton,
Expand All @@ -65,13 +67,13 @@
/obj/item/device/motiondetector,
)

//Standard biosuit, orange stripe
/obj/item/clothing/head/bio_hood/general
icon_state = "bio_general"
//Medical biosuit, blue wrist bands
/obj/item/clothing/head/bio_hood/medical
icon_state = "bio_med"
flags_armor_protection = BODY_FLAG_HEAD|BODY_FLAG_FACE|BODY_FLAG_EYES

/obj/item/clothing/suit/bio_suit/general
icon_state = "bio_general"
/obj/item/clothing/suit/bio_suit/medical
icon_state = "bio_med"
flags_armor_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS|BODY_FLAG_ARMS|BODY_FLAG_HANDS|BODY_FLAG_FEET
flags_inv_hide = HIDEGLOVES|HIDEJUMPSUIT|HIDETAIL

Expand All @@ -84,7 +86,7 @@
flags_armor_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS|BODY_FLAG_ARMS
flags_inv_hide = HIDEGLOVES|HIDEJUMPSUIT|HIDETAIL

//Security biosuit, grey with red stripe across the chest
//Security biosuit, red wrist bands
/obj/item/clothing/head/bio_hood/security
icon_state = "bio_security"

Expand All @@ -93,17 +95,7 @@
flags_armor_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS|BODY_FLAG_ARMS
flags_inv_hide = HIDEGLOVES|HIDEJUMPSUIT|HIDETAIL

//Janitor's biosuit, grey with purple arms
/obj/item/clothing/head/bio_hood/janitor
icon_state = "bio_janitor"

/obj/item/clothing/suit/bio_suit/janitor
icon_state = "bio_janitor"
flags_armor_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS|BODY_FLAG_ARMS
flags_inv_hide = HIDEGLOVES|HIDEJUMPSUIT|HIDETAIL


//Scientist's biosuit, white with a pink-ish hue
//Scientist's biosuit, purple wrist bands
/obj/item/clothing/head/bio_hood/scientist
icon_state = "bio_scientist"

Expand All @@ -112,15 +104,6 @@
flags_armor_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS|BODY_FLAG_ARMS
flags_inv_hide = HIDEGLOVES|HIDEJUMPSUIT|HIDETAIL

//CMO's biosuit, blue stripe
/obj/item/clothing/suit/bio_suit/cmo
icon_state = "bio_cmo"
flags_armor_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS|BODY_FLAG_ARMS
flags_inv_hide = HIDEGLOVES|HIDEJUMPSUIT|HIDETAIL

/obj/item/clothing/head/bio_hood/cmo
icon_state = "bio_cmo"


//Plague Dr mask can be found in clothing/masks/gasmask.dm
/obj/item/clothing/suit/bio_suit/plaguedoctorsuit
Expand Down
4 changes: 2 additions & 2 deletions code/modules/gear_presets/synths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,14 @@
/datum/equipment_preset/synth/survivor/scientist_synth
name = "Survivor - Synthetic - Scientist Synth"
equipment_to_spawn = list(
WEAR_HEAD = /obj/item/clothing/head/bio_hood,
WEAR_HEAD = /obj/item/clothing/head/bio_hood/synth,
WEAR_FACE = /obj/item/clothing/mask/surgical,
WEAR_EYES = /obj/item/clothing/glasses/hud/health,
WEAR_BODY = /obj/item/clothing/under/rank/scientist,
WEAR_BACK = /obj/item/storage/backpack/satchel/chem,
WEAR_IN_BACK = /obj/item/reagent_container/glass/beaker/vial/random/good,
WEAR_IN_BACK = /obj/item/paper/research_notes/good,
WEAR_JACKET = /obj/item/clothing/suit/bio_suit,
WEAR_JACKET = /obj/item/clothing/suit/storage/synthbio,
WEAR_WAIST = /obj/item/storage/belt/medical/lifesaver/full,
WEAR_HANDS = /obj/item/clothing/gloves/black,
WEAR_R_HAND = /obj/item/device/motiondetector,
Expand Down
64 changes: 50 additions & 14 deletions code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -156,30 +156,66 @@

. = ..()

/mob/living/carbon/attack_hand(mob/M as mob)
if(!istype(M, /mob/living/carbon)) return
/mob/living/carbon/attack_hand(mob/target_mob as mob)
if(!istype(target_mob, /mob/living/carbon)) return

if(M.mob_flags & SURGERY_MODE_ON && M.a_intent & (INTENT_HELP|INTENT_DISARM))
var/datum/surgery/current_surgery = active_surgeries[M.zone_selected]
if(target_mob.mob_flags & SURGERY_MODE_ON && target_mob.a_intent & (INTENT_HELP|INTENT_DISARM))
var/datum/surgery/current_surgery = active_surgeries[target_mob.zone_selected]
if(current_surgery)
if(current_surgery.attempt_next_step(M, null))
if(current_surgery.attempt_next_step(target_mob, null))
return TRUE
else
var/obj/limb/affecting = get_limb(check_zone(M.zone_selected))
if(affecting && initiate_surgery_moment(null, src, affecting, M))
var/obj/limb/affecting = get_limb(check_zone(target_mob.zone_selected))
if(affecting && initiate_surgery_moment(null, src, affecting, target_mob))
return TRUE

for(var/datum/disease/D in viruses)
if(D.spread_by_touch())
M.contract_disease(D, 0, 1, CONTACT_HANDS)
if(can_pass_disease() && target_mob.can_pass_disease())
for(var/datum/disease/virus in viruses)
if(virus.spread_by_touch())
target_mob.contract_disease(virus, 0, 1, CONTACT_HANDS)

for(var/datum/disease/D in M.viruses)
if(D.spread_by_touch())
contract_disease(D, 0, 1, CONTACT_HANDS)
for(var/datum/disease/virus in target_mob.viruses)
if(virus.spread_by_touch())
contract_disease(virus, 0, 1, CONTACT_HANDS)

M.next_move += 7 //Adds some lag to the 'attack'. Adds up to 11 in combination with click_adjacent.
target_mob.next_move += 7 //Adds some lag to the 'attack'. Adds up to 11 in combination with click_adjacent.
return

/// Whether or not a mob can pass diseases to another, or receive said diseases.
/mob/proc/can_pass_disease()
return TRUE

/mob/living/carbon/human/can_pass_disease()
/// Multiplier for checked pieces.
var/mult = 0
/// Total amount of bio protection
var/total_prot = 0
/// Super bio armor
var/bio_hardcore = 0

var/list/worn_clothes = list()
worn_clothes += head
worn_clothes += wear_suit
worn_clothes += hands
worn_clothes += glasses
worn_clothes += w_uniform
worn_clothes += shoes
worn_clothes += wear_mask

for(var/obj/item/clothing/worn_item in worn_clothes)
total_prot = (total_prot + worn_item.armor_bio)
mult++
if(worn_item.armor_bio == CLOTHING_ARMOR_HARDCORE)
bio_hardcore++

if(bio_hardcore >= 2)
return FALSE

var/perc = (total_prot / mult)
if(!prob(perc))
return TRUE
return FALSE

/mob/living/carbon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1.0, def_zone = null)
if(status_flags & GODMODE) //godmode
return FALSE
Expand Down
Binary file modified icons/mob/humans/onmob/head_0.dmi
Binary file not shown.
Binary file modified icons/mob/humans/onmob/suit_0.dmi
Binary file not shown.
Binary file modified icons/obj/items/clothing/hats.dmi
Binary file not shown.
Binary file modified icons/obj/items/clothing/suits.dmi
Binary file not shown.
Binary file modified icons/obj/structures/closet.dmi
Binary file not shown.
2 changes: 1 addition & 1 deletion maps/map_files/BigRed/BigRed.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -13123,7 +13123,7 @@
},
/area/bigredv2/outside/virology)
"aNa" = (
/obj/structure/closet/l3closet/general,
/obj/structure/closet/l3closet/virology,
/turf/open/floor{
icon_state = "white"
},
Expand Down
8 changes: 4 additions & 4 deletions maps/map_files/CORSAT/Corsat.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -31121,7 +31121,7 @@
},
/area/corsat/omega/maint)
"bLD" = (
/obj/structure/closet/l3closet/janitor,
/obj/structure/closet/l3closet,
/turf/open/floor/corsat{
dir = 5;
icon_state = "yellow"
Expand Down Expand Up @@ -35244,7 +35244,7 @@
/turf/open/floor/corsat,
/area/corsat/inaccessible)
"bYU" = (
/obj/structure/closet/l3closet/general,
/obj/structure/closet/l3closet,
/turf/open/floor/corsat{
icon_state = "yellow"
},
Expand Down Expand Up @@ -39429,7 +39429,7 @@
/turf/open/gm/dirtgrassborder/north,
/area/corsat/theta/biodome)
"ePL" = (
/obj/structure/closet/l3closet/general,
/obj/structure/closet/l3closet,
/turf/open/floor/corsat{
icon_state = "plate"
},
Expand Down Expand Up @@ -58094,7 +58094,7 @@
},
/area/corsat/gamma/hangar/flightcontrol)
"sFD" = (
/obj/structure/closet/l3closet/general,
/obj/structure/closet/l3closet,
/obj/structure/machinery/light,
/turf/open/floor/corsat{
icon_state = "plate"
Expand Down
11 changes: 3 additions & 8 deletions maps/map_files/FOP_v3_Sciannex/Fiorina_SciAnnex.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -13504,9 +13504,8 @@
/area/fiorina/station/botany)
"igQ" = (
/obj/structure/closet/cabinet,
/obj/item/clothing/under/rank/janitor,
/obj/item/clothing/suit/bio_suit/janitor,
/obj/item/clothing/head/bio_hood/janitor,
/obj/item/clothing/suit/bio_suit,
/obj/item/clothing/head/bio_hood,
/turf/open/floor/wood,
/area/fiorina/station/civres_blue)
"igV" = (
Expand Down Expand Up @@ -14854,7 +14853,7 @@
},
/area/fiorina/station/civres_blue)
"iXV" = (
/obj/structure/closet/l3closet/general,
/obj/structure/closet/l3closet,
/turf/open/floor/prison,
/area/fiorina/tumor/aux_engi)
"iYa" = (
Expand Down Expand Up @@ -30983,10 +30982,6 @@
/area/fiorina/tumor/civres)
"sQr" = (
/obj/structure/janitorialcart,
/obj/item/clothing/head/bio_hood/janitor{
pixel_x = -4;
pixel_y = 5
},
/turf/open/floor/prison,
/area/fiorina/station/disco)
"sQy" = (
Expand Down
Loading

0 comments on commit e6d972f

Please sign in to comment.