Technology

Trait Technology 

Source
pub trait Technology:
    Sealed
    + Debug
    + Sized
    + TechnologyEx {
    type Unlocks;

    const NAME: &'static str;
    const REQUIRED_RESEARCH_POINTS: u32 = Self::REQUIRED_RESEARCH_POINTS_EX;

    // Required method
    fn research(
        self,
        research_points: Bundle<ResearchPoint<Self>, { Self::REQUIRED_RESEARCH_POINTS }>,
    ) -> Self::Unlocks;
}
Expand description

A technology can be unlocked out by calling the research method with the required science packs. This will consume the science packs and the technology itself, and return whatever the technology unlocks, mostly recipes and other technologies.

Required Associated Constants§

Source

const NAME: &'static str

The name of the technology.

Provided Associated Constants§

Source

const REQUIRED_RESEARCH_POINTS: u32 = Self::REQUIRED_RESEARCH_POINTS_EX

How many of this technology’s research points (ResearchPoint<T>) are needed to complete the research.

Required Associated Types§

Source

type Unlocks

The reward for completing this technology.

Required Methods§

Source

fn research( self, research_points: Bundle<ResearchPoint<Self>, { Self::REQUIRED_RESEARCH_POINTS }>, ) -> Self::Unlocks

Carries out the research by consuming the required science packs and the research itself, returning whatever this research unlocks.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§