Upgrades Planetary Weather to vis_contents (#5170)

* Upgrades Planetary Weather to vis_contents
Makes the weather on Sif use vis_contents instead of overlays, which should fix all weather-related icon issues, and may or may not be faster.
Weather updates instantly now.
Fixes indoor PoIs having outdoor weather.

* Tries to appease Travis
This commit is contained in:
Neerti
2018-04-28 23:40:11 -04:00
committed by Atermonera
parent 81c19c62a3
commit e3e1a7ad9c
6 changed files with 16 additions and 36 deletions

View File

@@ -21,6 +21,7 @@ var/datum/controller/process/planet/planet_controller = null
for(var/datum/planet/P in planets)
if(OT.z in P.expected_z_levels)
P.planet_floors |= OT
OT.vis_contents |= P.weather_holder.visuals
break
outdoor_turfs.Cut() //Why were you in there INCORRECTLY?
@@ -36,6 +37,7 @@ var/datum/controller/process/planet/planet_controller = null
var/datum/planet/P = planet
if(T.z in P.expected_z_levels)
P.planet_floors -= T
T.vis_contents -= P.weather_holder.visuals
/datum/controller/process/planet/doWork()
if(outdoor_turfs.len || planetary_walls.len)
@@ -44,19 +46,6 @@ var/datum/controller/process/planet/planet_controller = null
for(var/datum/planet/P in planets)
P.process(schedule_interval / 10)
SCHECK //Your process() really shouldn't take this long...
//Weather style needs redrawing
if(P.needs_work & PLANET_PROCESS_WEATHER)
P.needs_work &= ~PLANET_PROCESS_WEATHER
var/image/new_overlay = image(icon = P.weather_holder.current_weather.icon, icon_state = P.weather_holder.current_weather.icon_state)
new_overlay.plane = PLANE_PLANETLIGHTING
//Redraw weather icons
for(var/T in P.planet_floors)
var/turf/simulated/turf = T
// turf.overlays -= turf.weather_overlay
turf.weather_overlay = new_overlay
// turf.overlays += turf.weather_overlay
turf.update_icon()
SCHECK
//Sun light needs changing
if(P.needs_work & PLANET_PROCESS_SUN)