From 358f157718342374be169e8ba4308720e15d8467 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Fri, 10 Jul 2020 01:07:31 +0200 Subject: [PATCH] Simplify code. --- new/plomrogue/game.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new/plomrogue/game.py b/new/plomrogue/game.py index ffedbfa..7275ce9 100755 --- a/new/plomrogue/game.py +++ b/new/plomrogue/game.py @@ -175,7 +175,7 @@ class Game(GameBase): def task_prefixed(command_name, task_prefix, task_command, argtypes_prefix=None): - if command_name[:len(task_prefix)] == task_prefix: + if command_name.startswith(task_prefix): task_name = command_name[len(task_prefix):] if task_name in self.tasks: f = partial_with_attrs(task_command, task_name, self) -- 2.30.2