mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
Tesla now dusts people on tile it jumps to
🆑 coiax fix: The tesla now dusts all carbon mobs on the turf that it moves to, grounding rod or no. /🆑 - Also made the miniball spawn a timer.
This commit is contained in:
@@ -48,7 +48,7 @@ var/list/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics,
|
||||
var/obj/singularity/energy_ball/EB = ball
|
||||
qdel(EB)
|
||||
|
||||
return ..()
|
||||
. = ..()
|
||||
|
||||
/obj/singularity/energy_ball/process()
|
||||
if(!orbiting)
|
||||
@@ -71,8 +71,6 @@ var/list/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics,
|
||||
else
|
||||
energy = 0 // ensure we dont have miniballs of miniballs
|
||||
|
||||
return
|
||||
|
||||
/obj/singularity/energy_ball/examine(mob/user)
|
||||
..()
|
||||
if(orbiting_balls.len)
|
||||
@@ -89,28 +87,17 @@ var/list/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics,
|
||||
var/turf/T = get_step(src, move_dir)
|
||||
if(can_move(T))
|
||||
loc = T
|
||||
for(var/mob/living/carbon/C in loc)
|
||||
dust_mobs(C)
|
||||
|
||||
|
||||
/obj/singularity/energy_ball/proc/handle_energy()
|
||||
|
||||
if(energy >= energy_to_raise)
|
||||
energy_to_lower = energy_to_raise - 20
|
||||
energy_to_raise = energy_to_raise * 1.25
|
||||
|
||||
playsound(src.loc, 'sound/magic/lightning_chargeup.ogg', 100, 1, extrarange = 30)
|
||||
spawn(100)
|
||||
if (!loc)
|
||||
return
|
||||
var/obj/singularity/energy_ball/EB = new(loc)
|
||||
|
||||
EB.transform *= pick(0.3, 0.4, 0.5, 0.6, 0.7)
|
||||
var/icon/I = icon(icon,icon_state,dir)
|
||||
|
||||
var/orbitsize = (I.Width() + I.Height()) * pick(0.4, 0.5, 0.6, 0.7, 0.8)
|
||||
orbitsize -= (orbitsize / world.icon_size) * (world.icon_size * 0.25)
|
||||
|
||||
EB.orbit(src, orbitsize, pick(FALSE, TRUE), rand(10, 25), pick(3, 4, 5, 6, 36))
|
||||
|
||||
addtimer(src, "new_mini_ball", 100)
|
||||
|
||||
else if(energy < energy_to_lower && orbiting_balls.len)
|
||||
energy_to_raise = energy_to_raise / 1.25
|
||||
@@ -122,6 +109,20 @@ var/list/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics,
|
||||
else if(orbiting_balls.len)
|
||||
dissipate() //sing code has a much better system.
|
||||
|
||||
/obj/singularity/energy_ball/proc/new_mini_ball()
|
||||
if(!loc)
|
||||
return
|
||||
var/obj/singularity/energy_ball/EB = new(loc)
|
||||
|
||||
EB.transform *= pick(0.3, 0.4, 0.5, 0.6, 0.7)
|
||||
var/icon/I = icon(icon,icon_state,dir)
|
||||
|
||||
var/orbitsize = (I.Width() + I.Height()) * pick(0.4, 0.5, 0.6, 0.7, 0.8)
|
||||
orbitsize -= (orbitsize / world.icon_size) * (world.icon_size * 0.25)
|
||||
|
||||
EB.orbit(src, orbitsize, pick(FALSE, TRUE), rand(10, 25), pick(3, 4, 5, 6, 36))
|
||||
|
||||
|
||||
/obj/singularity/energy_ball/Bump(atom/A)
|
||||
dust_mobs(A)
|
||||
|
||||
@@ -146,7 +147,6 @@ var/list/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics,
|
||||
if(istype(A, /mob/living/carbon))
|
||||
var/mob/living/carbon/C = A
|
||||
C.dust()
|
||||
return
|
||||
|
||||
/proc/tesla_zap(var/atom/source, zap_range = 3, power)
|
||||
. = source.dir
|
||||
@@ -262,5 +262,3 @@ var/list/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics,
|
||||
|
||||
else if(closest_structure)
|
||||
closest_structure.tesla_act(power)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user