From 60163184ad5bf2e3a77fc05a34653bd02d30bba4 Mon Sep 17 00:00:00 2001 From: Griatch Date: Mon, 9 Mar 2015 11:42:01 +0100 Subject: [PATCH] Some cleanups. --- evennia/scripts/scripts.py | 14 ++++++-------- evennia/utils/batchprocessors.py | 8 ++++---- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/evennia/scripts/scripts.py b/evennia/scripts/scripts.py index e74f2b56d..849c2cb7c 100644 --- a/evennia/scripts/scripts.py +++ b/evennia/scripts/scripts.py @@ -1,5 +1,5 @@ """ -This module contains the base Script class that all +This module contains the base DefaultScript class that all scripts are inheriting from. It also defines a few common scripts. @@ -7,12 +7,10 @@ It also defines a few common scripts. from twisted.internet.defer import Deferred, maybeDeferred from twisted.internet.task import LoopingCall -from django.conf import settings from django.utils.translation import ugettext as _ from evennia.typeclasses.models import TypeclassBase from evennia.scripts.models import ScriptDB from evennia.scripts.manager import ScriptManager -from evennia.comms import channelhandler from evennia.utils import logger __all__ = ["DefaultScript", "DoNothing", "Store"] @@ -112,7 +110,7 @@ class ExtendedLoopingCall(LoopingCall): class ScriptBase(ScriptDB): """ Base class for scripts. Don't inherit from this, inherit - from the class `Script` instead. + from the class `DefaultScript` below instead. """ __metaclass__ = TypeclassBase objects = ScriptManager() @@ -280,7 +278,7 @@ class ScriptBase(ScriptDB): def pause(self): """ This stops a running script and stores its active state. - It WILL NOT call that `at_stop()` hook. + It WILL NOT call the `at_stop()` hook. """ if not self.db._paused_time: # only allow pause if not already paused @@ -348,9 +346,9 @@ class ScriptBase(ScriptDB): class DefaultScript(ScriptBase): """ - This is the base TypeClass for all Scripts. Scripts describe events, - timers and states in game, they can have a time component or describe - a state that changes under certain conditions. + This is the base TypeClass for all Scripts. Scripts describe + events, timers and states in game, they can have a time component + or describe a state that changes under certain conditions. Script API: diff --git a/evennia/utils/batchprocessors.py b/evennia/utils/batchprocessors.py index 278ac7c1a..143d1697b 100644 --- a/evennia/utils/batchprocessors.py +++ b/evennia/utils/batchprocessors.py @@ -1,5 +1,5 @@ """ -This file contains the core methods for the Batch-command- and +This module contains the core methods for the Batch-command- and Batch-code-processors respectively. In short, these are two different ways to build a game world using a normal text-editor without having to do so 'on the fly' in-game. They also serve as an automatic backup @@ -107,7 +107,7 @@ allows them to the executed in blocks. This way of working assures a sequential execution of the file and allows for features like stepping from block to block (without executing those coming before), as well as automatic deletion of created objects etc. You can however also run -a batch-code Python file directly using Python (and can also be de). +a batch-code Python file directly using Python. Code blocks are separated by python comments starting with special code words. @@ -315,8 +315,8 @@ class BatchCodeProcessor(object): 3) #CODE headers may be of the following form: #CODE (info) objname, objname2, ... 4) Lines starting with #INSERT are on form #INSERT filename. - 3) All lines outside blocks are stripped. - 4) All excess whitespace beginning/ending a block is stripped. + 5) All lines outside blocks are stripped. + 6) All excess whitespace beginning/ending a block is stripped. """