mud_server.core.world_registry
World registry and loader for multi-world support.
The registry is responsible for: - Listing available worlds from the database catalog - Filtering worlds by user permissions - Loading world packages from disk on demand - Caching World instances for reuse
Classes
World registry with lazy-loading and permission filtering. |
Module Contents
- class mud_server.core.world_registry.WorldRegistry(*, worlds_root=None)[source]
World registry with lazy-loading and permission filtering.
This class centralizes access to worlds and avoids repeated disk loads by caching World instances in memory.
- list_worlds_for_user(user_id, *, role=None, include_inactive=False)[source]
Return worlds accessible to the given user.
- get_world(world_id)[source]
Load and return the World for the given world_id.
- Raises:
ValueError – If the world does not exist or is inactive.