[Goonchem] Acid Rework

This commit is contained in:
Fox-McCloud
2015-04-08 06:42:47 -04:00
parent d514b79fc2
commit 44d8e4beb8
2 changed files with 46 additions and 97 deletions
+20 -46
View File
@@ -716,61 +716,35 @@ datum
reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
if(!istype(M, /mob/living))
return
if(method == TOUCH)
if(method == TOUCH || method == INGEST)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.wear_mask)
if(!H.wear_mask.unacidable)
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
if(volume > 25)
if(H.head)
if(prob(15) && !H.head.unacidable)
del(H.head)
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
if(method == TOUCH)
if(H.wear_mask)
H << "\red Your mask protects you from the acid!"
return
else if(ismonkey(M))
var/mob/living/carbon/monkey/MK = M
if(MK.wear_mask)
if(!MK.wear_mask.unacidable)
del (MK.wear_mask)
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
if(H.head)
H << "\red Your helmet protects you from the acid!"
return
if(!M.unacidable)
if(prob(15) && istype(M, /mob/living/carbon/human) && volume >= 30)
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ("head")
if(affecting)
if(affecting.take_damage(25, 0))
H.UpdateDamageIcon()
H.status_flags |= DISFIGURED
H.emote("scream")
if(!M.unacidable)
if(prob(75))
var/obj/item/organ/external/affecting = H.get_organ("head")
if(affecting)
affecting.take_damage(20, 0)
H.UpdateDamageIcon()
H.emote("scream")
else
M.take_organ_damage(15,0)
else
M.take_organ_damage(min(15, volume * 2)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl
else
if(!M.unacidable)
M.take_organ_damage(min(15, volume * 2))
M.take_organ_damage(15,0)
reaction_obj(var/obj/O, var/volume)
if(istype(O,/obj/item/weapon/organ/head))
new/obj/item/weapon/skeleton/head(O.loc)
for(var/mob/M in viewers(5, O))
M << "\red \the [O] melts."
del(O)
if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)) && prob(10))
if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)) && prob(40))
if(!O.unacidable)
var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc)
I.desc = "Looks like this was \an [O] some time ago."
+26 -51
View File
@@ -227,65 +227,39 @@ datum/reagent/facid
datum/reagent/facid/reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
if(!istype(M, /mob/living))
return //wooo more runtime fixin
if(method == TOUCH)
if(method == TOUCH || method == INGEST)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.wear_mask)
if(!H.wear_mask.unacidable)
qdel (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
if(volume > 10)
if(H.head)
if(prob(15) && !H.head.unacidable)
qdel(H.head)
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
if(method == TOUCH)
if(H.wear_mask)
if(!H.wear_mask.unacidable)
qdel (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
if(!H.unacidable)
var/obj/item/organ/external/affecting = H.get_organ("head")
if(affecting.take_damage(15, 0))
if(H.head)
if(!H.head.unacidable)
qdel(H.head)
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
if(!H.unacidable)
var/obj/item/organ/external/affecting = H.get_organ("head")
affecting.take_damage(75, 0)
H.UpdateDamageIcon()
H.emote("scream")
else if(ismonkey(M))
var/mob/living/carbon/monkey/MK = M
if(MK.wear_mask)
if(!MK.wear_mask.unacidable)
qdel (MK.wear_mask)
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
if(!MK.unacidable)
MK.take_organ_damage(min(15, volume * 4)) // same deal as sulphuric acid
else
if(!M.unacidable)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ("head")
if(affecting.take_damage(15, 0))
H.UpdateDamageIcon()
H.emote("scream")
H.status_flags |= DISFIGURED
else
M.take_organ_damage(min(15, volume * 4))
H.emote("scream")
H.status_flags |= DISFIGURED
datum/reagent/facid/reaction_obj(var/obj/O, var/volume)
if(istype(O,/obj/item/weapon/organ/head))
new/obj/item/weapon/skeleton/head(O.loc)
for(var/mob/M in viewers(5, O))
M << "\red \the [O] melts."
qdel(O)
if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)))
if(!O.unacidable)
var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc)
@@ -293,6 +267,7 @@ datum/reagent/facid/reaction_obj(var/obj/O, var/volume)
for(var/mob/M in viewers(5, O))
M << "\red \the [O] melts."
qdel(O)
/datum/chemical_reaction/facid
name = "Fluorosulfuric Acid"
id = "facid"