From: Christian Heller Date: Thu, 9 Jul 2020 23:07:31 +0000 (+0200) Subject: Simplify code. X-Git-Url: https://plomlompom.com/repos/do_tasks?a=commitdiff_plain;h=358f157718342374be169e8ba4308720e15d8467;p=plomrogue2-experiments Simplify code. --- 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)