Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] GLOBAL_SCRIPTS container no longer contains all global scripts #3519

Open
InspectorCaracal opened this issue Apr 24, 2024 · 1 comment
Labels
bug An actual error or unwanted behavior.

Comments

@InspectorCaracal
Copy link
Contributor

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

@InspectorCaracal InspectorCaracal added bug An actual error or unwanted behavior. needs-triage Yet to be looked at and verified as an a real issue/feature that could be worked on labels Apr 24, 2024
@Griatch Griatch removed the needs-triage Yet to be looked at and verified as an a real issue/feature that could be worked on label Apr 27, 2024
@Griatch
Copy link
Member

Griatch commented Apr 27, 2024

Curious, the container was updated to be more intuitive after the original implementation, so it should hold all global scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An actual error or unwanted behavior.
Projects
None yet
Development

No branches or pull requests

2 participants