WorldContainer ​
Inherits: Node3D
Lightweight coordinator for world management Handles world transitions and delegates object queries to the current WorldScene
Variables ​
ObjectRegistry | object_registry | |
PartyManager | party_manager | |
ChronoManager | chrono_manager | |
WorldScene | current_world_scene | null : |
WorldData | current_world_data | |
bool | is_loading_world | false |
Dictionary | persistent_worlds_cache | {} |
Dictionary | session_worlds_cache | {} |
FogOfWarSystem | fog_of_war_system | null |
Dictionary | fog_exploration_cache | {} |
WeatherSystem | weather_system | |
ZoneTracker | zone_tracker | |
ZoneLookDriver | zone_look_driver |
Methods ​
void | load_world( system_hub: GameHost.SystemHub, world_data: WorldData, pending_spawn_override: Dictionary = {}, loading_screen: LoadingScreen = null ) |
void | unload_current_world() |
void | apply_world_environment_overrides( system_hub: GameHost.SystemHub, world_data: WorldData ) |
void | position_party_at_spawn( world_data: WorldData, pending_spawn_override: Dictionary ) |
InteractableObject | find_rabbit_hole_by_unique_id( unique_id: int ) |
int | get_current_world_id() |
WorldData | get_current_world_data() |
WorldScene | get_current_world_scene() |
bool | is_loading() |
Dictionary | to_save_data() |
void | from_save_data( save_data: Dictionary ) |
void | reset_session_state() |
void | clear_fog_exploration_cache() |
bool | is_fog_of_war_active() |
GameplayConfig.FogState | get_fog_state_at_position( world_position: Vector3 ) |
Signals ​
world_loading_started( world_data: WorldData ) ​
Emitted when a new world starts loading
world_loading_finished( world_scene: WorldScene ) ​
Emitted when a new world finishes loading
world_unloaded( world_data: WorldData ) ​
Emitted when a world is unloaded
Variable descriptions ​
ObjectRegistry object_registry ​
Entity & Object Managment system
PartyManager party_manager ​
PartyManager refrence
ChronoManager chrono_manager ​
ChronoManager reference for time-based logic
WorldScene current_world_scene = null : ​
Reference to the currently loaded WorldScene
WorldData current_world_data ​
Reference to the current world's data
bool is_loading_world = false ​
Whether we're currently loading a world
Dictionary persistent_worlds_cache = ​
Runtime cache for persistent worlds (survives transitions, saved in main save)
Dictionary session_worlds_cache = ​
Runtime cache for the worlds that only last the session (SESSION_ONLY): remembered while the game runs, never written to a save
FogOfWarSystem fog_of_war_system = null ​
The fog of war system for the current world
Dictionary fog_exploration_cache = ​
Cache of fog exploration data per world (persists across world transitions) Key: world_id (int), Value: FogExplorationData
WeatherSystem weather_system ​
Weather system
ZoneTracker zone_tracker ​
Watches which zone the party is in (the events, the condition, the banner and the text tokens ask it)
ZoneLookDriver zone_look_driver ​
Gives the party the sky and the environment of the zone it is in.
Method descriptions ​
void load_world( system_hub: GameHost.SystemHub, world_data: WorldData, pending_spawn_override: Dictionary = {}, loading_screen: LoadingScreen = null ) ​
Load a world using WorldData
void unload_current_world() ​
Unload the current world
void apply_world_environment_overrides( system_hub: GameHost.SystemHub, world_data: WorldData ) ​
Applies the environment of a world (its sky, light, weather), the override of the world or the default one.
void position_party_at_spawn( world_data: WorldData, pending_spawn_override: Dictionary ) ​
Places the party at the spawn point of the world (or the spawn override of a world change). Called when the world is loaded, and again when a new game creates its party.
InteractableObject find_rabbit_hole_by_unique_id( unique_id: int ) ​
Find rabbit hole by unique ID (delegates to WorldScene)
int get_current_world_id() ​
Get current world ID
WorldData get_current_world_data() ​
Get current world data
WorldScene get_current_world_scene() ​
Get current world scene
bool is_loading() ​
Check if currently loading a world
Dictionary to_save_data() ​
Save current game state (called by SaveLoadUtil.save_game)
void from_save_data( save_data: Dictionary ) ​
Load game state (called by SaveLoadUtil.load_game)
void reset_session_state() ​
A new game starts without what the last game left behind: the remembered worlds and the explored fog
void clear_fog_exploration_cache() ​
Clear fog exploration cache (for new game)
bool is_fog_of_war_active() ​
Check if fog of war is active
GameplayConfig.FogState get_fog_state_at_position( world_position: Vector3 ) ​
Get fog state at a world position