mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 16:38:22 +01:00
Solves excessive runtime production from beams being created improperly. (#10473)
This commit is contained in:
+1
-2
@@ -23,9 +23,8 @@
|
||||
target = beam_target
|
||||
target_oldloc = get_turf(target)
|
||||
|
||||
if(get_dist(origin_oldloc, target_oldloc) >= max_distance || origin_oldloc.z != target_oldloc.z)
|
||||
if(!origin || !target || !target_oldloc || !origin_oldloc || get_dist(origin_oldloc, target_oldloc) >= max_distance || origin_oldloc.z != target_oldloc.z)
|
||||
qdel(src)
|
||||
crash_with("Tried to create a new beam with length beyond its maximum distance limit.")
|
||||
return
|
||||
|
||||
sleep_time = beam_sleep_time
|
||||
|
||||
@@ -311,8 +311,8 @@
|
||||
))
|
||||
|
||||
var/rods_count = 0
|
||||
|
||||
for(var/A in typecache_filter_multi_list_exclusion(oview(source, zap_range+2), things_to_shock, blacklisted_types))
|
||||
var/beam_range = zap_range + 2
|
||||
for(var/A in typecache_filter_multi_list_exclusion(oview(source, beam_range), things_to_shock, blacklisted_types))
|
||||
|
||||
if(istype(source, /obj/singularity/energy_ball) && istype(A, /obj/machinery/power/singularity_beacon/emergency))
|
||||
var/obj/machinery/power/singularity_beacon/emergency/E = A
|
||||
@@ -320,7 +320,7 @@
|
||||
if(!E.active)
|
||||
return
|
||||
B.visible_message("\The [B] discharges entirely at [A] until it dissapears and [A] melts down")
|
||||
B.Beam(E, icon_state="lightning[rand(1,12)]", icon = 'icons/effects/effects.dmi', time=2)
|
||||
B.Beam(E, icon_state="lightning[rand(1,12)]", icon = 'icons/effects/effects.dmi', time=2, maxdistance=beam_range)
|
||||
E.tesla_act(0, TRUE)
|
||||
qdel(B)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user