area
Outside
proc
weather()
switch(Season)
if("Summer")
if(rand(1,10) >= 5)
Weather = "Raining [rand(1,5)==5 ? "Hard" : "Lightly"]"
world << "It begins [Weather]"
for(var/obj/Weather/w in src.Weathers)
src.overlays -= w
w.loc = null
var/obj/Weather/r = new/obj/weather/rain
src.Weathers += r
src.overlays += r
else
world << "It's sunny now."
for(var/obj/Weather/w in src.Weathers)
src.overlays -= w
w.loc = null
if("Fall")
if(rand(1,10) == 10)
Weather = "Raining [rand(1,5)==5 ? "Lightly" : "Hard"]"
world << "It begins [Weather]"
for(var/obj/Weather/w in src.Weathers)
src.overlays -= w
w.loc = null
var/obj/Weather/r = new/obj/weather/rain
src.Weathers += r
src.overlays += r
else if(rand(1,5) == 5)
Weather = "Snowing [rand(1,5)==5 ? "Hard" : "Lightly"]"
world << "It begins [Weather]"
for(var/obj/Weather/w in src.Weathers)
src.overlays -= w
w.loc = null
var/obj/Weather/r = new/obj/weather/snow
src.Weathers += r
src.overlays += r
else
world << "It's sunny now."
for(var/obj/Weather/w in src.Weathers)
src.overlays -= w
w.loc = null
if("Winter")
if(rand(1,10) == 10)
Weather = "Snowing [rand(1,5)==5 ? "Lightly" : "Hard"]"
world << "It begins [Weather]"
for(var/obj/Weather/w in src.Weathers)
src.overlays -= w
w.loc = null
var/obj/Weather/r = new/obj/weather/snow
src.Weathers += r
src.overlays += r
else if(rand(1,5) == 5)
Weather = "Snowing [rand(1,5)==5 ? "Hard" : "Lightly"]"
world << "It begins [Weather]"
for(var/obj/Weather/w in src.Weathers)
src.overlays -= w
w.loc = null
var/obj/Weather/r = new/obj/weather/snow
src.Weathers += r
src.overlays += r
else
world << "It's sunny now."
for(var/obj/Weather/w in src.Weathers)
src.overlays -= w
w.loc = null
if("Spring")
if(rand(1,10) == 10)
Weather = "Rain [rand(1,5)==5 ? "Hard" : "Lightly"]"
world << "It begins [Weather]"
for(var/obj/Weather/w in src.Weathers)
src.overlays -= w
w.loc = null
var/obj/Weather/r = new/obj/weather/rain
src.Weathers += r
src.overlays += r
else if(rand(1,5) == 5)
Weather = "Snowing [rand(1,10)==5 ? "Hard" : "Lightly"]"
world << "It begins [Weather]"
for(var/obj/Weather/w in src.Weathers)
src.overlays -= w
w.loc = null
var/obj/Weather/r = new/obj/weather/snow
src.Weathers += r
src.overlays += r
else
world << "It's sunny now."
for(var/obj/Weather/w in src.Weathers)
src.overlays -= w
w.loc = null
spawn(150) src.weather()
Problem description:
Okay, so, all the weather appears perfectly fine. But why is it when it turns sunny, the weather doesn't vanish?