From c1234cb489b22628aa7e46779d089d31d7590dd3 Mon Sep 17 00:00:00 2001 From: ChrisLR Date: Sat, 19 Mar 2022 19:12:09 -0400 Subject: [PATCH] Consider prototypes loaded only when called on search --- evennia/prototypes/prototypes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/evennia/prototypes/prototypes.py b/evennia/prototypes/prototypes.py index 89422c1ff7..f9b6c564d3 100644 --- a/evennia/prototypes/prototypes.py +++ b/evennia/prototypes/prototypes.py @@ -528,8 +528,10 @@ def search_prototype( """ # This will load the prototypes the first time they are searched - if not _MODULE_PROTOTYPE_MODULES: + loaded = getattr(load_module_prototypes, '_LOADED', False) + if not loaded: load_module_prototypes() + setattr(load_module_prototypes, '_LOADED', True) # prototype keys are always in lowecase if key: