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 1 commit
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
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
Loading