Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: SabreML <[email protected]>
  • Loading branch information
realforest2001 and SabreML authored Apr 3, 2024
1 parent 2f4be22 commit 621c666
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@
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)
target_mob.contract_disease(virus, FALSE, TRUE, CONTACT_HANDS)

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

target_mob.next_move += 7 //Adds some lag to the 'attack'. Adds up to 11 in combination with click_adjacent.
return
Expand All @@ -186,24 +186,17 @@
return TRUE

/mob/living/carbon/human/can_pass_disease()
/// Multiplier for checked pieces.
// Multiplier for checked pieces.
var/mult = 0
/// Total amount of bio protection
// Total amount of bio protection
var/total_prot = 0
/// Super bio armor
// 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
var/list/worn_clothes = list(head, wear_suit, hands, glasses, w_uniform, shoes, wear_mask)

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

0 comments on commit 621c666

Please sign in to comment.