delvewright-dsl 0.35.0

Staged JSON DSL types and schemas for Delvewright adventure-map campaigns — the format the delvec compiler reads.
Documentation
//! Delvewright DSL: serde types, validation, canonical serialization and JSON
//! Schema export for the staged campaign DSL (spec-0001).
//!
//! Entry points:
//! - [`parse_campaign`] / [`check_campaign`]: parse the six raw stage documents.
//! - [`validate_campaign`]: run all spec-0001 v0.2 rule groups on a parsed
//!   [`Campaign`], returning [`Diagnostic`]s (spec-0002 `--json` shape).
//! - [`to_canonical_string`]: the single canonical writer — pretty JSON put
//!   through [`fmt`], so what the compiler WRITES is what `delvec fmt --check`
//!   accepts. One canonical form, one implementation.
//! - [`fmt`]: that canonical form as a grammar-level formatter over any
//!   authored JSON (stage documents, l10n sidecars, prefab metadata).
//! - [`stage_schema`]: export a stage's JSON Schema.
//!
//! Determinism (ADR-0006): all iteration is over `BTreeMap`/`BTreeSet` or slices;
//! nothing depends on hash order, wall-clock, or absolute paths.

pub mod blocks;
pub mod blockshape;
pub mod canonical;
pub mod celestial;
pub mod chrome;
pub mod color;
pub mod design;
pub mod detailplan;
pub mod diagnostic;
pub mod effects;
pub mod envelope;
pub mod equipment;
pub mod fight;
pub mod firework;
/// **What a cell does when there is fluid beside it** — block knowledge, so it
/// lives beside [`blocks`] and [`blockshape`] rather than beside any one reader
/// of it. `delvewright_schem::fluid` re-exports it, and the prefab generators
/// reach it through their dependency on this crate: they may not depend on
/// `delvec`, and this is the crate every reader of a block fact can reach.
pub mod fluid;
pub mod fmt;
pub mod gate;
pub mod healthbar;
pub mod ids;
pub mod l10n;
pub mod layout;
pub mod license;
pub mod mclang;
pub mod metrics;
pub mod onkill;
pub mod perception;
pub mod placement;
pub mod prefab;
pub mod purchase;
pub mod registry;
pub mod rig;
pub mod schema;
pub mod siteplan;
pub mod split;
pub mod stages;
pub mod validate;

