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

Partial stock sell option #146

Closed
the-najjar opened this issue Sep 20, 2020 · 1 comment
Closed

Partial stock sell option #146

the-najjar opened this issue Sep 20, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@the-najjar
Copy link

Is your feature request related to a problem? Please describe.
When a shop displays amount a person can buy, if the stock of that shop is less than what is displayed on the sign, it shows out of stock.

Describe the solution you'd like
Add an option in config to allow partial item sell. So if the a seller put selling 1728 items on his sign for $100, if the chest has only 600 items, then it would allow the buyer to buy the 600 items instead of showing out of stock and would charge him for $34.71. It should only work if player enabled vault and for sell signs where other players can buy items from that sign.

Additional context
Here are formulas you can use:
if sell sign:
if stock inside chest is less than what is displayed:
(unit price)=(sell amount of the item)/(sell price displayed)
(what to charge)=(amount of items left in the container)/(unit price)
then it would let the player buy what is left in that chest even if it is less than what is displayed if the option for partial sell is enabled in configs of the plugin.

@the-najjar the-najjar added the enhancement New feature or request label Sep 20, 2020
@snowgears
Copy link
Owner

Added in 1.8.4 (in progress)

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

No branches or pull requests

2 participants