mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Update CHANGELOG, pep8 fixes
This commit is contained in:
parent
0b6d869902
commit
b6b07ccdb5
10 changed files with 290 additions and 264 deletions
|
|
@ -323,31 +323,31 @@ class DefaultScript(ScriptBase):
|
|||
or describe a state that changes under certain conditions.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
@classmethod
|
||||
def create(cls, key, **kwargs):
|
||||
"""
|
||||
Provides a passthrough interface to the utils.create_script() function.
|
||||
|
||||
|
||||
Args:
|
||||
key (str): Name of the new object.
|
||||
|
||||
|
||||
Returns:
|
||||
object (Object): A newly created object of the given typeclass.
|
||||
errors (list): A list of errors in string form, if any.
|
||||
|
||||
|
||||
"""
|
||||
errors = []
|
||||
obj = None
|
||||
|
||||
|
||||
kwargs['key'] = key
|
||||
|
||||
|
||||
try:
|
||||
obj = create.create_script(**kwargs)
|
||||
except Exception as e:
|
||||
errors.append("The script '%s' encountered errors and could not be created." % key)
|
||||
logger.log_err(e)
|
||||
|
||||
|
||||
return obj, errors
|
||||
|
||||
def at_script_creation(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue