|
|
|
@ -9,12 +9,22 @@ use serde_derive::{Deserialize, Serialize};
|
|
|
|
|
use crate::id::Id;
|
|
|
|
|
use crate::world::{Area, AreaType};
|
|
|
|
|
|
|
|
|
|
/// A collection of rooms and/or other zones.
|
|
|
|
|
#[derive(Debug, Deserialize, Serialize)]
|
|
|
|
|
pub struct Zone {
|
|
|
|
|
/// Unique identifier for the zone
|
|
|
|
|
pub id: Id,
|
|
|
|
|
|
|
|
|
|
/// Identifier of the parent zone
|
|
|
|
|
pub parent: Id,
|
|
|
|
|
|
|
|
|
|
/// Name of the zone
|
|
|
|
|
pub name: String,
|
|
|
|
|
|
|
|
|
|
/// Whether players in the zone should be visible on where to the parent
|
|
|
|
|
pub users_visible: bool,
|
|
|
|
|
|
|
|
|
|
/// Areas contained inside this zone
|
|
|
|
|
pub areas: HashSet<Id>,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|