pub enum SoundAt {
Anchor {
anchor: AnchorId,
offset: [i32; 3],
},
Players {
offset: [i32; 3],
},
Actor {
actor: String,
},
}Expand description
Where a Verb::PlaySound originates (DSL v0.6, spec-0014). A sound
plays at fixed coordinates or at each listener’s own position; the compiler
resolves no position for a live actor, so the actor variant is accepted by
the schema and rejected with DW0335.
Variants§
Anchor
Play the sound positioned at a resolved anchor, audible to all players.
Fields
Players
Play the sound at each player’s own position (the default), or at
offset in the listener’s own frame (spec-0085 §4.4): +x to the
listener’s left, +y up, +z the way the listener faces, with the pitch
flattened so behind stays at ear height. [0, 0, -3] is three blocks
behind. Integer blocks, as a Mark’s offset is.
Actor
Play the sound at a scripted actor’s position (rejected — DW0335; no
actor position resolves at emission).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SoundAt
impl<'de> Deserialize<'de> for SoundAt
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for SoundAt
impl JsonSchema for SoundAt
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for SoundAt
Auto Trait Implementations§
impl Freeze for SoundAt
impl RefUnwindSafe for SoundAt
impl Send for SoundAt
impl Sync for SoundAt
impl Unpin for SoundAt
impl UnsafeUnpin for SoundAt
impl UnwindSafe for SoundAt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more