Implement weather and time of day system
All checks were successful
Smoke tests / Build and smoke test (push) Successful in 1m20s
Smoke tests / Build and smoke test (pull_request) Successful in 1m24s

This commit is contained in:
AI Agent
2026-03-19 16:58:06 -06:00
parent 678543dd9a
commit 1f4955db82
9 changed files with 130 additions and 4 deletions

View File

@@ -77,6 +77,8 @@ pub struct RoomFile {
pub description: String,
#[serde(default)]
pub exits: HashMap<String, String>,
#[serde(default)]
pub outdoors: bool,
}
#[derive(Deserialize, Clone)]
@@ -413,6 +415,7 @@ pub struct Room {
pub exits: HashMap<String, String>,
pub npcs: Vec<String>,
pub objects: Vec<String>,
pub outdoors: bool,
}
#[derive(Clone)]
@@ -665,7 +668,7 @@ impl World {
load_entities_from_dir(&region_path.join("rooms"), &region_name, &mut |id, content| {
let rf: RoomFile = toml::from_str(content).map_err(|e| format!("Bad room {id}: {e}"))?;
rooms.insert(id.clone(), Room { id: id.clone(), region: region_name.clone(), name: rf.name, description: rf.description, exits: rf.exits, npcs: Vec::new(), objects: Vec::new() });
rooms.insert(id.clone(), Room { id: id.clone(), region: region_name.clone(), name: rf.name, description: rf.description, exits: rf.exits, npcs: Vec::new(), objects: Vec::new(), outdoors: rf.outdoors });
Ok(())
})?;