mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user