Add PROTOTYPE_MODULES to settings_default, making use of world/prototypes.py already being defined.

This commit is contained in:
Griatch 2016-09-13 18:03:50 +02:00
parent e6e61aa5e6
commit 5a5884f6da
3 changed files with 12 additions and 7 deletions

View file

@ -2588,9 +2588,9 @@ class CmdSpawn(COMMAND_DEFAULT_CLASS):
def _show_prototypes(prototypes): def _show_prototypes(prototypes):
"Helper to show a list of available prototypes" "Helper to show a list of available prototypes"
string = "\nAvailable prototypes:\n %s" prots = ", ".join(sorted(prototypes.keys()))
string = string % utils.fill(", ".join(sorted(prototypes.keys()))) return "\nAvailable prototypes (case sensistive): %s" % \
return string ("\n" + utils.fill(prots) if prots else "None")
prototypes = spawn(return_prototypes=True) prototypes = spawn(return_prototypes=True)
if not self.args: if not self.args:

View file

@ -38,8 +38,6 @@ See the `@spawn` command and `evennia.utils.spawner` for more info.
#from random import randint #from random import randint
# #
#NOBODY = {}
#
#GOBLIN = { #GOBLIN = {
# "key": "goblin grunt", # "key": "goblin grunt",
# "health": lambda: randint(20,30), # "health": lambda: randint(20,30),
@ -60,11 +58,16 @@ See the `@spawn` command and `evennia.utils.spawner` for more info.
# "attacks": ["short bow"] # "attacks": ["short bow"]
#} #}
# #
#ARCHWIZARD = { # This is an example of a prototype without a prototype
# (nor key) of its own, so it should normally only be
# used as a mix-in, as in the example of the goblin
# archwizard below.
#ARCHWIZARD_MIXIN = {
# "attacks": ["archwizard staff"], # "attacks": ["archwizard staff"],
# "spells": ["greater fire ball", "greater lighting"]
#} #}
# #
#GOBLIN_ARCHWIZARD = { #GOBLIN_ARCHWIZARD = {
# "key": "goblin archwizard", # "key": "goblin archwizard",
# "prototype" : ("GOBLIN_WIZARD", "ARCHWIZARD") # "prototype" : ("GOBLIN_WIZARD", "ARCHWIZARD_MIXIN")
#} #}

View file

@ -305,6 +305,8 @@ LOCK_FUNC_MODULES = ("evennia.locks.lockfuncs", "server.conf.lockfuncs",)
# will be loaded in order, meaning functions in later modules may overload # will be loaded in order, meaning functions in later modules may overload
# previous ones if having the same name. # previous ones if having the same name.
INPUT_FUNC_MODULES = ["evennia.server.inputfuncs", "server.conf.inputfuncs"] INPUT_FUNC_MODULES = ["evennia.server.inputfuncs", "server.conf.inputfuncs"]
# Modules that contain prototypes for use with the spawner mechanism.
PROTOTYPE_MODULES = ["world.prototypes"]
# Module holding settings/actions for the dummyrunner program (see the # Module holding settings/actions for the dummyrunner program (see the
# dummyrunner for more information) # dummyrunner for more information)
DUMMYRUNNER_SETTINGS_MODULE = "evennia.server.profiling.dummyrunner_settings" DUMMYRUNNER_SETTINGS_MODULE = "evennia.server.profiling.dummyrunner_settings"