[−][src]Struct genie::Scenario
A Scenario file.
Implementations
impl Scenario
[src]
pub fn read_from(input: impl Read) -> Result<Scenario, Error>
[src]
Read a scenario file.
pub fn from<R>(input: &mut R) -> Result<Scenario, Error> where
R: Read,
[src]
R: Read,
Use Scenario::read_from instead.
Read a scenario file.
pub fn write_to(&self, output: impl Write) -> Result<(), Error>
[src]
Write the scenario file to an output stream.
Equivalent to scen.write_to_version(scen.version())
.
pub fn write_to_version(
&self,
output: impl Write,
version: &VersionBundle
) -> Result<(), Error>
[src]
&self,
output: impl Write,
version: &VersionBundle
) -> Result<(), Error>
Write the scenario file to an output stream, targeting specific game versions.
pub fn format_version(&self) -> SCXVersion
[src]
Get the format version of this SCX file.
pub fn header_version(&self) -> u32
[src]
Get the header version for this SCX file.
pub fn data_version(&self) -> f32
[src]
Get the data version for this SCX file.
pub fn header(&self) -> &SCXHeader
[src]
Get the header.
pub fn description(&self) -> Option<&str>
[src]
Get the scenario description.
pub fn filename(&self) -> &str
[src]
Get the scenario filename.
pub fn version(&self) -> &VersionBundle
[src]
Get data about the game versions this scenario file was made for.
pub fn requires_dlc(&self, dlc: DLCPackage) -> bool
[src]
Check if this scenario requires the given DLC (for HD Edition scenarios only).
pub fn mod_name(&self) -> Option<&str>
[src]
Get the UserPatch mod name of the mod that was used to create this scenario.
This returns the short name, like "WK" for WololoKingdoms or "aoc" for Age of Chivalry.
pub fn objects(&self) -> impl Iterator<Item = &ScenarioObject>
[src]
Iterate over all the objects placed in the scenario.
pub fn objects_mut(&mut self) -> impl Iterator<Item = &mut ScenarioObject>
[src]
Iterate mutably over all the objects placed in the scenario.
pub fn map(&self) -> &Map
[src]
Get the map/terrain data for this scenario.
pub fn map_mut(&mut self) -> &mut Map
[src]
Get the (mutable) map/terrain data for this scenario.
pub fn triggers(&self) -> Option<&TriggerSystem>
[src]
Get trigger data for this scenario if it exists.
pub fn triggers_mut(&mut self) -> Option<&mut TriggerSystem>
[src]
Get (mutable) trigger data for this scenario if it exists.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Scenario
impl Send for Scenario
impl Sync for Scenario
impl Unpin for Scenario
impl UnwindSafe for Scenario
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,