Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Biosuit Updates #5925

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8b6488b
Department suit updates
realforest2001 Mar 11, 2024
5f8e483
disease passing
realforest2001 Mar 11, 2024
27e2d48
map fixes
realforest2001 Mar 11, 2024
f3f4d6f
gas proofing
realforest2001 Mar 11, 2024
c9ee558
medical locker & bio hood
realforest2001 Mar 15, 2024
35b746d
Merge remote-tracking branch 'cmss13-devs/master' into forest/biosuits
realforest2001 Mar 15, 2024
802e540
icon conflict
realforest2001 Mar 15, 2024
bf9853d
closet icons
realforest2001 Mar 15, 2024
2f4be22
stop div 0
realforest2001 Mar 27, 2024
621c666
Apply suggestions from code review
realforest2001 Apr 3, 2024
7250a67
Merge remote-tracking branch 'cmss13-devs/master' into forest/biosuits
realforest2001 Apr 24, 2024
c1efbd3
Merge remote-tracking branch 'cmss13-devs/master' into forest/biosuits
realforest2001 Sep 2, 2024
7a92ff5
Merge branch 'master' into forest/biosuits
realforest2001 Sep 7, 2024
f1a51ae
removes dupe proc and permeability_coefficient
realforest2001 Sep 7, 2024
6b375ad
map reset
realforest2001 Sep 7, 2024
4ecf67f
I hate mapping conflicts
realforest2001 Sep 7, 2024
a0b05e4
WHY WON'T YOU WORK
realforest2001 Sep 7, 2024
300daff
GOOD BYE MAPS
realforest2001 Sep 7, 2024
3fc4a5d
MAYBE THIS WILL WORK?
realforest2001 Sep 7, 2024
2cfbef1
Locker changes
realforest2001 Sep 7, 2024
68d8da2
Merge remote-tracking branch 'cmss13-devs/master' into forest/biosuits
realforest2001 Sep 7, 2024
defe54c
jannies
realforest2001 Sep 7, 2024
875b8f7
Merge branch 'master' into forest/biosuits
realforest2001 Oct 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/medical
icon_state = "bio"
icon_closed = "bio"
icon_opened = "bioopen"

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

/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
41 changes: 12 additions & 29 deletions code/modules/clothing/suits/bio.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
//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
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)
realforest2001 marked this conversation as resolved.
Show resolved Hide resolved

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)
realforest2001 marked this conversation as resolved.
Show resolved Hide resolved

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()
realforest2001 marked this conversation as resolved.
Show resolved Hide resolved
realforest2001 marked this conversation as resolved.
Show resolved Hide resolved
/// Multiplier for checked pieces.
var/mult = 0
/// Total amount of bio protection
var/total_prot = 0
/// Super bio armor
var/bio_hardcore = 0
realforest2001 marked this conversation as resolved.
Show resolved Hide resolved

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)
realforest2001 marked this conversation as resolved.
Show resolved Hide resolved
total_prot = (total_prot + worn_item.armor_bio)
realforest2001 marked this conversation as resolved.
Show resolved Hide resolved
mult++
if(worn_item.armor_bio == CLOTHING_ARMOR_HARDCORE)
bio_hardcore++

if(bio_hardcore >= 2)
return FALSE

var/perc = (total_prot / mult)
realforest2001 marked this conversation as resolved.
Show resolved Hide resolved
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.
8 changes: 4 additions & 4 deletions maps/map_files/BigRed/BigRed.dmm
Nanu308 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6312,7 +6312,7 @@
/turf/open/floor/plating,
/area/bigredv2/outside/admin_building)
"asU" = (
/obj/structure/closet/l3closet,
/obj/structure/closet/l3closet/general,
/obj/effect/decal/cleanable/dirt,
/turf/open/floor{
dir = 8;
Expand All @@ -6328,7 +6328,7 @@
},
/area/bigredv2/outside/general_offices)
"asW" = (
/obj/structure/closet/l3closet,
/obj/structure/closet/l3closet/general,
/turf/open/floor{
dir = 8;
icon_state = "vault"
Expand Down Expand Up @@ -13256,7 +13256,7 @@
},
/area/bigredv2/outside/virology)
"aNa" = (
/obj/structure/closet/l3closet/general,
/obj/structure/closet/l3closet/virology,
/turf/open/floor{
icon_state = "white"
},
Expand Down Expand Up @@ -35075,7 +35075,7 @@
},
/area/bigredv2/caves_virology)
"oDB" = (
/obj/structure/closet/l3closet,
/obj/structure/closet/l3closet/general,
/obj/effect/landmark/objective_landmark/close,
/turf/open/floor{
dir = 8;
Expand Down
2 changes: 1 addition & 1 deletion maps/map_files/BigRed/standalone/crashlanding-eva.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@
},
/area/bigredv2/outside/general_offices)
"ch" = (
/obj/structure/closet/l3closet,
/obj/structure/closet/l3closet/general,
/turf/open/floor{
icon_state = "platingdmg1"
},
Expand Down
2 changes: 1 addition & 1 deletion 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/general,
/turf/open/floor/corsat{
dir = 5;
icon_state = "yellow"
Expand Down
2 changes: 1 addition & 1 deletion maps/map_files/FOP_v2_Cellblocks/Prison_Station_FOP.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
},
/area/prison/research/secret/testing)
"aav" = (
/obj/structure/closet/l3closet,
/obj/structure/closet/l3closet/general,
/obj/structure/machinery/light{
dir = 1
},
Expand Down
5 changes: 2 additions & 3 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/general,
/obj/item/clothing/head/bio_hood/general,
/turf/open/floor/wood,
/area/fiorina/station/civres_blue)
"igV" = (
Expand Down
6 changes: 3 additions & 3 deletions maps/map_files/USS_Almayer/USS_Almayer.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -17010,7 +17010,7 @@
},
/area/almayer/shipboard/port_point_defense)
"bVe" = (
/obj/structure/closet/l3closet/general,
/obj/structure/closet/l3closet/scientist,
/obj/structure/window/reinforced{
dir = 8;
health = 80
Expand Down Expand Up @@ -44926,7 +44926,7 @@
/turf/open/floor/plating/plating_catwalk,
/area/almayer/maint/hull/upper/u_a_s)
"lmw" = (
/obj/structure/closet/l3closet/general,
/obj/structure/closet/l3closet/scientist,
/obj/structure/machinery/light{
dir = 8
},
Expand Down Expand Up @@ -51464,7 +51464,7 @@
/turf/open/floor/almayer,
/area/almayer/hallways/lower/starboard_umbilical)
"nDo" = (
/obj/structure/closet/l3closet/general,
/obj/structure/closet/l3closet/scientist,
/obj/structure/window/reinforced{
dir = 8;
health = 80
Expand Down
Loading