Feature - Implemented Store Manager Revamp

Serin

New member
I guess this is the place to request this..

The store manager really needs a face lift..

First off, I'd like to request that the tiny one line window above the store stock manager be either removed or made re-sizable. I mean, It's really a bit of a useless tool if you can only place one item at a time.. Not to mention the fact that probably 85% (I'm being generous) of Mafia users have no idea why it's there or how to use it, and the 15% that do know how it's used don't use it because it's easier to just use the additions tab.

Next up is can the little stop sign's have a little bit of hovering text to tell you what they do? It's not really a dynamite change, but it would help the store manager be a little more intuitive.. (If not hovering text maybe have the column labelled? I know that I for one am a little bit leery of clicking on buttons that I don't know what they do.. But, I got a little braver and as I was clicking around I also discovered that the little triangle brings up a list of mall prices for that item. Not really dynamite either, but a label would be nice (for months I've been moving the main window over to the side and typing in the name of the item and repricing it based on that..)

Next thingy is.. As much as I understand the desire to not make Mafia a mall-bot, Would it be possible to add a Restock pane to the store manager? (I saw the restock tab in the item manager.. but it appears to be a bit of a vestigial window, and doesn't have any method of using it. Not to mention when I searched the forums for restock the last reference to the pane is in 2009 and that was just confirming that no one has any idea of how to use it, or why it doesn't work..) My idea is that it would work exactly like the end-of-run pane in the museum display.. If you were really feeling frisky, you could make it so the person could even set up a small database of items and prices and do an end-of-run sale with the press of a button..

Thanks for considering the features..
 

slyz

Developer
Next up is can the little stop sign's have a little bit of hovering text to tell you what they do?
The code shows:
PHP:
removeItemButton.setToolTipText( "remove item from store" );
and
PHP:
searchItemButton.setToolTipText( "price analysis" );
so I guess they are supposed to have tooltips. On windows, I'm not seeing them.
(I saw the restock tab in the item manager.. but it appears to be a bit of a vestigial window, and doesn't have any method of using it. Not to mention when I searched the forums for restock the last reference to the pane is in 2009 and that was just confirming that no one has any idea of how to use it, or why it doesn't work..)
In the Restock tab, the "automall" button will place in your store all the items (except those marked memento) that you have added in the "> profitable" section of /data/itemflags.txt.
The "Host Sale" button will simply place in your store all the tradeable items with an autosell price in your inventory, automatically undercutting.
Would it be possible to add a Restock pane to the store manager?
What did you have in mind exactly?
 

lostcalpolydude

Developer
Staff member
The code shows:
PHP:
removeItemButton.setToolTipText( "remove item from store" );
and
PHP:
searchItemButton.setToolTipText( "price analysis" );
so I guess they are supposed to have tooltips. On windows, I'm not seeing them.
I'm not seeing them with OSX 10.6 either.

In the Restock tab, the "automall" button will place in your store all the items (except those marked memento) that you have added in the "> profitable" section of /data/itemflags.txt.
Can that be done without opening a text editor when mafia is closed? I'm guessing that was probably a right-click option (along with Add to junk/singleton/memento list) that was removed at some point.
 

fronobulax

Developer
Staff member
Tooltips missing here, too. I can argue in favor of the "tiny one line window" remaining where it is but the spacing should be adjusted to make it more prominent/visible. If it only lets you add one item at a time then that is something I would fix. If, however, it only lets you add one item type at a time then I would reject the feature request. When you add multiple item types, you still have to set prices individually for each item type or make an assumption to min price everything or use 999,999,999. In those cases there are existing ways to accomplish the task.
 

lostcalpolydude

Developer
Staff member
You can add any quantity of an item from there. I remember deciding early on that it wasn't worth using that for adding items, and since then I've forgotten it's even there.
 

slyz

Developer
It's the only way to add an item with a limit to your store via the interface (other than adding the item, and finding it in the list of items in your store to change the limit).
 

Veracity

Developer
Staff member
Tooltips missing here, too.
I expect that adding a tooltip will install a MouseListener on the button.
We also add a MouseListener - a ThreadedListener - to the buttons.
Supposedly, a Component can have multiple MouseListeners.

The nonfunctional tooltips are worth a different Bug Report.
 

Serin

New member
(Restock Pane)
What did you have in mind exactly?
At a bare minimum, it would be a list box that would cross-check Items in store and Items in inventory and if the resulting integer was greater than 1 it would display the item's name and the integer inside the list box. Example: End-of-run frame in the museum manager..

At the most, It would look Aesthetically similar to the store inventory table except instead of item names there would be a drop down list of inventory items, every time you would select a new item name it should spawn a new field below the selected one and allow the user to put a new item in.. In the back end, it could probably be as simple as a CSV list. Ideally, it would save over program restarts to make it so that someone could set up a specific set of objects and with one click add all (or a specified quantity) of the specified items to their store at the specific price.

I'll post a picture of what I'm thinking about below that I mocked up in paint.. Obviously it wouldn't be on the price manager tab and there would be a little more spacing between the item dropdowns.. but I believe a picture would describe it better..

It may also solve the problem of the "small window at the top of the price setup tab".. (I also took the liberty of mocking up a price setup window without it.. I think it looks a lot more sleek.

The nonfunctional tooltips are worth a different Bug Report.

I can do that, At the time of posting I didn't realize that it was a bug and not just an oversight..
 

Attachments

  • store manager new look.jpg
    store manager new look.jpg
    59.4 KB · Views: 90
  • store manager new tab.jpg
    store manager new tab.jpg
    79.1 KB · Views: 93

roippi

Developer
I'm in the process of converting the store manager over to the JXTable interface, but there's a lot to do. I have to rewrite a lot of backend because the old system depended on converting the data model to vectors; the new system doesn't touch the data model, instead using a custom renderer to display content appropriately. It's faster and uses less overhead, but it sure does complicate things.

I'm probably going to drop the "add item" line up top unless people are really attached to it. It seems like there is a whole tab for that sort of thing, I've never seen the point.
 

roippi

Developer
r11209.

I'm particularly proud of a couple bits of this. However, I did homebrew a good number of things, so report any weirdness even if it's just cosmetic.
 

Bale

Minion
report any weirdness even if it's just cosmetic.

Found some weirdness. Items added with a price of 999,999,999 are now sorted with the rest of the items instead of being automatically sorted to last place.

I'm not sure that is a bug, it is merely weird because it is different from how the store manager previously behaved. Is it intended behavior?
 

roippi

Developer
Found some weirdness. Items added with a price of 999,999,999 are now sorted with the rest of the items instead of being automatically sorted to last place.

I'm not sure that is a bug, it is merely weird because it is different from how the store manager previously behaved. Is it intended behavior?

Sort of yes? By default the table is sorted by item name, if you sorted it by price I imagine things would be added at the end.

Was the old manager sorted by price by default? Or was it some weird hybrid?
 

Bale

Minion
Hybrid: It was sorted by name, but all items at max price were put at the end to make them easy to find.

By the way, I really like the way when you change a price the cell is green until you save the prices.
 

roippi

Developer
Ah. Well JXTables do not support multiple sorting, so that's right out. Won't happen.

What we could do instead is to implement highlighters. As Bale points out, I wrote one highlighter to denote pending price changes. We could do something to items priced 999m to make them stand out.

We can actually implement really complex stuff with them. There's one that highlights price text on mouseover in that subtle blue. I'm thinking about turning the background an alarming red on potential misprices. Stuff like that.
 

lostcalpolydude

Developer
Staff member
Something that will almost certainly cost me millions of meat eventually is the removal of commas from prices once I start editing them (usually by deleting the value there, which now takes more steps than before), unless I move away from that field and go back in to edit it again.

Another thing that's even more noticeable here than with the Item Manager is that numbers are left-aligned instead of right-aligned.

It only takes 1 click to sort unpriced items to the bottom, so that doesn't seem like such a big deal.
 

roippi

Developer
Something that will almost certainly cost me millions of meat eventually is the removal of commas from prices once I start editing them (usually by deleting the value there, which now takes more steps than before), unless I move away from that field and go back in to edit it again.

You're going to have to clarify what you mean, because that didn't really make sense. Commas show up when you edit.

And I don't know what you mean by takes more steps.

Another thing that's even more noticeable here than with the Item Manager is that numbers are left-aligned instead of right-aligned.

Why is that wrong?
 
Top