pub struct Loot {
pub id: LootId,
pub anchor: AnchorId,
pub items: Vec<LootItem>,
}Expand description
A stage-5 container fill (DSL v0.6, spec-0021): contents for a chest or barrel the prefab already placed.
The container is hardware the prefab authored, exactly like a trap’s
dispenser: this declaration gives an already-placed, already-lit, already
composed piece of furniture its contents. The compiler never places the
container itself — if the anchor’s cell does not already hold one, that is a
content defect and a build error (DW0431), not something to paper over by
setblock-ing a chest into a wall.
Fields§
§id: LootIdUnique loot id (loot/<kebab>).
anchor: AnchorIdThe anchor whose cell holds the container to fill.
items: Vec<LootItem>Contents, in declaration order. Slot assignment is positional and
deterministic — the first entry lands in container.0, the second in
container.1, and so on (ADR-0006: no RNG, no loot tables).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Loot
impl<'de> Deserialize<'de> for Loot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Loot
impl JsonSchema for Loot
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more