Made the room weather less repetitive.

May want to keep a list of more than just one.
This commit is contained in:
Howard Abrams 2025-02-09 10:49:25 -08:00
parent 1c830d1f54
commit 47ce77abcd

View file

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