Files
Aurora.3/code/modules/shieldgen/shield_gen_external.dm
hazelrat 37698ded3d Horizon area sprites + shield-less exterior area (#22594)
Fills in a lot of the blanks in the area icon states on the Horizon with
new sprites. Looks neater in SDMM.

Adds a new exterior/no_shields area, which is exclusively used for the
wings and around the starboard thrusters, around which shields will not
generate. This is pulled off in what I hope is a non-demanding way. This
is used to resolve that funny issue with starboard propulsion's wide
arcing shield, and to force shields on D3 to be taut to the walls.

The regular exterior area is retained wherever we want there to be
shields around EVA catwalks.

<img width="1080" height="1080" alt="image"
src="https://github.com/user-attachments/assets/4826b32f-34e2-44ab-b0be-f9fee9622fc8"
/>

<img width="1056" height="896" alt="image"
src="https://github.com/user-attachments/assets/cde72fa6-41eb-4c2a-b843-9959359ca505"
/>
2026-06-07 20:01:03 +00:00

73 lines
2.2 KiB
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/structure/machinery/shield_gen/external
name = "hull shield generator"
component_types = list(
/obj/item/circuitboard/shield_gen_ex,
/obj/item/stock_parts/manipulator = 2,
/obj/item/stock_parts/micro_laser = 2,
/obj/item/stock_parts/capacitor = 2,
/obj/item/stock_parts/subspace/transmitter = 1,
/obj/item/stock_parts/subspace/crystal = 1,
/obj/item/stock_parts/subspace/amplifier = 1,
/obj/item/stock_parts/console_screen = 1,
/obj/item/stack/cable_coil = 5
)
//Search for space turfs within range that are adjacent to a simulated turf.
/obj/structure/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 ((GLOB.the_station_areas[T.loc] && !is_shieldless_exterior(T.loc)) || is_shuttle_area(T.loc))
continue
else if (istype(T, /turf/space) || isopenturf(T) || istype(T, /turf/simulated/floor/reinforced))
for (var/uu in RANGE_TURFS(1, T))
U = uu
if (T == U)
continue
if (GLOB.the_station_areas[U.loc] && !is_shieldless_exterior(U.loc))
out += T
break
if(multiz)
var/connected_levels = list()
var/list/turf/above = getzabove(get_turf(src))
var/list/turf/below = getzbelow(get_turf(src))
if(above)
for(var/turf/z as anything in above)
connected_levels += z
if(below)
for(var/turf/z as anything in below)
connected_levels += z
for(var/turf/z in connected_levels)
for (var/tt in RANGE_TURFS(field_radius, z))
T = tt
// Ignore station areas.
if ((GLOB.the_station_areas[T.loc] && !is_shieldless_exterior(T.loc)) || istype(T.loc, /area/shuttle))
continue
else if (istype(T, /turf/space) || isopenturf(T) || istype(T, /turf/simulated/floor/reinforced))
for (var/uu in RANGE_TURFS(1, T))
U = uu
if (T == U)
continue
if (GLOB.the_station_areas[U.loc] && !is_shieldless_exterior(U.loc))
out += T
break
return out