-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if items level requirement is met. #14
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just of curiosity for the intent. If they meet the minium level, and they can craft the tool, why exclude them? Can they just go craft the tool and then gather the items? (i.e.; shouldn't we suggest the best possible items they can get?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't know if maybe any tool needs (time) gated materials. Just checked the wiki and it's not the case. So as soon as a level is reached the tools should be craftable. I guess with this information I can remove the whole IsGatherable and purely rely on the items MinLevel and just assume it unlocks the required tools with the workshop items. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using FFXIVClientStructs.FFXIV.Client.Game.MJI; | ||
|
||
namespace WorkshopOptimizerPlugin.Utils; | ||
|
||
internal class IslandProvider | ||
{ | ||
public static unsafe int GetIslandRank() | ||
{ | ||
return MJIManager.Instance()->IslandState.CurrentRank; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to expand the if below into two cases (Gaherables vs the rest), or else change it so that the function is something more like !IsMaterialLocked(material)
Then change to:
if ((options.Strictness & option) == 0 && (InventoryProvider.GetItemCount(material.Material) < material.Count || !IslandProvider.IsMaterialUnlocked(material.Material)))
(and have IsMaterialUnlocked return true for non-gatherables).
It I read it correctly, today it only excludes the item if it's locked and below count. (and always excluded non-gatherable items).