-
Notifications
You must be signed in to change notification settings - Fork 15
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
Shows if player have enough supplies #28
base: master
Are you sure you want to change the base?
Shows if player have enough supplies #28
Conversation
Add an option to show the player if they have enough supplies in their inventory to complete their current contract. If turned on, it shows it on the right side of the overlay. If the Plank Sack plugin is installed, it also counts planks in the plank sack.
…ntainSupplies # Conflicts: # src/main/java/thestonedturtle/mahoganyhomes/MahoganyHomesPlugin.java
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 didn't have time to actually pull this branch down and test it so I may have additional changes later. Please address my current ones for now though.
keyName = "checkSupplies", | ||
name = "Check Supplies", | ||
description = "Checks if you have enough supplies in your inventory to complete your current contract.<br/>" + | ||
"If the Plank Sack plugin is installed, it will include planks in the plank sack.", |
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.
Might want to add the caveat of "regardless of if the planks in the sack are the correct type for your contract tier" or something here.
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.
Tried adding a short and concise caveat but let me know if you'd like me to be more specific (i.e. "for your contract tier")
I realized that check supplies wont work without "Display Required Materials", so I wanted to check with you if it should mention that it needs to be enabled. Similar to how Display Session Stats config mentions that it requires Display Text Overlay to be enabled
@Getter | ||
private int numPlanksInInventory = 0; | ||
@Getter | ||
private int numSteelBarsInInventory = 0; |
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.
Reset these onShutDown
@Subscribe | ||
public void onItemContainerChanged(ItemContainerChanged event) | ||
{ | ||
if (event.getContainerId() == InventoryID.INVENTORY.getId()) |
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.
Only do this is they currently have an active contract and the plugin hasn't "timed out". Many people leave the plugin on at all times even if they aren't actively doing the content.
@@ -157,6 +174,11 @@ public void shutDown() | |||
@Subscribe | |||
public void onConfigChanged(ConfigChanged c) | |||
{ | |||
if (c.getGroup().equals(PLANK_SACK_GROUP_NAME) && c.getKey().equals(PLANK_COUNT_KEY)) |
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.
Only do this is they currently have an active contract and the plugin hasn't "timed out". Many people leave the plugin on at all times even if they aren't actively doing the content.
@@ -674,4 +706,35 @@ private void refreshTeleportItem(final WorldPoint playerPos) | |||
teleportItem = null; | |||
} | |||
} | |||
|
|||
void updateResourcesInInventory() |
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.
Due to the other requested changes we need to call this whenever a new contract is received.
Also, ensure this gets called when enabling the plugin if they have an active contract. This may need to be done inside onStartUp
but I believe calling it in the above scenario should work.
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.
Due to the other requested changes we need to call this whenever a new contract is received.
Done in checkForContractTierDialog()
Also, ensure this gets called when enabling the plugin if they have an active contract. This may need to be done inside
onStartUp
but I believe calling it in the above scenario should work.
I actually found calling this at the end of loadFromConfig() to be more ideal, as it additionally covers my other scenarios.
Well it's been 6 months and I'm not sure if this is ready for re-review. @SeaifanAladdin if you're still around is this ready for review again? |
It looks like there is a conflict that needs resolving. I also would like to look into any new OSRS changes since, and retest before having this reviewed again. |
No rush on my end, whenever you want is fine with me |
Is there something I can do here? I have both 1) found myself interested in contributing to RuneLite and 2) have began the Mahog Homes grind on my iron and was looking to implement these exact features. If I pull this down, resolve the conflict, do mahog homes for a few hours and ensure I'm not seeing anything wrong can I make a PR for this and get it reviewed and merged? |
Sounds fine to me. |
Hey there! I have finally gotten my RL dev environment set up. Would you like me to update this CR directly? I was able to bring it down to my own machine with Please advise! This is my first time contributing to RL + plugin hub. Thank you! |
Apologies for the late update. @TheStonedTurtle , the PR is now ready for review |
I had reviewed the comments from #25 and completed the requested change to PeaceBear0's implementation.
I apologize if this PR causes any issues, as I notice there has been no updates with #25 and I am unfamiliar with the proper procedure or etiquette in regards to finishing up someone else's PR.