Skip to content
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

Added config option keep-drops which allows players to keep items t… #751

Closed
wants to merge 2 commits into from

Conversation

Fisher2911
Copy link

…hey find in the arena

Summary

  • This is a…
    • Bug fix
    • [X ] Feature addition
    • Documentation
    • Refactoring
    • Minor / simple change (like a typo)
    • Other
  • Describe this change in 1-2 sentences:

It adds the config option keep-drops which allows players to keep items from the arena after is is complete.

Problem

It is just an extra feature that could be helpful for people who want mob drops or other items to be kept.

Solution

I made it so that when the player joins the arena, PDC is set to all their items to identify them. Then, when the player leaves, the items with the PDC are removed from the inventory, and the rest of the items are stored. Then, after the player's inventory has been reset, the extra items are added back to their inventory.

Action

It would be helpful if you could review it to make sure I didn't miss any areas where players' inventories are cleared and restored.

@garbagemule
Copy link
Owner

Thanks for submitting an issue and a pull request!

I'm not entirely sure what the proper way to accommodate something like this would be, but I'd be happy to review the PR after a cleanup. There are way too many formatter-related changes that should not be included. The best approach is probably to disable all formatter automations in your IDE and change/add just the lines necessary for the implementation to work.

@garbagemule
Copy link
Owner

Closing this to clear out stale PRs. There's still way too much noise in this PR. The overall idea is fine, but the implementation is a bit too "creative", and the execution is messy. I think an easier way around this would be to build on top of the rewards system and just add drops as rewards when they get picked up, similar to how keep-exp works. Worth a try!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants