Skip to content

Commit

Permalink
chore: rename PostAssignment to PostAssign (#47)
Browse files Browse the repository at this point in the history
This way it matches up with PreAssign and other names
  • Loading branch information
TrueBrain authored Jul 6, 2024
1 parent 507de30 commit bcd6a10
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/calculate/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub enum EffectOperator {
PostMul,
PostDiv,
PostPercent,
PostAssignment,
PostAssign,
}

#[derive(Serialize, Debug, Copy, Clone)]
Expand Down
2 changes: 1 addition & 1 deletion src/calculate/pass_2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ fn get_effect_operator(operation: i32) -> Option<EffectOperator> {
4 => Some(EffectOperator::PostMul),
5 => Some(EffectOperator::PostDiv),
6 => Some(EffectOperator::PostPercent),
7 => Some(EffectOperator::PostAssignment),
7 => Some(EffectOperator::PostAssign),
/* We ignore operator 9 (calculates Skill Level based on Skill Points; irrelevant for fits). */
9 => None,
_ => panic!("Unknown effect operation: {}", operation),
Expand Down
4 changes: 2 additions & 2 deletions src/calculate/pass_3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl Attribute {
EffectOperator::PostMul => source_value - 1.0,
EffectOperator::PostDiv => 1.0 / source_value - 1.0,
EffectOperator::PostPercent => source_value / 100.0,
EffectOperator::PostAssignment => source_value,
EffectOperator::PostAssign => source_value,
};

/* Check whether stacking penalty counts; negative and positive values have their own penalty. */
Expand All @@ -125,7 +125,7 @@ impl Attribute {

/* Apply the operator on the values. */
match operator {
EffectOperator::PreAssign | EffectOperator::PostAssignment => {
EffectOperator::PreAssign | EffectOperator::PostAssign => {
let dogma_attribute = info.get_dogma_attribute(attribute_id);

current_value = if dogma_attribute.highIsGood {
Expand Down

0 comments on commit bcd6a10

Please sign in to comment.