pub use canonical::to_canonical_string;
pub use celestial::{Body, CelestialTime, Clock, MoonPhase, Position};
pub use chrome::{Chrome, ChromeString, validate_chrome_namespace};
pub use design::{
    CONCEPT_DIR, DesignContent, IMAGE_EXTENSIONS, REFERENCE_DIR, REFERENCE_DIRS, Reference,
    is_image_extension,
};
pub use detailplan::{Detail, DetailPlanContent, FLOOR_COURSE, Frame, bound_places, is_bound};
pub use diagnostic::{Diagnostic, DwCode, ExitTier, Group, Severity, Subject, codes};
pub use effects::{
    EffectRootKind, EffectRootOwner, EffectRootSite, RootBinding, for_each_effect_root,
    for_each_effect_root_mut,
};
pub use envelope::{
    Campaign, DSL_VERSION, Envelope, RawCampaign, Stage, check_campaign, parse_campaign,
};
pub use equipment::{EquipmentBinding, Equippable, EquippableFact, PieceKind};
pub use fight::{Fight, FightKind, fights, quest_area, unleashed_actors, wave_area};
pub use firework::{FireworkExplosion, FireworkShape};
pub use gate::{Gate, GateBinding, GateConsumer, GateSite, for_each_gate};
pub use healthbar::{HealthBar, HealthBarBinding, health_bar_checks};
pub use ids::{
    ActorId, AmbushId, AnchorId, AreaId, AssemblyId, AtmosphereId, BranchId, BranchPointId,
    CampaignId, ClassId, DatumId, DialogueId, EdgeId, EditBatchId, EndingId, FactId, FlagId,
    LethalVolumeId, LoopId, NodeId, NpcId, ObjectiveId, PoolId, PrefabId, QuestId, RegionId, RigId,
    ShortcutId, StateId, TimedGateId, TriggerId, ViewId, VolumeId, WaveId,
};
pub use l10n::{
    ArtNarrate, CANONICAL_LANG, L10nDoc, L10nKind, MARKER_SIGIL, OptionLabel, ScreenNarrate,
    SoundRef, TR_SIGIL, TextKind, art_narrates, bonfire_option_labels, declared_mc_codes,
    dialogue_option_labels, each_string, has_tr_sigil, inventory as l10n_inventory, key_kind,
    key_situations, key_speaker, local_id, localize, namespace_skin_textures, on_screen_narrates,
    pack_key, pack_namespace, pack_texture_dir, pack_texture_id, plain as l10n_plain,
    play_sound_actor_refs, sound_refs, tag_translatables, untag as l10n_untag, validate_l10n,
    validate_l10n_provenance, validate_marker_channel, validate_tr_sigil,
};
pub use layout::{
    Beat, BriefFact, Closure, Direction, Edge, EdgeGating, GeometryBriefContent, Grant, Grants,
    LayoutBinding, LayoutGraphContent, OpensFrom, Station, StationKind,
};
pub use mclang::mc_lang_code;
pub use onkill::on_kill_checks;
pub use placement::{Placement, anchor_vocabulary_unknowable};
pub use prefab::PrefabMeta;
pub use purchase::{PurchaseBinding, purchase_checks};
pub use registry::{
    AnchorRegistry, BlockRegistry, EffectRegistry, EntityRegistry, ItemBackedBlockRegistry,
    ItemRegistry, Lighting, LightingProfile, VendoredAnchorRegistry, VendoredEffectRegistry,
    VendoredEntityRegistry, VendoredItemRegistry, is_potion_id, is_technical_block,
};
pub use schema::stage_schema;
pub use siteplan::{
    Axis, Ceiling, Cmp, Datum, ENTRY_ANCHOR, Face, Floor, Identity, Measure, Offset, PackedBox,
    PlanAxis, PlanBinding, PlanBox, Provenance, SITE_AREA, Seam, Sightline, SitePlanContent, View,
    Volume, VolumeRole, WorldBox, node_anchor, owed_anchors, placed_boxes, placed_seams,
    placements, refused_upstream, seam_anchor, seam_unlock_anchor, synthesized_anchor_kinds,
    synthesized_anchors, synthesized_gate_block,
};
pub use siteplan::{PlacedBox, PlacedSeam};
pub use stages::{
    Actor, Ambush, Area, AreaLighting, AreaMitigation, Assembly, AssemblyHitbox, AssemblyStrikes,
    Atmosphere, AtmosphereTint, BONFIRE_PROMPT_EN, BONFIRE_REST_LABEL_EN, BONFIRE_SAVE_LABEL_EN,
    BodyTraversal, BonfireLabels, Boundary, BranchDecl, BranchPoint, CameraShot, CameraSubject,
    Carrier, CastAbsence, CastBarks, CastDialogue, CastDialogueKeyword, CastEntry, CastPlace,
    CastPlacement, Class, ClassesContent, Climate, CollectBy, CompareOp, DamageKind, DespawnStyle,
    DialogueContent, DialogueEffect, DialogueNode, DialogueOption, EffectAudience, EffectSite,
    EnchantedItem, EncounterTier, EnvTrigger, EquipItem, EquipSlot, Facing, Fixture, Forfeit,
    Guard, Happening, HappeningSubject, HappeningVerb, Horizon, HorizonBase, HorizonSpec, ItemDrop,
    KillFires, KitItem, LethalVolume, Lethality, Locomotion, Loop, Loot, LootItem,
    MAX_POTION_AMPLIFIER, MAX_POTION_DURATION_TICKS, Mark, MobAttributes, MobDrop, MobEffect,
    MobEquipment, NarrateStyle, NestedDispatch, Npc, NpcDialogue, NpcSkin, NpcsContent, Objective,
    OnFull, OnKill, ParticleAt, Persona, Pieces, PlannedQuest, PlayersKeyword, PotionContents,
    PotionEffect, Precipitation, Prop, Quest, QuestEffect, QuestPlanContent, QuestsContent,
    Relationship, RespawnWait, Role, SequenceStep, Shop, ShopOffer, Shortcut, ShotStyle, SkinModel,
    SlotDrop, SoundAt, Stake, StateCompare, StateDecl, StateDisplay, StateScope, StateWrite,
    StealthZone, StrikeAim, StrikeStep, TextureOverride, TimeKeyword, TimeSite, TimedGate, Trap,
    TrapDisarm, TrapEffect, TrapReset, TrapTrigger, Trigger, TriggerAudience, TriggerOn, Verb,
    Wave, WaveLane, WaveMob, WaveSummon, WorldContent, WorldDifficulty, WorldTime, WorldWeather,
    enchantment_component, is_potion_bearing_item, offset_cell,
};
pub use stages::{
    BodyRef, BodySite, BodySkinSite, BodyTraversalSite, body_sites, body_skin_sites,
    body_skins_mut, body_traversal_sites, for_each_campaign_effect,
};
pub use stages::{
    EditBatch, EditFrame, FragmentRotation, MorphOp, PaletteBlock, PaletteRecipe, RegionShape,
    SocketState, TreeKind, WorldEdit, WorldEditsContent,
};
pub use stages::{ResolvedHorizon, horizon_base, horizon_defaults, resolved_horizon};
pub use validate::{declares_bonfire, validate_campaign, validate_campaign_with};