mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Fixes chemical explosions
This commit is contained in:
@@ -513,16 +513,3 @@ steam.start() -- spawns the effect
|
|||||||
round(min(light, BOMBCAP_LIGHT_RADIUS)),
|
round(min(light, BOMBCAP_LIGHT_RADIUS)),
|
||||||
round(min(flash, BOMBCAP_FLASH_RADIUS))
|
round(min(flash, BOMBCAP_FLASH_RADIUS))
|
||||||
)
|
)
|
||||||
|
|
||||||
proc/holder_damage(var/atom/holder)
|
|
||||||
if(holder)
|
|
||||||
var/dmglevel = 4
|
|
||||||
|
|
||||||
if (round(amount/8) > 0)
|
|
||||||
dmglevel = 1
|
|
||||||
else if (round(amount/4) > 0)
|
|
||||||
dmglevel = 2
|
|
||||||
else if (round(amount/2) > 0)
|
|
||||||
dmglevel = 3
|
|
||||||
|
|
||||||
if(dmglevel<4) holder.ex_act(dmglevel)
|
|
||||||
|
|||||||
@@ -17,9 +17,7 @@
|
|||||||
var/affected_area = 3
|
var/affected_area = 3
|
||||||
|
|
||||||
New()
|
New()
|
||||||
var/datum/reagents/R = new/datum/reagents(1000)
|
create_reagents(1000)
|
||||||
reagents = R
|
|
||||||
R.my_atom = src
|
|
||||||
|
|
||||||
attack_self(mob/user as mob)
|
attack_self(mob/user as mob)
|
||||||
if(!stage || stage==1)
|
if(!stage || stage==1)
|
||||||
|
|||||||
@@ -397,7 +397,7 @@
|
|||||||
R.touch_turf(target)
|
R.touch_turf(target)
|
||||||
return
|
return
|
||||||
|
|
||||||
/datum/reagents/proc/trans_to_obj(var/turf/target, var/amount = 1, var/multiplier = 1, var/copy = 0) // Objects may or may not; if they do, it's probably a beaker or something and we need to transfer properly; otherwise, just touch.
|
/datum/reagents/proc/trans_to_obj(var/obj/target, var/amount = 1, var/multiplier = 1, var/copy = 0) // Objects may or may not; if they do, it's probably a beaker or something and we need to transfer properly; otherwise, just touch.
|
||||||
if(!target)
|
if(!target)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -594,7 +594,6 @@
|
|||||||
/datum/chemical_reaction/explosion_potassium/on_reaction(var/datum/reagents/holder, var/created_volume)
|
/datum/chemical_reaction/explosion_potassium/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||||
var/datum/effect/effect/system/reagents_explosion/e = new()
|
var/datum/effect/effect/system/reagents_explosion/e = new()
|
||||||
e.set_up(round (created_volume/10, 1), holder.my_atom, 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))
|
if(isliving(holder.my_atom))
|
||||||
e.amount *= 0.5
|
e.amount *= 0.5
|
||||||
var/mob/living/L = holder.my_atom
|
var/mob/living/L = holder.my_atom
|
||||||
@@ -660,7 +659,6 @@
|
|||||||
/datum/chemical_reaction/nitroglycerin/on_reaction(var/datum/reagents/holder, var/created_volume)
|
/datum/chemical_reaction/nitroglycerin/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||||
var/datum/effect/effect/system/reagents_explosion/e = new()
|
var/datum/effect/effect/system/reagents_explosion/e = new()
|
||||||
e.set_up(round (created_volume/2, 1), holder.my_atom, 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))
|
if(isliving(holder.my_atom))
|
||||||
e.amount *= 0.5
|
e.amount *= 0.5
|
||||||
var/mob/living/L = holder.my_atom
|
var/mob/living/L = holder.my_atom
|
||||||
|
|||||||
Reference in New Issue
Block a user