From ec63d43905a4487839af55d41641c94e42b63ecc Mon Sep 17 00:00:00 2001 From: Vincent Le Goff Date: Mon, 13 Feb 2017 17:00:02 -0800 Subject: [PATCH] Add a check to not create a task to watch a script if the task already exists --- evennia/scripts/scripts.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/evennia/scripts/scripts.py b/evennia/scripts/scripts.py index 6764b2e7a8..08a8d4fb0d 100644 --- a/evennia/scripts/scripts.py +++ b/evennia/scripts/scripts.py @@ -170,6 +170,10 @@ class DefaultScript(ScriptBase): """ + if self.ndb._task and self.ndb._task.running: + # The task already exists, doesn't start it again + return + self.ndb._task = ExtendedLoopingCall(self._step_task) if self.db._paused_time: