mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-07-16 18:52:45 +01:00
Adds Planetary Meteors (Again) (For Real)
Planetary meteor showers can occur. Hull shield generators made Smarter for planetary use.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user