mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-24 00:51:26 +00:00
Fixes #2803 Fixes #2553 Fixes #2597 (Couldn't find a cleaner way to make this work, unfortunately. Not all procs-as-verbs can be used as procs.) Fixes #2498 Fixes #2912
38 lines
968 B
Plaintext
38 lines
968 B
Plaintext
//---------- external shield generator
|
|
//generates an energy field that loops around any built up area in space (is useless inside) halts movement and airflow, is blocked by walls, windows, airlocks etc
|
|
|
|
/obj/machinery/shield_gen/external
|
|
name = "hull shield generator"
|
|
|
|
/obj/machinery/shield_gen/external/New()
|
|
..()
|
|
|
|
//NOT MULTIZ COMPATIBLE
|
|
//Search for space turfs within range that are adjacent to a simulated turf.
|
|
/obj/machinery/shield_gen/external/get_shielded_turfs()
|
|
var/list/out = list()
|
|
|
|
var/turf/gen_turf = get_turf(src)
|
|
if (!gen_turf)
|
|
return
|
|
|
|
var/turf/U
|
|
var/turf/T
|
|
|
|
for (var/tt in RANGE_TURFS(field_radius, gen_turf))
|
|
T = tt
|
|
// Ignore station areas.
|
|
if (the_station_areas[T.loc])
|
|
continue
|
|
else if (istype(T, /turf/space) || istype(T, /turf/simulated/floor/asteroid) || isopenturf(T))
|
|
for (var/uu in RANGE_TURFS(1, T))
|
|
U = uu
|
|
if (T == U)
|
|
continue
|
|
|
|
if (the_station_areas[U.loc])
|
|
out += U
|
|
break
|
|
|
|
return out
|