Refactors Electrocution and Tesla Zapping (#15357)

* Refactors Electrocution and Tesla Zapping---Improves Supermatter and Tesla

* forgot this one

* fixes and styling

* last tidbits hopefully

* machine frames

* use flags

* styling
This commit is contained in:
Fox McCloud
2021-02-03 20:52:03 +00:00
committed by GitHub
parent 5608f36a4b
commit 8947e97f3b
50 changed files with 598 additions and 384 deletions
@@ -182,7 +182,7 @@
M.apply_damage(0.4 * volume, BURN)
if(M.reagents)
if(M.reagents.has_reagent("teslium") && prob(0.6 * volume))
M.electrocute_act((0.5 * volume), "the blob's electrical discharge", 1, TRUE)
M.electrocute_act((0.5 * volume), "the blob's electrical discharge", 1, SHOCK_NOGLOVES)
M.reagents.del_reagent("teslium")
return //don't add more teslium after you shock it out of someone.
M.reagents.add_reagent("teslium", 0.125 * volume) // a little goes a long way
@@ -1233,10 +1233,22 @@
shock_timer++
if(shock_timer >= rand(5,30)) //Random shocks are wildly unpredictable
shock_timer = 0
M.electrocute_act(rand(5, 20), "Teslium in their body", 1, TRUE) //Override because it's caused from INSIDE of you
M.electrocute_act(rand(5, 20), "Teslium in their body", 1, SHOCK_NOGLOVES) //Override because it's caused from INSIDE of you
playsound(M, "sparks", 50, 1)
return ..()
/datum/reagent/teslium/on_mob_add(mob/living/M)
..()
if(ishuman(M))
var/mob/living/carbon/human/H = M
H.dna.species.siemens_coeff *= 2
/datum/reagent/teslium/on_mob_delete(mob/living/M)
if(ishuman(M))
var/mob/living/carbon/human/H = M
H.dna.species.siemens_coeff *= 0.5
..()
/datum/reagent/gluttonytoxin
name = "Gluttony's Blessing"
id = "gluttonytoxin"
+4 -3
View File
@@ -110,9 +110,10 @@
..()
boom()
/obj/structure/reagent_dispensers/fueltank/tesla_act()
..() //extend the zap
boom()
/obj/structure/reagent_dispensers/fueltank/zap_act(power, zap_flags)
. = ..() //extend the zap
if(ZAP_OBJ_DAMAGE & zap_flags)
boom()
/obj/structure/reagent_dispensers/fueltank/examine(mob/user)
. = ..()