-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #306 from xiv-gear-planner/materia-fill-settings
Expand materia auto-fill settings
- Loading branch information
Showing
9 changed files
with
334 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {Materia, MateriaSlot} from "@xivgear/xivmath/geartypes"; | ||
|
||
|
||
export function isMateriaAllowed(materia: Materia, materiaSlot: MateriaSlot) { | ||
const highGradeAllowed = materiaSlot.allowsHighGrade; | ||
if (materia.isHighGrade && !highGradeAllowed) { | ||
return false; | ||
} | ||
const maxGradeAllowed = materiaSlot.maxGrade; | ||
return materia.materiaGrade <= maxGradeAllowed; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.