ChestShop (iConomyChestShop)

ChestShop (iConomyChestShop)

6M Downloads

Indication of empty/full chest shops.

bricefrisco opened this issue ยท 6 comments

commented

Is your feature request related to a problem? Please describe.

As a chest shop owner, I find it difficult to identify which chests I need to restock (or empty out if I'm selling.)
I often have to walk around my shop and open each chest to know if I am out of stock of a particular item.

As a shopper, sometimes it is frustrating to find which signs are valid, and which are out of stock.
For instance, often times players are buying or selling in bulk and have dozens of signs for the same item.
A lot of the time, us shoppers have to click on various signs until we find one that is available to use.

Describe the solution you'd like

I believe it would be extremely helpful to have an indicator of whether or not the chest shop is either empty, or full.
Here's some possible ways I've thought of:

  • If a chest shop is full, the "S" on the price-line could be striked-through or a different color.
  • If a chest shop is empty (of the specified item), the "B" on the price-line could be striked-through or a different color.
  • If the chest shop is neither empty or full of the specified item, then the values remain the same.

Alternatively, perhaps a stock indicator could be added to the quantity line. This would avoid issues with the text-length limitations on the sign itself, as I believe the quantity line can't exceed 4 characters in length (I could be wrong about this - but can't think of a scenario where the quantity line would need to be over 4 characters in length).

This could look like:
Q 2304 : C 1330
Q for Quantity, C for Current.

These are just a couple of examples of indicators or flags I have been able to think of, but any indication or flag at all would be nice. If I think of any more possible solutions, I will edit this ticket with them.

EDIT:
Other indicators could be placed on the quantity line, such as [F] for full or [E] for empty, or nothing if it's somewhere in-between. Or colors, etc.. I think the quantity line is the most reliable to alter due to length limitations.

As an alternative solution to this problem (if the first is not possible), perhaps a '/csn stock' or similar command which lists specific chest shops which are either out of stock or full. I don't feel like this solution is as effective as the first. In the case of having various trade signs with the same item it would not be as effective, and wouldn't really help shoppers at all. However, it would still be helpful for market owners in many scenarios.

Describe alternatives you've considered

As a market owner, using /csn can be a way to identify which items need to be stocked up on.
But if the market is large, or used often, a lot of filtering is needed and you have to go through multiple pages.
It's actually easier to just check every chest manually in most cases than to use /csn, unless the shop is fairly small.

This alternative does not help shoppers, and can really only be reliable for market owners with small shops.
/csn is great, but not the best solution for quickly identifying work that needs to be done to restock.

Additional context

I am not sure how hard these changes would be to make, but think they would benefit all users of this great plugin.
If it doesn't entail too much work, I think this would be a wonderful enhancement.

For those that may not prefer this, I think it could be made a configurable property to either modify signs with some styling, a stock counter, or some variant of such.

Thank you :)

commented

This would be extremely useful.
@Phoenix616 please heavily consider!

commented

Absolutely a good improvement.

For ex, my warehouse/public shop/home had something like 3 dozens of double chests for shops, and although I had a direct access to the chests from indoors and could as the Systems Main Admin read the Server logs, I'd rather not check the chests or read the logs or wait for someone to tell or try to buy after I get on.

commented

Almost a duplicate of #195 although that one didn't explicitly mention the full state.

Apparently nothing came of that PR mentioned there but its definitely a good idea!

commented

@Phoenix616

I've actually began working on this myself, and have made some great progress using the existing PostTransactionEvent as well as InventoryCloseEvent.

https://imgur.com/0dHAkY8

At first I was just playing around to see if I could manage to do it, now I believe I can.
I went with the stock counter ('C') option and have made it a configurable property, defaulting to false.

It will automatically assign/remove the stock counter on a transaction, chest shop creation, or chest shop close event.
So if the configurable property is changed, there is no need for players to recreate their shops either way.

I'll create a fork tomorrow and start pushing my code to it so it can be reviewed. Once I feel comfortable I'll create a PR :)

commented
commented

PR submitted #368