Some more minor refactorings, pertaining to #1176.
This commit is contained in:
parent
dd07ea294b
commit
7e4155d4cd
3 changed files with 7 additions and 8 deletions
|
|
@ -212,7 +212,6 @@ def import_cmdset(path, cmdsetobj, emit_to_obj=None, no_logging=False):
|
||||||
else:
|
else:
|
||||||
errstring = errstring.format(path=python_path, traceback=err, timestamp=logger.timeformat())
|
errstring = errstring.format(path=python_path, traceback=err, timestamp=logger.timeformat())
|
||||||
break
|
break
|
||||||
return None # an error
|
|
||||||
|
|
||||||
if errstring:
|
if errstring:
|
||||||
# returning an empty error cmdset
|
# returning an empty error cmdset
|
||||||
|
|
@ -224,7 +223,7 @@ def import_cmdset(path, cmdsetobj, emit_to_obj=None, no_logging=False):
|
||||||
err_cmdset = _ErrorCmdSet()
|
err_cmdset = _ErrorCmdSet()
|
||||||
err_cmdset.errmessage = errstring
|
err_cmdset.errmessage = errstring
|
||||||
return err_cmdset
|
return err_cmdset
|
||||||
|
return None # undefined error
|
||||||
|
|
||||||
# classes
|
# classes
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -183,11 +183,11 @@ EXAMPLE1_LEGEND = {("♣", "♠"): example1_build_forest,
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Add the necessary imports for your instructions here.
|
# Add the necessary imports for your instructions here.
|
||||||
from evennia import create_object
|
#from evennia import create_object
|
||||||
from typeclasses import rooms, exits
|
#from typeclasses import rooms, exits
|
||||||
from evennia.utils import utils
|
#from evennia.utils import utils
|
||||||
from random import randint
|
#from random import randint
|
||||||
import random
|
#import random
|
||||||
|
|
||||||
# This is the same layout as Example 1 but included are characters for exits.
|
# This is the same layout as Example 1 but included are characters for exits.
|
||||||
# We can use these characters to determine which rooms should be connected.
|
# We can use these characters to determine which rooms should be connected.
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ from os.path import join as osjoin
|
||||||
from importlib import import_module
|
from importlib import import_module
|
||||||
from inspect import ismodule, trace, getmembers, getmodule
|
from inspect import ismodule, trace, getmembers, getmodule
|
||||||
from collections import defaultdict, OrderedDict
|
from collections import defaultdict, OrderedDict
|
||||||
from twisted.internet import threads, defer, reactor
|
from twisted.internet import threads, reactor
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.utils.translation import ugettext as _
|
from django.utils.translation import ugettext as _
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue