Merge pull request #10773 from VOREStation/upstream-merge-8155

[MIRROR] Adds optional area-based definition for outdoors-ness
This commit is contained in:
Aronai Sieyes
2021-08-01 11:41:25 -04:00
committed by GitHub
26 changed files with 98 additions and 58 deletions
@@ -167,7 +167,7 @@
// I don't like that so I'm commenting it out :)
// VOREstation Edit Start
/*
if(T.outdoors && (T.z <= SSplanets.z_to_planet.len))
if((T.is_outdoors()) && (T.z <= SSplanets.z_to_planet.len))
var/datum/planet/P = SSplanets.z_to_planet[z]
if(P)
var/datum/weather_holder/WH = P.weather_holder
@@ -136,7 +136,8 @@
if(stat != DEAD && cell)
// TODO generalize solar occlusion to charge from the actual sun.
var/new_recharge_state = istype(loc, /turf/simulated/floor/outdoors) || /*, /turf/exterior) */ istype(loc, /turf/space)
var/turf/T = get_turf(src)
var/new_recharge_state = T?.is_outdoors() || isspace(T)
if(new_recharge_state != last_recharge_state)
last_recharge_state = new_recharge_state
if(last_recharge_state)