Masks and helmets with the Unacidable tag will now protect from acid when worn. Thanks to Zelacks for the patch!

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4805 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
d_h2005@yahoo.com
2012-10-04 04:15:05 +00:00
parent d20ec0696a
commit 6aebb2b035

View File

@@ -635,25 +635,38 @@ datum
if(!istype(M, /mob/living)) if(!istype(M, /mob/living))
return return
if(method == TOUCH) if(method == TOUCH)
if(istype(M, /mob/living/carbon/human)) if(ishuman(M))
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
if(H.wear_mask) if(H.wear_mask)
del (H.wear_mask) if(!H.wear_mask.unacidable)
H.update_inv_wear_mask() del (H.wear_mask)
H << "\red Your mask melts away but protects you from the acid!" H.update_inv_wear_mask()
H << "\red Your mask melts away but protects you from the acid!"
else
H << "\red Your mask protects you from the acid!"
return return
if(H.head) if(H.head)
del (H.head) if(prob(15) && !H.head.unacidable)
H.update_inv_head() del(H.head)
H << "\red Your helmet melts into uselessness but protects you from the acid!" H.update_inv_head()
H << "\red Your helmet melts away but protects you from the acid"
else
H << "\red Your helmet protects you from the acid!"
return return
else if(istype(M, /mob/living/carbon/monkey))
else if(ismonkey(M))
var/mob/living/carbon/monkey/MK = M var/mob/living/carbon/monkey/MK = M
if(MK.wear_mask) if(MK.wear_mask)
del (MK.wear_mask) if(!MK.wear_mask.unacidable)
MK.update_inv_wear_mask() del (MK.wear_mask)
MK << "\red Your mask melts away but protects you from the acid!" MK.update_inv_wear_mask()
MK << "\red Your mask melts away but protects you from the acid!"
else
MK << "\red Your mask protects you from the acid!"
return return
if(!M.unacidable) if(!M.unacidable)
if(prob(15) && istype(M, /mob/living/carbon/human) && volume >= 30) if(prob(15) && istype(M, /mob/living/carbon/human) && volume >= 30)
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
@@ -697,15 +710,21 @@ datum
if(method == TOUCH) if(method == TOUCH)
if(ishuman(M)) if(ishuman(M))
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
if(H.wear_mask) if(H.wear_mask)
del (H.wear_mask) if(!H.wear_mask.unacidable)
H << "\red Your mask melts away!" del (H.wear_mask)
H.update_inv_wear_mask()
H << "\red Your mask melts away but protects you from the acid!"
else
H << "\red Your mask protects you from the acid!"
return return
if(H.head) if(H.head)
if(prob(15)) if(prob(15) && !H.head.unacidable)
del(H.head) del(H.head)
H.update_inv_head() H.update_inv_head()
H << "\red Your helmet melts from the acid!" H << "\red Your helmet melts away but protects you from the acid"
else else
H << "\red Your helmet protects you from the acid!" H << "\red Your helmet protects you from the acid!"
return return
@@ -715,16 +734,20 @@ datum
if(affecting.take_damage(15, 0)) if(affecting.take_damage(15, 0))
H.UpdateDamageIcon() H.UpdateDamageIcon()
H.emote("scream") H.emote("scream")
else else if(ismonkey(M))
if(ismonkey(M)) var/mob/living/carbon/monkey/MK = M
var/mob/living/carbon/monkey/MK = M
if(MK.wear_mask) if(MK.wear_mask)
if(!MK.wear_mask.unacidable)
del (MK.wear_mask) del (MK.wear_mask)
MK.update_inv_wear_mask() MK.update_inv_wear_mask()
MK << "\red Your mask melts away but protects you from the acid!" MK << "\red Your mask melts away but protects you from the acid!"
return else
if(!MK.unacidable) MK << "\red Your mask protects you from the acid!"
MK.take_organ_damage(min(15, volume * 4)) // same deal as sulphuric acid return
if(!MK.unacidable)
MK.take_organ_damage(min(15, volume * 4)) // same deal as sulphuric acid
else else
if(!M.unacidable) if(!M.unacidable)
if(ishuman(M)) if(ishuman(M))