pub struct AmbientSound {
pub name: &'static str,
pub track_type: &'static str,
pub exclude_planets: Option<&'static [&'static str]>,
pub exclude_surface_names: Option<&'static [&'static str]>,
pub planets: Option<&'static [&'static str]>,
pub play_on_all_surfaces: Option<bool>,
pub surface_names: Option<&'static [&'static str]>,
pub title: Option<&'static str>,
pub weight: Option<f64>,
}Expand description
Minimal AmbientSound for data.extend.
This prototype is used to make sound while playing the game. This includes the base game’s music, composed by Daniel James Taylor and the Space Age’s music, composed by Petr Wajsar.
type = "ambient-sound" is injected by the Lua generator.
Fields§
§name: &'static strUnique textual identification of the prototype.
track_type: &'static strPrototype property track_type.
exclude_planets: Option<&'static [&'static str]>The track cannot play on specified planets.
Can be used only if play_on_all_surfaces is true or surface_names are defined.
Cannot be used when planets are defined.
exclude_surface_names: Option<&'static [&'static str]>The track cannot play on surfaces with specified name. It’s enough if the specified name is a sub-string of the surface name.
Can be used only if play_on_all_surfaces is true or surface_names are defined.
Cannot exclude a name given in surface_names.
planets: Option<&'static [&'static str]>The track can play only on specified planets.
If neither planets nor surface_names is given, the track plays on space platforms and in the space map.
Cannot be defined if track_type is "script-track".
Cannot be defined when play_on_all_surfaces is true.
play_on_all_surfaces: Option<bool>The track can play everywhere.
Cannot be defined if track_type is "hero-track" or "script-track".
Cannot be true if planets or surface_names are defined.
surface_names: Option<&'static [&'static str]>The track can play only on surfaces with specified names. It’s enough if the specified name is a sub-string of the surface name.
If neither planets nor surface_names is given, the track plays on space platforms and in the space map.
Cannot be defined if track_type is "hero-track" or "script-track".
Cannot be defined when play_on_all_surfaces is true.
title: Option<&'static str>Alternative name of the track. It doesn’t need to be unique.
weight: Option<f64>Cannot be less than zero.
Cannot be defined if track_type is "hero-track" or "script-track".
Trait Implementations§
Source§impl Clone for AmbientSound
impl Clone for AmbientSound
Source§fn clone(&self) -> AmbientSound
fn clone(&self) -> AmbientSound
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more