mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-18 14:11:55 +00:00
Inhibitor Check Fix (#10980)
This commit is contained in:
@@ -42,16 +42,15 @@
|
||||
if(istype(adestination))
|
||||
var/list/turf/good_turfs = list()
|
||||
var/list/turf/bad_turfs = list()
|
||||
for(var/found_inhibitor in circlerange(adestination,8))
|
||||
if(!istype(found_inhibitor,/obj/machinery/anti_bluespace))
|
||||
continue
|
||||
var/turf/T = get_turf(adestination)
|
||||
for(var/found_inhibitor in bluespace_inhibitors)
|
||||
var/obj/machinery/anti_bluespace/AB = found_inhibitor
|
||||
if(AB.stat & (NOPOWER | BROKEN) )
|
||||
if(T.z != AB.z || get_dist(adestination, AB) > 8 || (AB.stat & (NOPOWER | BROKEN)))
|
||||
continue
|
||||
AB.use_power(AB.active_power_usage)
|
||||
bad_turfs += circlerangeturfs(get_turf(AB),8)
|
||||
good_turfs += circlerangeturfs(get_turf(AB),9)
|
||||
if(good_turfs.len && bad_turfs.len)
|
||||
if(length(good_turfs) && length(bad_turfs))
|
||||
good_turfs -= bad_turfs
|
||||
return pick(good_turfs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user