Adds optional area-based definition for outdoors-ness. (#8155)

This commit is contained in:
Neerti
2021-06-28 01:46:10 -04:00
committed by GitHub
parent 671b5e7ea4
commit 6782e64891
17 changed files with 69 additions and 37 deletions
+2 -2
View File
@@ -40,13 +40,13 @@
for(var/obj/machinery/power/thing in range(LIGHTNING_REDIRECT_RANGE, T))
if(istype(thing, /obj/machinery/power/tesla_coil))
var/turf/simulated/coil_turf = get_turf(thing)
if(istype(coil_turf) && thing.anchored && coil_turf.outdoors)
if(istype(coil_turf) && thing.anchored && coil_turf.outdoors == OUTDOORS_YES)
coil = thing
break
if(istype(thing, /obj/machinery/power/grounding_rod))
var/turf/simulated/rod_turf = get_turf(thing)
if(istype(rod_turf) && thing.anchored && rod_turf.outdoors)
if(istype(rod_turf) && thing.anchored && rod_turf.outdoors == OUTDOORS_YES)
ground = thing
if(coil) // Coil gets highest priority.