mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge pull request #5014 from PolarisSS13/Ater_Weather_report
Weather reports won't crash when planet controller dies
This commit is contained in:
@@ -69,16 +69,17 @@
|
||||
im_list_ui[++im_list_ui.len] = list("address" = I["address"], "to_address" = I["to_address"], "im" = I["im"])
|
||||
|
||||
//Weather reports.
|
||||
for(var/datum/planet/planet in planet_controller.planets)
|
||||
if(planet.weather_holder && planet.weather_holder.current_weather)
|
||||
var/list/W = list(
|
||||
"Planet" = planet.name,
|
||||
"Time" = planet.current_time.show_time("hh:mm"),
|
||||
"Weather" = planet.weather_holder.current_weather.name,
|
||||
"Temperature" = planet.weather_holder.temperature - T0C,
|
||||
"High" = planet.weather_holder.current_weather.temp_high - T0C,
|
||||
"Low" = planet.weather_holder.current_weather.temp_low - T0C)
|
||||
weather[++weather.len] = W
|
||||
if(planet_controller)
|
||||
for(var/datum/planet/planet in planet_controller.planets)
|
||||
if(planet.weather_holder && planet.weather_holder.current_weather)
|
||||
var/list/W = list(
|
||||
"Planet" = planet.name,
|
||||
"Time" = planet.current_time.show_time("hh:mm"),
|
||||
"Weather" = planet.weather_holder.current_weather.name,
|
||||
"Temperature" = planet.weather_holder.temperature - T0C,
|
||||
"High" = planet.weather_holder.current_weather.temp_high - T0C,
|
||||
"Low" = planet.weather_holder.current_weather.temp_low - T0C)
|
||||
weather[++weather.len] = W
|
||||
|
||||
injection = "<div>Test</div>"
|
||||
|
||||
@@ -251,4 +252,4 @@
|
||||
set_light(fon * flum)
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
add_fingerprint(usr)
|
||||
add_fingerprint(usr)
|
||||
|
||||
Reference in New Issue
Block a user