diff --git a/typeclasses/rooms_weather.py b/typeclasses/rooms_weather.py index 53ecb21..cb60864 100755 --- a/typeclasses/rooms_weather.py +++ b/typeclasses/rooms_weather.py @@ -147,6 +147,9 @@ class TimeWeatherRoom(Room): any arguments and keyword arguments (hence the *args, **kwargs even though we don't actually use them in this example) """ + # only update 10 % of the time if random.random() < 0.1: - # only update 20 % of the time - self.msg_contents("|w%s|n\n" % choose_weather_message()) + msg = choose_weather_message() + if self.db.previous_weather != msg: + self.db.previous_weather = msg + self.msg_contents(f"|w{msg}|n\n")