Merge pull request #5021 from Nerezza/Hardsuit-fixes

Misc rig fixes/tweaks
This commit is contained in:
Anewbe
2018-03-10 14:57:37 -06:00
committed by GitHub
4 changed files with 117 additions and 13 deletions
+3 -2
View File
@@ -318,14 +318,15 @@
/mob/living/carbon/human/get_breath_from_internal(volume_needed=BREATH_VOLUME)
if(internal)
//Because rigs store their tanks out of reach of contents.Find(), a check has to be made to make
//sure the rig is still worn, still online, and that its air supply still exists.
var/obj/item/weapon/tank/rig_supply
if(istype(back,/obj/item/weapon/rig))
var/obj/item/weapon/rig/rig = back
if(!rig.offline && (rig.air_supply && internal == rig.air_supply))
rig_supply = rig.air_supply
if (!rig_supply && (!contents.Find(internal) || !((wear_mask && (wear_mask.item_flags & AIRTIGHT)) || (head && (head.item_flags & AIRTIGHT)))))
if ((!rig_supply && !contents.Find(internal)) || !((wear_mask && (wear_mask.item_flags & AIRTIGHT)) || (head && (head.item_flags & AIRTIGHT))))
internal = null
if(internal)