Contaminated items now respect gloves

This commit is contained in:
Anewbe
2017-11-28 23:56:13 -06:00
parent ff14ac236f
commit 37101b9b39
5 changed files with 45 additions and 18 deletions

View File

@@ -76,7 +76,8 @@ obj/var/phoronproof = 0
suit_contamination()
if(!pl_head_protected())
if(prob(1)) suit_contamination() //Phoron can sometimes get through such an open suit.
if(prob(1))
suit_contamination() //Phoron can sometimes get through such an open suit.
//Cannot wash backpacks currently.
// if(istype(back,/obj/item/weapon/storage/backpack))
@@ -88,7 +89,8 @@ obj/var/phoronproof = 0
//Handles all the bad things phoron can do.
//Contamination
if(vsc.plc.CLOTH_CONTAMINATION) contaminate()
if(vsc.plc.CLOTH_CONTAMINATION)
contaminate()
//Anything else requires them to not be dead.
if(stat >= 2)
@@ -139,22 +141,22 @@ obj/var/phoronproof = 0
Blind(20)
/mob/living/carbon/human/proc/pl_head_protected()
//Checks if the head is adequately sealed.
//Checks if the head is adequately sealed. //This is just odd. TODO: Make this respect the body_parts_covered stuff like thermal gear does.
if(head)
if(vsc.plc.PHORONGUARD_ONLY)
if(head.flags & PHORONGUARD)
if(head.flags & PHORONGUARD || head.phoronproof)
return 1
else if(head.body_parts_covered & EYES)
return 1
return 0
/mob/living/carbon/human/proc/pl_suit_protected()
//Checks if the suit is adequately sealed.
//Checks if the suit is adequately sealed. //This is just odd. TODO: Make this respect the body_parts_covered stuff like thermal gear does.
var/coverage = 0
for(var/obj/item/protection in list(wear_suit, gloves, shoes))
for(var/obj/item/protection in list(wear_suit, gloves, shoes)) //This is why it's odd. If I'm in a full suit, but my shoes and gloves aren't phoron proof, damage.
if(!protection)
continue
if(vsc.plc.PHORONGUARD_ONLY && !(protection.flags & PHORONGUARD))
if(vsc.plc.PHORONGUARD_ONLY && !(protection.flags & PHORONGUARD) && !protection.phoronproof)
return 0
coverage |= protection.body_parts_covered
@@ -165,9 +167,12 @@ obj/var/phoronproof = 0
/mob/living/carbon/human/proc/suit_contamination()
//Runs over the things that can be contaminated and does so.
if(w_uniform) w_uniform.contaminate()
if(shoes) shoes.contaminate()
if(gloves) gloves.contaminate()
if(w_uniform)
w_uniform.contaminate()
if(shoes)
shoes.contaminate()
if(gloves)
gloves.contaminate()
turf/Entered(obj/item/I)

View File

@@ -16,6 +16,7 @@
siemens_coefficient = 0.9
species_restricted = list("exclude","Diona")
preserve_item = 1
phoronproof = 1
var/obj/machinery/camera/camera
var/list/camera_networks
@@ -61,6 +62,7 @@
siemens_coefficient = 0.9
species_restricted = list("exclude","Diona")
preserve_item = 1
phoronproof = 1
var/list/supporting_limbs //If not-null, automatically splints breaks. Checked when removing the suit.

View File

@@ -8,6 +8,8 @@
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|BLOCKHAIR
body_parts_covered = HEAD|FACE|EYES
siemens_coefficient = 0.9
item_flags = THICKMATERIAL
phoronproof = 1
/obj/item/clothing/suit/bio_suit
name = "bio suit"
@@ -16,12 +18,14 @@
w_class = ITEMSIZE_LARGE//bulky item
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.01
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS|HANDS|FEET
slowdown = 1.0
allowed = list(/obj/item/weapon/tank/emergency/oxygen,/obj/item/weapon/pen,/obj/item/device/flashlight/pen)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL|HIDETIE|HIDEHOLSTER
siemens_coefficient = 0.9
item_flags = THICKMATERIAL
phoronproof = 1
//Standard biosuit, orange stripe
/obj/item/clothing/head/bio_hood/general

View File

@@ -95,4 +95,4 @@
slowdown = 1.5
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 100)
flags_inv = HIDEJUMPSUIT|HIDETAIL|HIDETIE|HIDEHOLSTER
item_flags = THICKMATERIAL
item_flags = THICKMATERIAL

View File

@@ -816,18 +816,34 @@
if(!isSynthetic())
if(touching) touching.metabolize()
if(ingested) ingested.metabolize()
if(bloodstr) bloodstr.metabolize()
if(touching)
touching.metabolize()
if(ingested)
ingested.metabolize()
if(bloodstr)
bloodstr.metabolize()
var/total_phoronloss = 0
for(var/obj/item/I in src)
if(I.contaminated)
if(src.species && src.species.get_bodytype() != "Vox")
total_phoronloss += vsc.plc.CONTAMINATION_LOSS
if(!(status_flags & GODMODE)) adjustToxLoss(total_phoronloss)
// This is hacky, I'm so sorry.
if(I != l_hand && I != r_hand) //If the item isn't in your hands, you're probably wearing it. Full damage for you.
total_phoronloss += vsc.plc.CONTAMINATION_LOSS
else if(I == l_hand) //If the item is in your hands, but you're wearing protection, you might be alright.
var/l_hand_blocked = 0
l_hand_blocked = 1-(100-getarmor(BP_L_HAND, "bio"))/100 //This should get a number between 0 and 1
total_phoronloss += vsc.plc.CONTAMINATION_LOSS * l_hand_blocked
else if(I == r_hand) //If the item is in your hands, but you're wearing protection, you might be alright.
var/r_hand_blocked = 0
r_hand_blocked = 1-(100-getarmor(BP_R_HAND, "bio"))/100 //This should get a number between 0 and 1
total_phoronloss += vsc.plc.CONTAMINATION_LOSS * r_hand_blocked
if(total_phoronloss)
if(!(status_flags & GODMODE))
adjustToxLoss(total_phoronloss)
if(status_flags & GODMODE) return 0 //godmode
if(status_flags & GODMODE)
return 0 //godmode
var/obj/item/organ/internal/diona/node/light_organ = locate() in internal_organs