Fixing tesla with no balls (#5988)

This PR fixes Tesla not having miniballs. Problem was that it would delete its own generated balls. Fixes #5749

Tesla that has 9 or more balls will start to melt down any tesla coils or grounding rods.

Tesla that has 10 or more balls will start to target and melt down emitters

Tesla with no balls looses power as intended, thus dying with less than 0 power.
This commit is contained in:
Mykhailo Bykhovtsev
2019-01-27 17:31:49 +02:00
committed by Erki
parent 2ad7e66001
commit db0d918d8c
4 changed files with 82 additions and 12 deletions
+6 -1
View File
@@ -174,7 +174,12 @@
/obj/proc/see_emote(mob/M as mob, text, var/emote_type)
return
/obj/proc/tesla_act(var/power)
/obj/proc/tesla_act(var/power, var/melt = FALSE)
if(melt)
visible_message(span("danger", "\The [src] melts down until ashes are left!"))
new /obj/effect/decal/cleanable/ash(loc)
qdel(src)
return
being_shocked = 1
var/power_bounced = power / 2
tesla_zap(src, 3, power_bounced)