Skip to main content

Structure

Trait Structure 

Source
pub trait Structure: Any {
Show 14 methods // Provided methods fn as_dyn_impl(x: &dyn Any) -> &dyn Structure where Self: Sized { ... } fn as_dyn_outer(&self) -> Option<(&dyn Structure, &'static str)> { ... } fn as_dyn(&self) -> &(impl Structure + ?Sized) where Self: Sized { ... } fn render_inner(&self, _site: &Site, _land: &Land<'_>, _painter: &Painter) { ... } fn render(&self, site: &Site, land: &Land<'_>, painter: &Painter) where Self: Sized { ... } fn spawn_rules_inner( &self, _spawn_rules: &mut SpawnRules, _land: &Land<'_>, _wpos: Vec2<i32>, _weight: f32, ) { ... } fn spawn_rules( &self, spawn_rules: &mut SpawnRules, land: &Land<'_>, wpos: Vec2<i32>, weight: f32, ) where Self: Sized { ... } fn render_collect( &self, site: &Site, canvas: &CanvasInfo<'_>, ) -> (Store<Primitive>, Vec<(Id<Primitive>, Fill)>, Vec<EntityInfo>) where Self: Sized { ... } fn rel_terrain_offset(&self, col: &ColumnSample<'_>) -> i32 { ... } fn terrain_surface_at_inner( &self, _wpos: Vec2<i32>, _old: Block, _rng: &mut ChaCha8Rng, _col: &ColumnSample<'_>, _z_off: i32, _site: &Site, ) -> Option<Block> { ... } fn terrain_surface_at( &self, wpos: Vec2<i32>, old: Block, rng: &mut ChaCha8Rng, col: &ColumnSample<'_>, z_off: i32, site: &Site, ) -> Option<Block> where Self: Sized { ... } fn airship_dock_info(&self) -> Option<AirshipDockInfo<'_>> { ... } fn door_tile(&self) -> Option<Vec2<i32>> { ... } fn render_ordering(&self) -> u32 { ... }
}

Provided Methods§

Source

fn as_dyn_impl(x: &dyn Any) -> &dyn Structure
where Self: Sized,

Source

fn as_dyn_outer(&self) -> Option<(&dyn Structure, &'static str)>

Defaults to no support for hot linking.

Overload this function and provide a unique export_name (as demonstrated by existing plots) to have the plot support hot-reloading.

Source

fn as_dyn(&self) -> &(impl Structure + ?Sized)
where Self: Sized,

Source

fn render_inner(&self, _site: &Site, _land: &Land<'_>, _painter: &Painter)

Source

fn render(&self, site: &Site, land: &Land<'_>, painter: &Painter)
where Self: Sized,

Source

fn spawn_rules_inner( &self, _spawn_rules: &mut SpawnRules, _land: &Land<'_>, _wpos: Vec2<i32>, _weight: f32, )

Source

fn spawn_rules( &self, spawn_rules: &mut SpawnRules, land: &Land<'_>, wpos: Vec2<i32>, weight: f32, )
where Self: Sized,

Source

fn render_collect( &self, site: &Site, canvas: &CanvasInfo<'_>, ) -> (Store<Primitive>, Vec<(Id<Primitive>, Fill)>, Vec<EntityInfo>)
where Self: Sized,

Source

fn rel_terrain_offset(&self, col: &ColumnSample<'_>) -> i32

What z_off in terrain_surface_at should be relative to for each column.

Source

fn terrain_surface_at_inner( &self, _wpos: Vec2<i32>, _old: Block, _rng: &mut ChaCha8Rng, _col: &ColumnSample<'_>, _z_off: i32, _site: &Site, ) -> Option<Block>

Source

fn terrain_surface_at( &self, wpos: Vec2<i32>, old: Block, rng: &mut ChaCha8Rng, col: &ColumnSample<'_>, z_off: i32, site: &Site, ) -> Option<Block>
where Self: Sized,

Source

fn airship_dock_info(&self) -> Option<AirshipDockInfo<'_>>

Source

fn door_tile(&self) -> Option<Vec2<i32>>

Source

fn render_ordering(&self) -> u32

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Structure for AdletStronghold

Source§

impl Structure for AirshipDock

Source§

impl Structure for Barn

Source§

impl Structure for Bridge

Source§

impl Structure for Building

Source§

impl Structure for Camp

Source§

impl Structure for Castle

Source§

impl Structure for Citadel

Source§

impl Structure for CliffTower

Source§

impl Structure for CliffTownAirshipDock

Source§

impl Structure for CoastalAirshipDock

Source§

impl Structure for CoastalHouse

Source§

impl Structure for CoastalWorkshop

Source§

impl Structure for Cultist

Source§

impl Structure for DesertCityAirshipDock

Source§

impl Structure for DesertCityArena

Source§

impl Structure for DesertCityMultiPlot

Source§

impl Structure for DesertCityTemple

Source§

impl Structure for DwarvenMine

Source§

impl Structure for FarmField

Source§

impl Structure for GiantTree

Source§

impl Structure for GliderFinish

Source§

impl Structure for GliderPlatform

Source§

impl Structure for GliderRing

Source§

impl Structure for GnarlingFortification

Source§

impl Structure for Haniwa

Source§

impl Structure for House

Source§

impl Structure for JungleRuin

Source§

impl Structure for MyrmidonArena

Source§

impl Structure for MyrmidonHouse

Source§

impl Structure for PirateHideout

Source§

impl Structure for Plaza

Source§

impl Structure for Plot

Source§

impl Structure for Road

Source§

impl Structure for RockCircle

Source§

impl Structure for Sahagin

Source§

impl Structure for SavannahAirshipDock

Source§

impl Structure for SavannahGuardHut

Source§

impl Structure for SavannahHut

Source§

impl Structure for SavannahWorkshop

Source§

impl Structure for SeaChapel

Source§

impl Structure for Tavern

Source§

impl Structure for TerracottaHouse

Source§

impl Structure for TerracottaPalace

Source§

impl Structure for TerracottaYard

Source§

impl Structure for TrollCave

Source§

impl Structure for VampireCastle

Source§

impl Structure for Workshop