Skip to main content

Crate esf_dogma_engine

Crate esf_dogma_engine 

Source
Expand description

Calculates the dogma attributes of an EVE Online ship fit: the ship, its items and the character.

Describe the fit with Fit and pass it to calculate(), together with the static data from esf-data.

use esf_data::{InfoSde, Sde};
use esf_dogma_engine::{Fit, Options, calculate};

let bytes = std::fs::read("sde.dat").unwrap();
let sde = Sde::new(&bytes).unwrap();

let fit: Fit = serde_json::from_str(
    r#"{
        "ship": {"type_id": 587},
        "items": [{"type_id": 2873, "slot": {"type": "high", "index": 0}, "state": "active"}]
    }"#,
)
.unwrap();

let calculation = calculate(&InfoSde::new(&sde), &fit, &Options::default());

Structs§

AttributeValue
One attribute, before and after the effects on it.
Calculation
The result of calculate().
Character
The character flying the ship.
Charge
A charge loaded in a module.
DamageProfile
How incoming damage is split over the four damage types. Only the ratio matters; the calculation scales the four to add up to one.
Environment
Where the ship is.
Fit
A ship, what is fitted to it, and the character flying it.
FitItem
A module, drone, fighter squadron, implant, booster or item in cargo.
ItemResult
The calculated attributes of the ship, its mode, the character, or one item.
Mutation
How a module or drone was mutated.
Options
What calculate() reports on top of the values.
ProjectedBuff
A projected buff (like command bursts).
ProjectedEffect
A projected dogma effect.
Projection
The external buffs and effects that can be applied to another ship.
Ship
The ship of a fit.
Source
One modifier on an attribute, and where it came from.
Violation
One rule the fit breaks, and what breaks it.

Enums§

EffectOperator
How a modifier changes an attribute. They are applied in this order.
GroupLimit
Which state a group limit counts.
ReactiveArmor
What a Reactive Armor Hardener shifts its resistances towards.
Resource
A resource the ship only has so much of.
Rule
A rule of EVE’s, and the values that failed it.
Security
The security of a solar system.
Slot
Where an item is. The number is the position in its rack, starting at 0; for implants and boosters, the slot as EVE numbers it, starting at 1.
SlotKind
A rack of slots, or a hardpoint a weapon needs.
SourceRef
Item and Charge index into Fit::items, Projected into Fit::incoming.effects. A skill and a buff are not in the result, so they carry their own id.
Spool
How far a module has spooled.
State
The state of an item, lowest first.
Target
What a Violation is about. Item and Charge index into Fit::items.

Functions§

beacon
What a beacon in space hands to every fit in there with it.
calculate
Calculate every attribute of the ship, its items and the character.