From 62e74144f9453a1adf3d0d2e9f4572cc1ae6f01c Mon Sep 17 00:00:00 2001 From: BigJMoney Date: Tue, 6 Jun 2017 10:09:31 -0400 Subject: [PATCH 1/4] Docstring typo fixes in evennia_runner and evennia_launcher --- evennia/server/evennia_launcher.py | 4 ++-- evennia/server/evennia_runner.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/evennia/server/evennia_launcher.py b/evennia/server/evennia_launcher.py index 96db22fd18..e13ff6bcc9 100644 --- a/evennia/server/evennia_launcher.py +++ b/evennia/server/evennia_launcher.py @@ -161,7 +161,7 @@ ERROR_SETTINGS = \ 1) You are not running this command from your game directory. Change directory to your game directory and try again (or create a new game directory using evennia --init ) - 2) The ettings file contains a syntax error. If you see a + 2) The settings file contains a syntax error. If you see a traceback above, review it, resolve the problem and try again. 3) Django is not correctly installed. This usually shows as errors mentioning 'DJANGO_SETTINGS_MODULE'. If you run a @@ -315,7 +315,7 @@ ERROR_LOGDIR_MISSING = \ will be created automatically). (Explanation: Evennia creates the log directory automatically when - initializating a new game directory. This error usually happens if + initializing a new game directory. This error usually happens if you used git to clone a pre-created game directory - since log files are in .gitignore they will not be cloned, which leads to the log directory also not being created.) diff --git a/evennia/server/evennia_runner.py b/evennia/server/evennia_runner.py index d963f8dd21..7fcb271a32 100644 --- a/evennia/server/evennia_runner.py +++ b/evennia/server/evennia_runner.py @@ -3,7 +3,7 @@ This runner is controlled by the evennia launcher and should normally not be launched directly. It manages the two main Evennia processes -(Server and Portal) and most importanly runs a passive, threaded loop +(Server and Portal) and most importantly runs a passive, threaded loop that makes sure to restart Server whenever it shuts down. Since twistd does not allow for returning an optional exit code we @@ -137,7 +137,7 @@ def cycle_logfile(logfile): def start_services(server_argv, portal_argv, doexit=False): """ - This calls a threaded loop that launces the Portal and Server + This calls a threaded loop that launches the Portal and Server and then restarts them when they finish. """ global SERVER, PORTAL From b7f6fe5bc16e9d6d26dc3eb6d0d94f07750c61fc Mon Sep 17 00:00:00 2001 From: BigJMoney Date: Tue, 6 Jun 2017 14:49:49 -0400 Subject: [PATCH 2/4] Fix a couple typos and improve consistency of builder command argument text (in help and doc strings) --- evennia/commands/default/building.py | 61 +++++++++++++++------------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/evennia/commands/default/building.py b/evennia/commands/default/building.py index 9045b1155d..26b7e02494 100644 --- a/evennia/commands/default/building.py +++ b/evennia/commands/default/building.py @@ -184,7 +184,8 @@ class CmdCopy(ObjManipCommand): copy an object and its properties Usage: - @copy[/reset] [= new_name][;alias;alias..][:new_location] [,new_name2 ...] + @copy[/reset] [= ][;alias;alias..][ + :] [, ...] switch: reset - make a 'clean' copy off the object, thus @@ -205,7 +206,8 @@ class CmdCopy(ObjManipCommand): caller = self.caller args = self.args if not args: - caller.msg("Usage: @copy [=new_name[;alias;alias..]][:new_location] [, new_name2...]") + caller.msg("Usage: @copy [=[;alias;alias..]][" + ":] [, ...]") return if not self.rhs: @@ -446,7 +448,7 @@ class CmdCreate(ObjManipCommand): create new objects Usage: - @create[/drop] objname[;alias;alias...][:typeclass], objname... + @create[/drop] [;alias;alias...][:typeclass], ... switch: drop - automatically drop the new object into your current @@ -684,9 +686,9 @@ class CmdDig(ObjManipCommand): build new rooms and connect them to the current location Usage: - @dig[/switches] roomname[;alias;alias...][:typeclass] - [= exit_to_there[;alias][:typeclass]] - [, exit_to_here[;alias][:typeclass]] + @dig[/switches] [;alias;alias...][:typeclass] + [= [;alias][:typeclass]] + [, [;alias][:typeclass]] Switches: tel or teleport - move yourself to the new room @@ -718,9 +720,10 @@ class CmdDig(ObjManipCommand): caller = self.caller if not self.lhs: - string = "Usage: @dig[/teleport] roomname[;alias;alias...][:parent] [= exit_there" + string = "Usage: @dig[/teleport] [;alias;alias...][" \ + ":parent] [= " string += "[;alias;alias..][:parent]] " - string += "[, exit_back_here[;alias;alias..][:parent]]" + string += "[, [;alias;alias..][:parent]]" caller.msg(string) return @@ -823,7 +826,7 @@ class CmdTunnel(COMMAND_DEFAULT_CLASS): create new rooms in cardinal directions only Usage: - @tunnel[/switch] [= roomname[;alias;alias;...][:typeclass]] + @tunnel[/switch] [= [;alias;alias;...][:typeclass]] Switches: oneway - do not create an exit back to the current location @@ -868,7 +871,8 @@ class CmdTunnel(COMMAND_DEFAULT_CLASS): "Implements the tunnel command" if not self.args or not self.lhs: - string = "Usage: @tunnel[/switch] [= roomname[;alias;alias;...][:typeclass]]" + string = "Usage: @tunnel[/switch] [= [" \ + ";alias;alias;...][:typeclass]]" self.caller.msg(string) return if self.lhs not in self.directions: @@ -1025,7 +1029,7 @@ class CmdSetHome(CmdLink): set an object's home location Usage: - @home [= home_location] + @home [= ] The "home" location is a "safety" location for objects; they will be moved there if their current location ceases to exist. All @@ -1043,7 +1047,7 @@ class CmdSetHome(CmdLink): def func(self): "implement the command" if not self.args: - string = "Usage: @home [= home_location]" + string = "Usage: @home [= ]" self.caller.msg(string) return @@ -1077,7 +1081,7 @@ class CmdListCmdSets(COMMAND_DEFAULT_CLASS): list command sets defined on an object Usage: - @cmdsets [obj] + @cmdsets This displays all cmdsets assigned to a user. Defaults to yourself. @@ -1106,7 +1110,7 @@ class CmdName(ObjManipCommand): change the name and/or aliases of an object Usage: - @name obj = name;alias1;alias2 + @name = ;alias1;alias2 Rename an object to something new. Use *obj to rename a player. @@ -1323,7 +1327,7 @@ def _convert_from_string(cmd, strobj): Python 2.6 and later: Supports all Python structures through literal_eval as long as they are valid Python syntax. If they are not (such as [test, test2], ie - withtout the quotes around the strings), the entire structure will + without the quotes around the strings), the entire structure will be converted to a string and a warning will be given. We need to convert like this since all data being sent over the @@ -1388,7 +1392,7 @@ class CmdSetAttribute(ObjManipCommand): @set / = @set / = @set / - @set */attr = + @set */ = Switch: edit: Open the line editor (string values only) @@ -1399,7 +1403,7 @@ class CmdSetAttribute(ObjManipCommand): (if any). The most common data to save with this command are strings and - numbers. You can however also set Python primities such as lists, + numbers. You can however also set Python primitives such as lists, dictionaries and tuples on objects (this might be important for the functionality of certain custom objects). This is indicated by you starting your value with one of |c'|n, |c"|n, |c(|n, |c[|n @@ -1558,7 +1562,7 @@ class CmdTypeclass(COMMAND_DEFAULT_CLASS): set or change an object's typeclass Usage: - @typclass[/switch] [= ] + @typeclass[/switch] [= typeclass_path] @type '' @parent '' @swap - this is a shorthand for using /force/reset flags. @@ -1575,7 +1579,7 @@ class CmdTypeclass(COMMAND_DEFAULT_CLASS): Example: @type button = examples.red_button.RedButton - If the typeclass.path is not given, the current object's + If the typeclass_path is not given, the current object's typeclass is assumed. View or set an object's typeclass. If setting, the creation hooks @@ -1604,7 +1608,7 @@ class CmdTypeclass(COMMAND_DEFAULT_CLASS): caller = self.caller if not self.args: - caller.msg("Usage: %s [= [= typeclass]" % self.cmdstring) return # get object to swap on @@ -1675,7 +1679,7 @@ class CmdWipe(ObjManipCommand): clear all attributes from an object Usage: - @wipe [/attribute[/attribute...]] + @wipe [/[/...]] Example: @wipe box @@ -1696,7 +1700,7 @@ class CmdWipe(ObjManipCommand): caller = self.caller if not self.args: - caller.msg("Usage: @wipe [/attribute/attribute...]") + caller.msg("Usage: @wipe [//...]") return # get the attributes set by our custom parser @@ -1728,7 +1732,7 @@ class CmdLock(ObjManipCommand): Usage: @lock [ = ] or - @lock[/switch] object/ + @lock[/switch] / Switch: del - delete given access type @@ -1748,7 +1752,7 @@ class CmdLock(ObjManipCommand): an object locked with this string will only be possible to pick up by Wizards or by object with id 25. - You can add several access_types after oneanother by separating + You can add several access_types after one another by separating them by ';', i.e: 'get:id(25);delete:perm(Builders)' """ @@ -1762,7 +1766,8 @@ class CmdLock(ObjManipCommand): caller = self.caller if not self.args: - string = "@lock [ = ] or @lock[/switch] object/" + string = "@lock [ = ] or @lock[/switch] " \ + "/" caller.msg(string) return @@ -2335,7 +2340,7 @@ class CmdScript(COMMAND_DEFAULT_CLASS): attach a script to an object Usage: - @script[/switch] [= ] + @script[/switch] [= script_path or ] Switches: start - start all non-running scripts on object, or a given script only @@ -2361,7 +2366,7 @@ class CmdScript(COMMAND_DEFAULT_CLASS): caller = self.caller if not self.args: - string = "Usage: @script[/switch] [= ]" + string = "Usage: @script[/switch] [= script_path or