pub trait Technology: Sealed {
type Unlocks;
const RED_SCIENCE_COST: u32;
// Required method
fn research(
self,
red_science: Bundle<RedScience, { Self::RED_SCIENCE_COST }>,
) -> 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§
Sourceconst RED_SCIENCE_COST: u32
const RED_SCIENCE_COST: u32
The amount of red science required to carry out this technology.
Required Associated Types§
Required Methods§
Sourcefn research(
self,
red_science: Bundle<RedScience, { Self::RED_SCIENCE_COST }>,
) -> Self::Unlocks
fn research( self, red_science: Bundle<RedScience, { Self::RED_SCIENCE_COST }>, ) -> 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.