Skip to content

Commit

Permalink
🚧 Continue working on 'stuff'
Browse files Browse the repository at this point in the history
  • Loading branch information
rster2002 committed Jun 12, 2024
1 parent d45b5ae commit 6b9e315
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 2 deletions.
14 changes: 13 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,23 @@ directories = "5.0.1"
tokio-test = "0.4.4"

[features]
default = ["asynchronous", "strict"]
default = ["strict"]
asynchronous = ["dep:tokio", "dep:async-mutex"]
strict = []

logs = []
json-models = []
journal = ["json-models", "logs"]
state = ["logs"]

models-civilization = []
models-exobiology = []
models-exploration = []
models-galaxy = []
models-materials = []
models-odyssey = []
models-ship = []
models-station = []
models-thargoid = []
models-trading = []

22 changes: 22 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,20 @@ pub use modules::backpack;

#[cfg(feature = "json-models")]
pub use modules::cargo;

#[cfg(feature = "models-civilization")]
pub use modules::civilization;

#[cfg(feature = "models-commander")]
pub use modules::commander;

#[cfg(feature = "models-exobiology")]
pub use modules::exobiology;

#[cfg(feature = "models-exploration")]
pub use modules::exploration;

#[cfg(feature = "models-galaxy")]
pub use modules::galaxy;

#[cfg(feature = "journal")]
Expand All @@ -36,6 +46,8 @@ pub use modules::logs;

#[cfg(feature = "json-models")]
pub use modules::market;

#[cfg(feature = "models-materials")]
pub use modules::materials;
pub use modules::mixed;

Expand All @@ -44,10 +56,14 @@ pub use modules::modules_info;

#[cfg(feature = "json-models")]
pub use modules::nav_route;

#[cfg(feature = "models-odyssey")]
pub use modules::odyssey;

#[cfg(feature = "json-models")]
pub use modules::outfitting;

#[cfg(feature = "models-ship")]
pub use modules::ship;

#[cfg(feature = "json-models")]
Expand All @@ -59,11 +75,17 @@ pub use modules::small;

#[cfg(feature = "state")]
pub use modules::state;

#[cfg(feature = "models-station")]
pub use modules::station;

#[cfg(feature = "json-models")]
pub use modules::status;

#[cfg(feature = "models-thargoid")]
pub use modules::thargoid;

#[cfg(feature = "models-trading")]
pub use modules::trading;

mod modules;
Expand Down
11 changes: 11 additions & 0 deletions src/modules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ pub mod state;

/// Contains models for genuses, species and variants and utilities for predicting possible
/// biological scans for planets
#[cfg(feature = "models-exobiology")]
pub mod exobiology;

/// Contains functions for exploration related things, like calculating estimated exploration value
/// for stars and planets and for analysing scans for unusual data.
#[cfg(feature = "models-exploration")]
pub mod exploration;

/// Utilities for working with the `Outfitting.json` file. Is updated when opening the outfitting
Expand Down Expand Up @@ -80,37 +82,46 @@ mod utils;
mod shared;

/// Provides models for bodies like stars and planets.
#[cfg(feature = "models-galaxy")]
pub mod galaxy;

/// This module contains models for things that have to do with civilisation and populated systems.
/// Things like the different superpowers or economies.
#[cfg(feature = "models-civilization")]
pub mod civilization;

/// Contains models for models for commander ranks.
#[cfg(feature = "models-commander")]
pub mod commander;

/// Models and data for materials that are used for ship engineering. For materials that are used
/// for suit engineering, check the [odyssey] module.
#[cfg(feature = "models-materials")]
pub mod materials;

/// Includes the commodity enum, which is used in various places in the library and contains all
/// the different commodities that can be bought/acquired.
#[cfg(feature = "models-trading")]
pub mod trading;

/// Contains models and utilities for things that have been added in the Odyssey expansion of the
/// game. Note that [exobiology] is its own separate module.
#[cfg(feature = "models-odyssey")]
pub mod odyssey;

/// Contains everything that has to do with ships, including the different types of ships, but also
/// the different modules that can be equipped.
#[cfg(feature = "models-ship")]
pub mod ship;

/// Models related to stations and markets. Also contains some models that are used for fleet
/// carriers.
#[cfg(feature = "models-station")]
pub mod station;

/// Includes models related to Thargoids. Most importantly: the different types of Thargoids that
/// player can encounter.
#[cfg(feature = "models-thargoid")]
pub mod thargoid;

/// This module contains 'small' models that are used to create representations for certain things
Expand Down
2 changes: 1 addition & 1 deletion src/modules/civilization/models/location_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::modules::galaxy::BodyType;
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
#[serde(rename_all = "PascalCase")]
pub struct LocationInfo {
/// The name of the star system that is displayed to the player.
/// The name of the star system that is displayed to the player.
pub star_system: String,

/// The unique 'id' of the system.s
Expand Down
5 changes: 5 additions & 0 deletions src/modules/mixed/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#[cfg(all(feature = "models-trading", feature = "models-odyssey"))]
pub use models::mixed_commodity::MixedCommodity;

#[cfg(all(feature = "models-materials", feature = "models-odyssey"))]
pub use models::mixed_material::MixedMaterial;

#[cfg(all(feature = "models-materials", feature = "models-odyssey"))]
pub use models::mixed_material_category::MixedMaterialCategory;

mod models;
5 changes: 5 additions & 0 deletions src/modules/mixed/models.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#[cfg(all(feature = "models-trading", feature = "models-odyssey"))]
pub mod mixed_commodity;

#[cfg(all(feature = "models-materials", feature = "models-odyssey"))]
pub mod mixed_material;

#[cfg(all(feature = "models-materials", feature = "models-odyssey"))]
pub mod mixed_material_category;

0 comments on commit 6b9e315

Please sign in to comment.