Tweaks Foam and Pyrotechnics

This commit is contained in:
Fox McCloud
2019-04-04 05:06:39 -04:00
parent e5012a8b20
commit 282350fb71
7 changed files with 88 additions and 144 deletions
@@ -22,7 +22,7 @@
M.adjust_fire_stacks(mob_burning)
M.IgniteMob()
if(method == INGEST)
M.adjustFireLoss(min(max(15, volume * 3), 45))
M.adjustFireLoss(min(max(10, volume * 2), 45))
to_chat(M, "<span class='warning'>It burns!</span>")
M.emote("scream")
@@ -242,7 +242,7 @@
M.adjust_fire_stacks(10)
M.IgniteMob()
if(method == INGEST)
M.adjustFireLoss(min(max(30, volume * 6), 90))
M.adjustFireLoss(min(max(15, volume * 2.5), 90))
to_chat(M, "<span class='warning'>It burns!</span>")
M.emote("scream")
@@ -245,7 +245,7 @@
id = "sacid"
description = "A strong mineral acid with the molecular formula H2SO4."
reagent_state = LIQUID
color = "#00D72B"
color = "#00FF32"
process_flags = ORGANIC | SYNTHETIC
taste_message = "<span class='userdanger'>ACID</span>"
@@ -254,58 +254,34 @@
update_flags |= M.adjustFireLoss(1, FALSE)
return ..() | update_flags
/datum/reagent/sacid/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(isgrey(H))
return
/datum/reagent/sacid/reaction_mob(mob/living/M, method = TOUCH, volume)
if(ishuman(M) && !isgrey(M))
var/mob/living/carbon/human/H = M
if(method == TOUCH)
if(volume > 25)
if(H.wear_mask)
to_chat(H, "<span class='danger'>Your mask protects you from the acid!</span>")
to_chat(H, "<span class='danger'>Your [H.wear_mask] protects you from the acid!</span>")
return
if(H.head)
to_chat(H, "<span class='danger'>Your helmet protects you from the acid!</span>")
to_chat(H, "<span class='danger'>Your [H.wear_mask] protects you from the acid!</span>")
return
if(!M.unacidable)
if(prob(75))
var/obj/item/organ/external/affecting = H.get_organ("head")
if(affecting)
affecting.receive_damage(5, 10)
H.UpdateDamageIcon()
H.emote("scream")
else
M.take_organ_damage(5,10)
if(prob(75))
H.take_organ_damage(5, 10)
H.emote("scream")
var/obj/item/organ/external/affecting = H.get_organ("head")
if(affecting)
affecting.disfigure()
else
H.take_organ_damage(5, 10)
else
M.take_organ_damage(5,10)
if(method == INGEST)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(isgrey(H))
return
if(volume >=10 && volume <=25)
if(!H.unacidable)
M.take_organ_damage(0,min(max(volume-10,2)*2,20))
M.emote("scream")
if(volume > 25)
if(!M.unacidable)
if(prob(75))
var/obj/item/organ/external/affecting = H.get_organ("head")
if(affecting)
affecting.receive_damage(0, 20)
H.UpdateDamageIcon()
H.emote("scream")
else
M.take_organ_damage(0,20)
H.take_organ_damage(5, 10)
else
to_chat(H, "<span class='warning'>The greenish acidic substance stings[volume < 10 ? " you, but isn't concentrated enough to harm you" : null]!</span>")
if(volume >= 10)
H.adjustFireLoss(min(max(4, (volume - 10) * 2), 20))
H.emote("scream")
/datum/reagent/sacid/reaction_obj(obj/O, volume)
if((istype(O,/obj/item) || istype(O,/obj/structure/glowshroom)) && prob(40))
@@ -614,7 +590,7 @@
id = "facid"
description = "Fluorosulfuric acid is a an extremely corrosive super-acid."
reagent_state = LIQUID
color = "#4141D2"
color = "#5050FF"
process_flags = ORGANIC | SYNTHETIC
taste_message = "<span class='userdanger'>ACID</span>"
@@ -624,47 +600,39 @@
update_flags |= M.adjustFireLoss(1, FALSE)
return ..() | update_flags
/datum/reagent/facid/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH || method == INGEST)
if(ishuman(M))
var/mob/living/carbon/human/H = M
/datum/reagent/facid/reaction_mob(mob/living/M, method = TOUCH, volume)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(method == TOUCH)
if(volume > 9)
if(!H.wear_mask && !H.head)
if(!H.unacidable)
var/obj/item/organ/external/affecting = H.get_organ("head")
if(affecting)
affecting.disfigure()
H.adjustFireLoss(min(max(8, (volume - 5) * 3), 75))
H.emote("scream")
return
else
var/melted_something = FALSE
if(H.wear_mask && !H.wear_mask.unacidable)
qdel(H.wear_mask)
H.update_inv_wear_mask()
to_chat(H, "<span class='danger'>Your [H.wear_mask] melts away!</span>")
melted_something = TRUE
if(volume < 5)
to_chat(M, "<span class='danger'>The blueish acidic substance stings you, but isn't concentrated enough to harm you!</span>")
if(volume >=5 && volume <=10)
if(!H.unacidable)
M.take_organ_damage(0,max(volume-5,2)*4)
M.emote("scream")
if(volume > 10)
if(method == TOUCH)
if(H.wear_mask)
if(!H.wear_mask.unacidable)
qdel(H.wear_mask)
H.update_inv_wear_mask()
to_chat(H, "<span class='warning'>Your mask melts away but protects you from the acid!</span>")
else
to_chat(H, "<span class='warning'>Your mask protects you from the acid!</span>")
if(H.head && !H.head.unacidable)
qdel(H.head)
H.update_inv_head()
to_chat(H, "<span class='danger'>Your [H.head] melts away!</span>")
melted_something = TRUE
if(melted_something)
return
if(H.head)
if(!H.head.unacidable)
qdel(H.head)
H.update_inv_head()
to_chat(H, "<span class='warning'>Your helmet melts away but protects you from the acid</span>")
else
to_chat(H, "<span class='warning'>Your helmet protects you from the acid!</span>")
return
if(!H.unacidable)
var/obj/item/organ/external/head/affecting = H.get_organ("head")
if(affecting)
affecting.receive_damage(0, 75)
H.UpdateDamageIcon()
H.emote("scream")
if(volume >= 5)
H.emote("scream")
H.adjustFireLoss(min(max(8, (volume - 5) * 3), 75))
to_chat(H, "<span class='warning'>The blueish acidic substance stings[volume < 5 ? " you, but isn't concentrated enough to harm you" : null]!</span>")
/datum/reagent/facid/reaction_obj(obj/O, volume)
if((istype(O, /obj/item) || istype(O, /obj/structure/glowshroom)))
@@ -24,61 +24,34 @@
if(method == TOUCH)
// Put out fire
M.adjust_fire_stacks(-(volume * 0.2))
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(!isgrey(H)) //God this is so gross I hate it.
return
if(isgrey(M)) // You gosh darn snowflakes
var/mob/living/carbon/human/G = M
if(method == TOUCH)
if(volume > 25)
if(H.wear_mask)
to_chat(H, "<span class='danger'>Your mask protects you from the water!</span>")
if(G.wear_mask)
to_chat(G, "<span class='danger'>Your [G.wear_mask] protects you from the acid!</span>")
return
if(H.head)
to_chat(H, "<span class='danger'>Your helmet protects you from the water!</span>")
if(G.head)
to_chat(G, "<span class='danger'>Your [G.wear_mask] protects you from the acid!</span>")
return
if(!M.unacidable)
if(prob(75))
var/obj/item/organ/external/affecting = H.get_organ("head")
if(affecting)
affecting.receive_damage(5, 10)
H.UpdateDamageIcon()
H.emote("scream")
else
M.take_organ_damage(5,10)
if(prob(75))
G.take_organ_damage(5, 10)
G.emote("scream")
var/obj/item/organ/external/affecting = G.get_organ("head")
if(affecting)
affecting.disfigure()
else
G.take_organ_damage(5, 10)
else
M.take_organ_damage(5,10)
if(method == INGEST)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(!isgrey(H))
return
if(volume < 10)
to_chat(M, "<span class='danger'>The watery solvent substance stings you, but isn't concentrated enough to harm you!</span>")
if(volume >=10 && volume <=25)
if(!H.unacidable)
M.take_organ_damage(0,min(max(volume-10,2)*2,20))
M.emote("scream")
if(volume > 25)
if(!M.unacidable)
if(prob(75))
var/obj/item/organ/external/affecting = H.get_organ("head")
if(affecting)
affecting.receive_damage(0, 20)
H.UpdateDamageIcon()
H.emote("scream")
else
M.take_organ_damage(0,20)
G.take_organ_damage(5, 10)
else
to_chat(G, "<span class='warning'>The water stings[volume < 10 ? " you, but isn't concentrated enough to harm you" : null]!</span>")
if(volume >= 10)
G.adjustFireLoss(min(max(4, (volume - 10) * 2), 20))
G.emote("scream")
/datum/reagent/water/reaction_turf(turf/simulated/T, volume)
if(!istype(T))