This commit is contained in:
Kelorastus
2026-09-28 11:19:02 +02:00
parent 21d6e6bffb
commit 73a8f2c30c
35 changed files with 1615 additions and 86 deletions
+18
View File
@@ -404,6 +404,11 @@ pub struct TileSet {
pub title: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// False when the store does not hold this item's bytes and never will. It is still
/// listed and described - an operator has to know it exists - but it arrives on a
/// drive, not over the network. Absent means true: everything else is downloadable.
#[serde(default = "carried", skip_serializing_if = "is_carried")]
pub on_dhp: bool,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
@@ -425,6 +430,19 @@ pub struct SrcFile {
pub title: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// See `TileSet::on_dhp`. The world height map source is the case this exists for: 705 GB
/// that no DHP will ever serve over a link, and that an operator still needs to know about.
#[serde(default = "carried", skip_serializing_if = "is_carried")]
pub on_dhp: bool,
}
/// An item says nothing when the store carries it, which is nearly always.
fn carried() -> bool {
true
}
fn is_carried(on_dhp: &bool) -> bool {
*on_dhp
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]