Struct SystemStateResolver

Source
pub struct SystemStateResolver {
    pub location_info: LocationInfo,
    pub planet_state: HashMap<u8, PlanetState>,
    pub star_scans: HashMap<u8, ScanEvent>,
    pub belt_scans: HashMap<u8, ScanEvent>,
    pub visits: Vec<DateTime<Utc>>,
    pub carrier_visits: Vec<DateTime<Utc>>,
    pub number_of_bodies: Option<u8>,
    pub progress: f32,
    pub all_found: bool,
    pub station_signals: Vec<FSSSignalDiscoveredEvent>,
    pub exobiology_system: TargetSystem,
}

Fields§

§location_info: LocationInfo

Information about the system.

§planet_state: HashMap<u8, PlanetState>

Entries for state for planets in the system.

§star_scans: HashMap<u8, ScanEvent>

Scans for each star in the system.

§belt_scans: HashMap<u8, ScanEvent>

Scans for each cluster in the system.

§visits: Vec<DateTime<Utc>>

Times when the player was in the system.

§carrier_visits: Vec<DateTime<Utc>>

Times when the player’s was in the system.

§number_of_bodies: Option<u8>

The number of bodies that are present in the system.

§progress: f32

Current progress of discovering all bodies in the system.

§all_found: bool

Whether all bodies have been discovered in the system.

§station_signals: Vec<FSSSignalDiscoveredEvent>

List of station signals.

§exobiology_system: TargetSystem

Information about the system needed for exobiology predictions.

Implementations§

Source§

impl SystemStateResolver

Source

pub fn visit(&mut self, date_time: &DateTime<Utc>)

Source

pub fn nr_of_scans(&self) -> usize

Returns the total number of scans, which includes planets, stars and belt clusters.

Source

pub fn nr_of_scanned_bodies(&self) -> usize

Returns the total number of scanned bodies, which includes planets and stars. Take note that this does not include scanned belt clusters as they are not counted towards the total number of scanned bodies in game.

Source

pub fn all_scans(&self) -> Vec<&ScanEvent>

Returns all the scan events for this system.

Source

pub fn carrier_visit(&mut self, date_time: &DateTime<Utc>)

Source

pub fn get_spawnable_species( &self, body_id: u8, ) -> Option<Vec<PlanetSpeciesEntry>>

Trait Implementations§

Source§

impl Serialize for SystemStateResolver

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.