mirror of
https://github.com/evennia/evennia.git
synced 2026-03-23 16:26:30 +01:00
Added method call to load module prototypes when searching if not already loaded
This commit is contained in:
parent
67d867b691
commit
f9b3b3b60a
1 changed files with 4 additions and 1 deletions
|
|
@ -31,7 +31,6 @@ from evennia.utils.funcparser import FuncParser
|
|||
from evennia.utils import dbserialize
|
||||
from evennia.utils.evtable import EvTable
|
||||
|
||||
|
||||
_MODULE_PROTOTYPE_MODULES = {}
|
||||
_MODULE_PROTOTYPES = {}
|
||||
_PROTOTYPE_META_NAMES = (
|
||||
|
|
@ -516,6 +515,10 @@ def search_prototype(key=None, tags=None, require_single=False, return_iterators
|
|||
be found as a match.
|
||||
|
||||
"""
|
||||
# This will load the prototypes the first time they are searched
|
||||
if not _MODULE_PROTOTYPE_MODULES:
|
||||
load_module_prototypes()
|
||||
|
||||
# prototype keys are always in lowecase
|
||||
if key:
|
||||
key = key.lower()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue