From e19c7b7f70bde87bfb5c2008604818a513eff1d8 Mon Sep 17 00:00:00 2001 From: Spyros Roum Date: Thu, 20 Mar 2025 22:18:58 +0200 Subject: [PATCH] Fix tutorial bridge room random.random() returns a float in the [0, 1) range, meaning `random.random() < 80` will always be true. --- evennia/contrib/tutorials/tutorial_world/rooms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evennia/contrib/tutorials/tutorial_world/rooms.py b/evennia/contrib/tutorials/tutorial_world/rooms.py index 4e346c4bd2..346ffa7d33 100644 --- a/evennia/contrib/tutorials/tutorial_world/rooms.py +++ b/evennia/contrib/tutorials/tutorial_world/rooms.py @@ -783,7 +783,7 @@ class BridgeRoom(WeatherRoom): This is called at irregular intervals and makes the passage over the bridge a little more interesting. """ - if random.random() < 80: + if random.random() < 0.8: # send a message most of the time self.msg_contents("|w%s|n" % random.choice(BRIDGE_WEATHER))