Skip to main content

esf_dogma_engine/
lib.rs

1//! Calculates the dogma attributes of an EVE Online ship fit: the ship, its
2//! items and the character.
3//!
4//! Describe the fit with [`Fit`] and pass it to [`calculate()`], together
5//! with the static data from `esf-data`.
6//!
7//! ```no_run
8//! use esf_data::{InfoSde, Sde};
9//! use esf_dogma_engine::{Fit, Options, calculate};
10//!
11//! let bytes = std::fs::read("sde.dat").unwrap();
12//! let sde = Sde::new(&bytes).unwrap();
13//!
14//! let fit: Fit = serde_json::from_str(
15//!     r#"{
16//!         "ship": {"type_id": 587},
17//!         "items": [{"type_id": 2873, "slot": {"type": "high", "index": 0}, "state": "active"}]
18//!     }"#,
19//! )
20//! .unwrap();
21//!
22//! let calculation = calculate(&InfoSde::new(&sde), &fit, &Options::default());
23//! ```
24
25#![warn(missing_docs)]
26
27mod calculate;
28mod fit;
29mod projection;
30mod validate;
31
32pub use calculate::{
33    AttributeValue, Calculation, EffectOperator, ItemResult, Options, Source, SourceRef, beacon,
34    calculate,
35};
36pub use fit::{
37    Character, Charge, DamageProfile, Environment, Fit, FitItem, Mutation, ReactiveArmor, Security,
38    Ship, Slot, Spool, State,
39};
40pub use projection::{ProjectedBuff, ProjectedEffect, Projection};
41pub use validate::{GroupLimit, Resource, Rule, SlotKind, Target, Violation};