From d0d56ee5bf3c31cf453035d7731c93a864f6e39a Mon Sep 17 00:00:00 2001 From: Griatch Date: Sat, 10 Jan 2015 21:21:00 +0100 Subject: [PATCH] Fixed a strange case in the dummyrunner. --- bin/testing/dummyrunner.py | 3 +++ bin/testing/dummyrunner_settings.py | 23 +++++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/bin/testing/dummyrunner.py b/bin/testing/dummyrunner.py index 5ceb872163..0bd7e09a53 100644 --- a/bin/testing/dummyrunner.py +++ b/bin/testing/dummyrunner.py @@ -234,6 +234,9 @@ class DummyClient(telnet.StatefulTelnetProtocol): NLOGGED_IN += 1 # this is for book-keeping print "connecting client %s (%i/%i)..." % (self.key, NLOGGED_IN, NCLIENTS) self._loggedin = True + else: + # no login yet, so cmdlist not yet set + return else: # we always pick a cumulatively random function crand = random.random() diff --git a/bin/testing/dummyrunner_settings.py b/bin/testing/dummyrunner_settings.py index 02d2fefc9b..c03843aa3a 100644 --- a/bin/testing/dummyrunner_settings.py +++ b/bin/testing/dummyrunner_settings.py @@ -58,7 +58,7 @@ TIMESTEP = 2 # Chance of a dummy actually performing an action on a given tick. # This spreads out usage randomly, like it would be in reality. -CHANCE_OF_ACTION = 0.05 +CHANCE_OF_ACTION = 1.0#0.05 # Chance of a currently unlogged-in dummy performing its login # action every tick. This emulates not all players logging in @@ -240,15 +240,18 @@ def c_moves_s(client): # #(0.1, c_creates_button), # #(0.4, c_moves)) ## "normal player" definition -ACTIONS = ( c_login, - c_logout, - (0.01, c_digs), - (0.39, c_looks), - (0.2, c_help), - (0.4, c_moves)) -#ACTIONS = (c_login_nodig, -# c_logout, -# (1.0, c_moves_n)) +#ACTIONS = ( c_login, +# c_logout, +# (0.01, c_digs), +# (0.39, c_looks), +# (0.2, c_help), +# (0.4, c_moves)) +# walking tester. This requires a pre-made +# "loop" of multiple rooms that ties back +# to limbo (using @tunnel and @open) +ACTIONS = (c_login_nodig, + c_logout, + (1.0, c_moves_n)) ## "socializing heavy builder" definition #ACTIONS = (c_login, # c_logout,