internal explosions

if some explosive reaction occurs - it firstly tries to explode container, next the surroundings
if container is alive - it cuts half of explosion power, if it is dead in process - cut an half again
This commit is contained in:
Ater Ignis
2012-11-09 20:24:44 +04:00
parent 3cfb201846
commit 116b17e2be
3 changed files with 36 additions and 5 deletions
+14 -4
View File
@@ -27,9 +27,14 @@ datum
required_reagents = list("water" = 1, "potassium" = 1)
result_amount = 2
on_reaction(var/datum/reagents/holder, var/created_volume)
var/location = get_turf(holder.my_atom)
var/datum/effect/effect/system/reagents_explosion/e = new()
e.set_up(round (created_volume/10, 1), location, 0, 0)
e.set_up(round (created_volume/10, 1), holder.my_atom, 0, 0)
e.holder_damage(holder.my_atom)
if(isliving(holder.my_atom))
e.amount *= 0.5
var/mob/living/L = holder.my_atom
if(L.stat!=DEAD)
e.amount *= 0.5
e.start()
holder.clear_reagents()
return
@@ -317,9 +322,14 @@ datum
required_reagents = list("glycerol" = 1, "pacid" = 1, "sacid" = 1)
result_amount = 2
on_reaction(var/datum/reagents/holder, var/created_volume)
var/location = get_turf(holder.my_atom)
var/datum/effect/effect/system/reagents_explosion/e = new()
e.set_up(round (created_volume/2, 1), location, 0, 0)
e.set_up(round (created_volume/2, 1), holder.my_atom, 0, 0)
e.holder_damage(holder.my_atom)
if(isliving(holder.my_atom))
e.amount *= 0.5
var/mob/living/L = holder.my_atom
if(L.stat!=DEAD)
e.amount *= 0.5
e.start()
holder.clear_reagents()