Made the room weather less repetitive.
May want to keep a list of more than just one.
This commit is contained in:
parent
1c830d1f54
commit
47ce77abcd
1 changed files with 5 additions and 2 deletions
|
|
@ -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")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue