mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 06:54:18 +01:00
Fixes #3096 which exists because T != U. Fixes #3461 which exists because I should read the code I'm refactoring instead of getting carried away by RANGE_TURFS being faster.
This commit is contained in:
@@ -238,8 +238,27 @@
|
||||
//grab the border tiles in a circle around this machine
|
||||
/obj/machinery/shield_gen/proc/get_shielded_turfs()
|
||||
var/turf/gen_turf = get_turf(src)
|
||||
. = list()
|
||||
|
||||
if (!gen_turf)
|
||||
return
|
||||
|
||||
. = RANGE_TURFS(field_radius, gen_turf)
|
||||
var/turf/T
|
||||
|
||||
for (var/x_offset = -field_radius; x_offset <= field_radius; x_offset++)
|
||||
T = locate(gen_turf.x + x_offset, gen_turf.y - field_radius, gen_turf.z)
|
||||
if (T)
|
||||
. += T
|
||||
|
||||
T = locate(gen_turf.x + x_offset, gen_turf.y + field_radius, gen_turf.z)
|
||||
if (T)
|
||||
. += T
|
||||
|
||||
for (var/y_offset = -field_radius+1; y_offset < field_radius; y_offset++)
|
||||
T = locate(gen_turf.x - field_radius, gen_turf.y + y_offset, gen_turf.z)
|
||||
if (T)
|
||||
. += T
|
||||
|
||||
T = locate(gen_turf.x + field_radius, gen_turf.y + y_offset, gen_turf.z)
|
||||
if (T)
|
||||
. += T
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
continue
|
||||
|
||||
if (the_station_areas[U.loc])
|
||||
out += U
|
||||
out += T
|
||||
break
|
||||
|
||||
return out
|
||||
|
||||
Reference in New Issue
Block a user