pub struct OpenStrandedMap {
pub meta: MapMeta,
pub terrain: TerrainData,
pub entities: Vec<MapEntity>,
pub player_spawn: Option<PlayerSpawn>,
pub environment: HashMap<String, String>,
pub colormap: Option<ColormapData>,
pub grass: Option<GrassData>,
pub password: String,
pub scripts: Vec<ScriptData>,
}Expand description
Root type for an .osmap file.
Fields§
§meta: MapMetaMap metadata.
terrain: TerrainDataTerrain heightmap data.
entities: Vec<MapEntity>Spawned entities (objects, buildings, items, units, infos).
player_spawn: Option<PlayerSpawn>The player spawn point.
environment: HashMap<String, String>Environment/global variables set on this map.
colormap: Option<ColormapData>Colormap (terrain colour texture) — pixel data in row-major RGB.
grass: Option<GrassData>Grass layer — (colormap_dim+1)² bytes, column-major, 0/1 values.
password: StringMap password (decoded).
scripts: Vec<ScriptData>Embedded scripts from .s2 infos.
Trait Implementations§
Source§impl Clone for OpenStrandedMap
impl Clone for OpenStrandedMap
Source§fn clone(&self) -> OpenStrandedMap
fn clone(&self) -> OpenStrandedMap
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OpenStrandedMap
impl Debug for OpenStrandedMap
Source§impl<'de> Deserialize<'de> for OpenStrandedMap
impl<'de> Deserialize<'de> for OpenStrandedMap
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
Auto Trait Implementations§
impl Freeze for OpenStrandedMap
impl RefUnwindSafe for OpenStrandedMap
impl Send for OpenStrandedMap
impl Sync for OpenStrandedMap
impl Unpin for OpenStrandedMap
impl UnsafeUnpin for OpenStrandedMap
impl UnwindSafe for OpenStrandedMap
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