Merge pull request #2779 from cfcohen/devedits
Typos from master, plus a couple more.
This commit is contained in:
commit
515c7e21fe
9 changed files with 24 additions and 24 deletions
|
|
@ -678,7 +678,7 @@ class DefaultAccount(AccountDB, metaclass=TypeclassBase):
|
||||||
typeclass (str, optional): Typeclass to use for this character. If
|
typeclass (str, optional): Typeclass to use for this character. If
|
||||||
not given, use settings.BASE_CHARACTER_TYPECLASS.
|
not given, use settings.BASE_CHARACTER_TYPECLASS.
|
||||||
permissions (list, optional): If not given, use the account's permissions.
|
permissions (list, optional): If not given, use the account's permissions.
|
||||||
ip (str, optiona): The client IP creating this character. Will fall back to the
|
ip (str, optional): The client IP creating this character. Will fall back to the
|
||||||
one stored for the account if not given.
|
one stored for the account if not given.
|
||||||
kwargs (any): Other kwargs will be used in the create_call.
|
kwargs (any): Other kwargs will be used in the create_call.
|
||||||
Returns:
|
Returns:
|
||||||
|
|
@ -955,7 +955,7 @@ class DefaultAccount(AccountDB, metaclass=TypeclassBase):
|
||||||
kwargs (any): Other keyword arguments will be added to the
|
kwargs (any): Other keyword arguments will be added to the
|
||||||
found command object instance as variables before it
|
found command object instance as variables before it
|
||||||
executes. This is unused by default Evennia but may be
|
executes. This is unused by default Evennia but may be
|
||||||
used to set flags and change operating paramaters for
|
used to set flags and change operating parameters for
|
||||||
commands at run-time.
|
commands at run-time.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
@ -1433,7 +1433,7 @@ class DefaultAccount(AccountDB, metaclass=TypeclassBase):
|
||||||
self._send_to_connect_channel(_("|G{key} connected|n").format(key=self.key))
|
self._send_to_connect_channel(_("|G{key} connected|n").format(key=self.key))
|
||||||
if _MULTISESSION_MODE == 0:
|
if _MULTISESSION_MODE == 0:
|
||||||
# in this mode we should have only one character available. We
|
# in this mode we should have only one character available. We
|
||||||
# try to auto-connect to our last conneted object, if any
|
# try to auto-connect to our last connected object, if any
|
||||||
try:
|
try:
|
||||||
self.puppet_object(session, self.db._last_puppet)
|
self.puppet_object(session, self.db._last_puppet)
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
|
|
@ -1460,7 +1460,7 @@ class DefaultAccount(AccountDB, metaclass=TypeclassBase):
|
||||||
"""
|
"""
|
||||||
Called by the login process if a user account is targeted correctly
|
Called by the login process if a user account is targeted correctly
|
||||||
but provided with an invalid password. By default it does nothing,
|
but provided with an invalid password. By default it does nothing,
|
||||||
but exists to be overriden.
|
but exists to be overridden.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
session (session): Session logging in.
|
session (session): Session logging in.
|
||||||
|
|
@ -1703,7 +1703,7 @@ class DefaultGuest(DefaultAccount):
|
||||||
Gets or creates a Guest account object.
|
Gets or creates a Guest account object.
|
||||||
|
|
||||||
Keyword Args:
|
Keyword Args:
|
||||||
ip (str, optional): IP address of requestor; used for ban checking,
|
ip (str, optional): IP address of requester; used for ban checking,
|
||||||
throttling and logging
|
throttling and logging
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
|
||||||
|
|
@ -1071,7 +1071,7 @@ class CmdTunnel(COMMAND_DEFAULT_CLASS):
|
||||||
exitname, backshort = self.directions[exitshort]
|
exitname, backshort = self.directions[exitshort]
|
||||||
backname = self.directions[backshort][0]
|
backname = self.directions[backshort][0]
|
||||||
|
|
||||||
# if we recieved a typeclass for the exit, add it to the alias(short name)
|
# if we received a typeclass for the exit, add it to the alias(short name)
|
||||||
if ":" in self.lhs:
|
if ":" in self.lhs:
|
||||||
# limit to only the first : character
|
# limit to only the first : character
|
||||||
exit_typeclass = ":" + self.lhs.split(":", 1)[-1]
|
exit_typeclass = ":" + self.lhs.split(":", 1)[-1]
|
||||||
|
|
@ -1665,7 +1665,7 @@ class CmdSetAttribute(ObjManipCommand):
|
||||||
def split_nested_attr(self, attr):
|
def split_nested_attr(self, attr):
|
||||||
"""
|
"""
|
||||||
Yields tuples of (possible attr name, nested keys on that attr).
|
Yields tuples of (possible attr name, nested keys on that attr).
|
||||||
For performance, this is biased to the deepest match, but allows compatability
|
For performance, this is biased to the deepest match, but allows compatibility
|
||||||
with older attrs that might have been named with `[]`'s.
|
with older attrs that might have been named with `[]`'s.
|
||||||
|
|
||||||
> list(split_nested_attr("nested['asdf'][0]"))
|
> list(split_nested_attr("nested['asdf'][0]"))
|
||||||
|
|
@ -2832,7 +2832,7 @@ class CmdExamine(ObjManipCommand):
|
||||||
objdata["Stored Cmdset(s)"] = self.format_stored_cmdsets(obj)
|
objdata["Stored Cmdset(s)"] = self.format_stored_cmdsets(obj)
|
||||||
objdata["Merged Cmdset(s)"] = self.format_merged_cmdsets(obj, current_cmdset)
|
objdata["Merged Cmdset(s)"] = self.format_merged_cmdsets(obj, current_cmdset)
|
||||||
objdata[
|
objdata[
|
||||||
f"Commands vailable to {obj.key} (result of Merged Cmdset(s))"
|
f"Commands available to {obj.key} (result of Merged Cmdset(s))"
|
||||||
] = self.format_current_cmds(obj, current_cmdset)
|
] = self.format_current_cmds(obj, current_cmdset)
|
||||||
if self.object_type == "script":
|
if self.object_type == "script":
|
||||||
objdata["Description"] = self.format_script_desc(obj)
|
objdata["Description"] = self.format_script_desc(obj)
|
||||||
|
|
@ -4031,7 +4031,7 @@ class CmdSpawn(COMMAND_DEFAULT_CLASS):
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
# we homogenize the protoype first, to be more lenient with free-form
|
# we homogenize the prototype first, to be more lenient with free-form
|
||||||
protlib.validate_prototype(protlib.homogenize_prototype(prototype))
|
protlib.validate_prototype(protlib.homogenize_prototype(prototype))
|
||||||
except RuntimeError as err:
|
except RuntimeError as err:
|
||||||
self.caller.msg(str(err))
|
self.caller.msg(str(err))
|
||||||
|
|
|
||||||
|
|
@ -1818,7 +1818,7 @@ class CmdRSS2Chan(COMMAND_DEFAULT_CLASS):
|
||||||
|
|
||||||
class CmdGrapevine2Chan(COMMAND_DEFAULT_CLASS):
|
class CmdGrapevine2Chan(COMMAND_DEFAULT_CLASS):
|
||||||
"""
|
"""
|
||||||
Link an Evennia channel to an exteral Grapevine channel
|
Link an Evennia channel to an external Grapevine channel
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
grapevine2chan[/switches] <evennia_channel> = <grapevine_channel>
|
grapevine2chan[/switches] <evennia_channel> = <grapevine_channel>
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ class CmdHelp(COMMAND_DEFAULT_CLASS):
|
||||||
help <topic>/<subtopic>/<subsubtopic> ...
|
help <topic>/<subtopic>/<subsubtopic> ...
|
||||||
|
|
||||||
Use the 'help' command alone to see an index of all help topics, organized
|
Use the 'help' command alone to see an index of all help topics, organized
|
||||||
by category.eSome big topics may offer additional sub-topics.
|
by category. Some big topics may offer additional sub-topics.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -138,7 +138,7 @@ class CmdHelp(COMMAND_DEFAULT_CLASS):
|
||||||
click_topics=True,
|
click_topics=True,
|
||||||
):
|
):
|
||||||
"""This visually formats the help entry.
|
"""This visually formats the help entry.
|
||||||
This method can be overriden to customize the way a help
|
This method can be overridden to customize the way a help
|
||||||
entry is displayed.
|
entry is displayed.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# world/
|
# world/
|
||||||
|
|
||||||
This folder is meant as a miscellanous folder for all that other stuff
|
This folder is meant as a miscellaneous folder for all that other stuff
|
||||||
related to the game. Code which are not commands or typeclasses go
|
related to the game. Code which are not commands or typeclasses go
|
||||||
here, like custom economy systems, combat code, batch-files etc.
|
here, like custom economy systems, combat code, batch-files etc.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ Possible keywords are:
|
||||||
- `prototype_key` - the name of the prototype. This is required for db-prototypes,
|
- `prototype_key` - the name of the prototype. This is required for db-prototypes,
|
||||||
for module-prototypes, the global variable name of the dict is used instead
|
for module-prototypes, the global variable name of the dict is used instead
|
||||||
- `prototype_parent` - string pointing to parent prototype if any. Prototype inherits
|
- `prototype_parent` - string pointing to parent prototype if any. Prototype inherits
|
||||||
in a similar way as classes, with children overriding values in their partents.
|
in a similar way as classes, with children overriding values in their parents.
|
||||||
- `key` - string, the main object identifier.
|
- `key` - string, the main object identifier.
|
||||||
- `typeclass` - string, if not set, will use `settings.BASE_OBJECT_TYPECLASS`.
|
- `typeclass` - string, if not set, will use `settings.BASE_OBJECT_TYPECLASS`.
|
||||||
- `location` - this should be a valid object or #dbref.
|
- `location` - this should be a valid object or #dbref.
|
||||||
|
|
@ -42,7 +42,7 @@ Possible keywords are:
|
||||||
of the shorter forms, defaults are used for the rest.
|
of the shorter forms, defaults are used for the rest.
|
||||||
- `tags` - Tags, as a list of tuples `(tag,)`, `(tag, category)` or `(tag, category, data)`.
|
- `tags` - Tags, as a list of tuples `(tag,)`, `(tag, category)` or `(tag, category, data)`.
|
||||||
- Any other keywords are interpreted as Attributes with no category or lock.
|
- Any other keywords are interpreted as Attributes with no category or lock.
|
||||||
These will internally be added to `attrs` (eqivalent to `(attrname, value)`.
|
These will internally be added to `attrs` (equivalent to `(attrname, value)`.
|
||||||
|
|
||||||
See the `spawn` command and `evennia.prototypes.spawner.spawn` for more info.
|
See the `spawn` command and `evennia.prototypes.spawner.spawn` for more info.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -683,7 +683,7 @@ class ServerSessionHandler(SessionHandler):
|
||||||
Get a unique list of connected and logged-in Accounts.
|
Get a unique list of connected and logged-in Accounts.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
accounts (list): All conected Accounts (which may be fewer than the
|
accounts (list): All connected Accounts (which may be fewer than the
|
||||||
amount of Sessions due to multi-playing).
|
amount of Sessions due to multi-playing).
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ class EvMore(object):
|
||||||
justify (bool, optional): If set, auto-justify long lines. This must be turned
|
justify (bool, optional): If set, auto-justify long lines. This must be turned
|
||||||
off for fixed-width or formatted output, like tables. It's force-disabled
|
off for fixed-width or formatted output, like tables. It's force-disabled
|
||||||
if `inp` is an EvTable.
|
if `inp` is an EvTable.
|
||||||
justify_kwargs (dict, optional): Keywords for the justifiy function. Used only
|
justify_kwargs (dict, optional): Keywords for the justify function. Used only
|
||||||
if `justify` is True. If this is not set, default arguments will be used.
|
if `justify` is True. If this is not set, default arguments will be used.
|
||||||
exit_on_lastpage (bool, optional): If reaching the last page without the
|
exit_on_lastpage (bool, optional): If reaching the last page without the
|
||||||
page being completely filled, exit pager immediately. If unset,
|
page being completely filled, exit pager immediately. If unset,
|
||||||
|
|
@ -507,7 +507,7 @@ class EvMore(object):
|
||||||
def page_formatter(self, page):
|
def page_formatter(self, page):
|
||||||
"""
|
"""
|
||||||
Page formatter. Every page passes through this method. Override
|
Page formatter. Every page passes through this method. Override
|
||||||
it to customize behvaior per-page. A common use is to generate a new
|
it to customize behavior per-page. A common use is to generate a new
|
||||||
EvTable for every page (this is more efficient than to generate one huge
|
EvTable for every page (this is more efficient than to generate one huge
|
||||||
EvTable across many pages and feed it into EvMore all at once).
|
EvTable across many pages and feed it into EvMore all at once).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -819,7 +819,7 @@ def latinify(string, default="?", pure_ascii=False):
|
||||||
This is used as a last resort when normal encoding does not work.
|
This is used as a last resort when normal encoding does not work.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
string (str): A string to convert to 'safe characters' convertable
|
string (str): A string to convert to 'safe characters' convertible
|
||||||
to an latin-1 bytestring later.
|
to an latin-1 bytestring later.
|
||||||
default (str, optional): Characters resisting mapping will be replaced
|
default (str, optional): Characters resisting mapping will be replaced
|
||||||
with this character or string. The intent is to apply an encode operation
|
with this character or string. The intent is to apply an encode operation
|
||||||
|
|
@ -1078,7 +1078,7 @@ def delay(timedelay, callback, *args, **kwargs):
|
||||||
Keep in mind that persistent tasks arguments and callback should not
|
Keep in mind that persistent tasks arguments and callback should not
|
||||||
use memory references.
|
use memory references.
|
||||||
If persistent is set to True the delay function will return an int
|
If persistent is set to True the delay function will return an int
|
||||||
which is the task's id itended for use with TASK_HANDLER's do_task
|
which is the task's id intended for use with TASK_HANDLER's do_task
|
||||||
and remove methods.
|
and remove methods.
|
||||||
All persistent tasks whose time delays have passed will be called on server startup.
|
All persistent tasks whose time delays have passed will be called on server startup.
|
||||||
|
|
||||||
|
|
@ -1531,12 +1531,12 @@ def class_from_module(path, defaultpaths=None, fallback=None):
|
||||||
defaultpaths (iterable, optional): If a direct import from `path` fails,
|
defaultpaths (iterable, optional): If a direct import from `path` fails,
|
||||||
try subsequent imports by prepending those paths to `path`.
|
try subsequent imports by prepending those paths to `path`.
|
||||||
fallback (str): If all other attempts fail, use this path as a fallback.
|
fallback (str): If all other attempts fail, use this path as a fallback.
|
||||||
This is intended as a last-resport. In the example of Evennia
|
This is intended as a last-resort. In the example of Evennia
|
||||||
loading, this would be a path to a default parent class in the
|
loading, this would be a path to a default parent class in the
|
||||||
evennia repo itself.
|
evennia repo itself.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
class (Class): An uninstatiated class recovered from path.
|
class (Class): An uninstantiated class recovered from path.
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
ImportError: If all loading failed.
|
ImportError: If all loading failed.
|
||||||
|
|
@ -1675,7 +1675,7 @@ def string_partial_matching(alternatives, inp, ret_index=True):
|
||||||
Matching is made from the start of each subword in each
|
Matching is made from the start of each subword in each
|
||||||
alternative. Case is not important. So e.g. "bi sh sw" or just
|
alternative. Case is not important. So e.g. "bi sh sw" or just
|
||||||
"big" or "shiny" or "sw" will match "Big shiny sword". Scoring is
|
"big" or "shiny" or "sw" will match "Big shiny sword". Scoring is
|
||||||
done to allow to separate by most common demoninator. You will get
|
done to allow to separate by most common denominator. You will get
|
||||||
multiple matches returned if appropriate.
|
multiple matches returned if appropriate.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|
@ -1749,7 +1749,7 @@ def format_table(table, extra_space=1):
|
||||||
|
|
||||||
ftable = format_table([[1,2,3], [4,5,6]])
|
ftable = format_table([[1,2,3], [4,5,6]])
|
||||||
string = ""
|
string = ""
|
||||||
for ir, row in enumarate(ftable):
|
for ir, row in enumerate(ftable):
|
||||||
if ir == 0:
|
if ir == 0:
|
||||||
# make first row white
|
# make first row white
|
||||||
string += "\\n|w" + "".join(row) + "|n"
|
string += "\\n|w" + "".join(row) + "|n"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue