mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-12 08:27:13 +01:00
Tesla Fix (#7256)
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:
committed by
Erki
parent
0fd74316f8
commit
f1c5f816ac
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user