ed_journals/modules/exobiology/models/
spawn_condition.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
use crate::materials::Material;
use crate::modules::galaxy::{
    AtmosphereType, PlanetClass, StarClass, StarLuminosity, VolcanismType,
};

#[derive(Debug)]
pub enum SpawnCondition<'a> {
    MinMeanTemperature(f32),
    MaxMeanTemperature(f32),
    NoAtmosphere,
    AnyThinAtmosphere,
    ThinAtmosphere(AtmosphereType),
    /// The minimum gravity the planet must have, in G
    MinGravity(f32),
    /// The maximum gravity the planet must have, in G
    MaxGravity(f32),
    PlanetClass(PlanetClass),
    ParentStarClass(StarClass),
    ParentStarLuminosity(StarLuminosity),
    MinOrEqualParentStarLuminosity(StarLuminosity),
    SystemContainsPlanetClass(PlanetClass),
    VolcanismType(VolcanismType),
    /// The minimum distance the planet needs to be from the sun in AU
    MinDistanceFromParentSun(f32),
    AnyVolcanism,

    /// The maximum distance the planet needs to be from the center of a nebula in Ly
    WithinNebulaRange(f32),

    /// The target planet must have at least one geological signal present.
    GeologicalSignalsPresent,

    MaterialPresence(Material),

    RockyComposition,
    IcyComposition,
    MetalComposition,

    Special,

    Any(&'a [SpawnCondition<'a>]),
    All(&'a [SpawnCondition<'a>]),
}