Adds Planetary Meteors (Again) (For Real)

Planetary meteor showers can occur.
Hull shield generators made Smarter for planetary use.
This commit is contained in:
Mechoid
2023-03-05 05:27:29 -08:00
parent 186dc1cdba
commit ca2f68bf14
7 changed files with 82 additions and 8 deletions
+18 -5
View File
@@ -6,6 +6,7 @@
var/static/list/blockedturfs = list(
/turf/space,
/turf/simulated/floor/outdoors,
/turf/simulated/open
)
/obj/machinery/shield_gen/external/advanced
@@ -26,8 +27,20 @@
T = locate(gen_turf.x + x_offset, gen_turf.y + y_offset, gen_turf.z)
if (is_type_in_list(T,blockedturfs))
//check neighbors of T
for(var/i in orange(1, T))
if(istype(i, /turf/simulated) && !is_type_in_list(i,blockedturfs))
out += T
break
return out
if(istype(T, /turf/simulated/open))
if((locate(/obj/structure/catwalk) in T) || !T.is_outdoors()) // Don't cover catwalks or indoor turfs.
continue
for(var/turf/simulated/Turf in orange(1, T)) // check adjacent turfs
if(!Turf.is_outdoors() && !is_type_in_list(Turf, blockedturfs))
out |= T
break
if(Turf.is_outdoors() && (!is_type_in_list(Turf, blockedturfs) || (locate(/obj/structure/catwalk) in Turf))) // Is it outdoors, and not a turf we can shield, or a catwalked turf?
out |= T
break
else
for(var/i in orange(1, T))
if(istype(i, /turf/simulated) && !is_type_in_list(i,blockedturfs))
out |= T
break
return out