bugfix: "Tesla no longer melts ashes, emitter beams, its own energy balls and accelerated particles." Fixes #7249
    bugfix: "Tesla now properly consumes accelerated particles."
This commit is contained in:
Mykhailo Bykhovtsev
2019-10-26 07:57:41 -07:00
committed by Erki
parent 0fd74316f8
commit f1c5f816ac
4 changed files with 70 additions and 0 deletions
+3
View File
@@ -144,6 +144,9 @@
blend_mode = BLEND_ADD
var/datum/beam/owner
/obj/effect/ebeam/tesla_act()
return
/obj/effect/ebeam/Destroy()
owner = null
return ..()
+3
View File
@@ -1,3 +1,6 @@
/obj/effect/decal/tesla_act()
return
/obj/effect/decal/point
name = "arrow"
desc = "It's an arrow hanging in mid-air. There may be a wizard about."
+22
View File
@@ -24,6 +24,7 @@
var/produced_power
var/energy_to_raise = 32
var/energy_to_lower = -20
var/list/immune_things = list(/obj/effect/projectile/muzzle/emitter, /obj/effect/ebeam, /obj/effect/decal/cleanable/ash, /obj/singularity)
/obj/singularity/energy_ball/ex_act(severity, target)
return
@@ -199,19 +200,37 @@
/obj/singularity/energy_ball/Collide(atom/A)
if(check_for_immune(A))
return
if(isliving(A))
dust_mobs(A)
else if(isobj(A))
if(istype(A, /obj/effect/accelerated_particle))
consume(A)
return
var/obj/O = A
O.tesla_act(0, TRUE)
/obj/singularity/energy_ball/CollidedWith(atom/A)
if(check_for_immune(A))
return
if(isliving(A))
dust_mobs(A)
else if(isobj(A))
if(istype(A, /obj/effect/accelerated_particle))
consume(A)
return
var/obj/O = A
O.tesla_act(0, TRUE)
/obj/singularity/energy_ball/proc/check_for_immune(var/O)
if(!O)
return FALSE
for(var/v in immune_things)
if(istype(O, v))
return TRUE
return FALSE
/obj/singularity/energy_ball/Move(NewLoc, Dir)
. = ..()
for(var/v in view(0, loc))
@@ -249,6 +268,9 @@
var/mob/living/carbon/C = A
C.dust()
/obj/singularity/energy_ball/tesla_act()
return
/proc/tesla_zap(atom/source, zap_range = 3, power, explosive = FALSE, stun_mobs = TRUE)
. = source.dir
if(power < 1000)
+42
View File
@@ -0,0 +1,42 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: PoZe
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- bugfix: "Tesla no longer melts ashes, emitter beams, its own energy balls and accelerated particles."
- bugfix: "Tesla now properly consumes accelerated particles."