pub struct Source {
pub from: SourceRef,
pub effect_id: Option<i32>,
pub source_attribute_id: Option<i32>,
pub operator: EffectOperator,
pub value: f64,
pub quantity: u32,
pub penalty: Option<f64>,
pub applied: bool,
}Expand description
One modifier on an attribute, and where it came from.
Fields§
§from: SourceRefThe object the effect belongs to.
effect_id: Option<i32>The effect that holds the modifier; None for a buff, which has none.
source_attribute_id: Option<i32>The attribute on the source that holds value; None for a buff,
which carries its own strength.
operator: EffectOperatorHow value changes the attribute.
value: f64The source attribute’s value, as pass 3 used it.
quantity: u32A penalised stack is split into one entry per item, as each gets its own penalty.
penalty: Option<f64>The stacking penalty factor applied; None when not penalised.
applied: boolFalse when the source’s state is too low for the effect.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnsafeUnpin for Source
impl UnwindSafe for Source
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more