[BUG] GLOBAL_SCRIPTS
container no longer contains all global scripts
#3519
Labels
bug
An actual error or unwanted behavior.
Describe the bug
The current implementation of
GLOBAL_SCRIPTS
, i.e.GlobalScriptContainer
, does not actually contain all global scripts. It will only access global scripts that were defined in settings, rather than the previous and documented behavior of any global script.The container class is here: https://github.com/evennia/evennia/blob/main/evennia/utils/containers.py#L94
On reviewing the code, it's evident that the entire class is designed to only load those classes that were defined in the
GLOBAL_SCRIPTS
variable in the game's settings, and to only load them once on first access of the data.Expected behavior
Previous versions of
GLOBAL_SCRIPTS
would include all global scripts, regardless of creation method - according to the changelog, this was the case as of Evennia v0.9.5 - and the documentation here https://www.evennia.com/docs/latest/Components/Scripts.html#code-examples is written with the presumption of that behavior.The current state, therefore, is a dramatic and undocumented regression to pre-beta functionality which somehow was not caught.
Environment, Evennia version, OS etc
Evennia v4.1.1
The text was updated successfully, but these errors were encountered: