Display Case Organizer

guyy

Member
This is a complete overhaul of the display case manager (managecollection.php), turning it into something that's actually usable.

Install with this CLI command:
Code:
svn checkout https://svn.code.sf.net/p/guyymafia/code/displayshelves

Sourceforge seems to be down, so here's a temporary zip version (extract to mafia folder): View attachment displayshelves.zip



Mafia does have a built-in DC tool, but it basically just lets you queue up shelf/item commands. This does... more than that.

shelves2.png

Most of the interface is self-explanatory...ish, but here's some notes:

  1. To add or remove items, cut/paste/type them into the appropriate box (one item type per line), with a number at the end for the quantity. It will auto-correct whatever you put in there.
  2. The "Fill" buttons will restock a shelf from your inventory (without adding any new types of items). So if what's in there is "a butt tuba (2)" and you've got 9 more on hand it will become "a butt tuba (11)". It will not buy, uncloset, or otherwise retrieve items from places other than main inventory.
  3. The green arrows will--obviously--move shelves up and down, but you can also type in a specific shelf number. The little blue refresh buttons will restack all the shelves according to those numbers (saving also does this, but the refresh buttons double as a handy "return to top of page" command).
  4. That little textbox between the Save and Load buttons allows you to save/load alternate case configurations--i.e. you can save your entire case as "Space," build a completely different one called "Case," and switch between them whenever. (These are saved in data/displayshelves.)
  5. Deleting a shelf will move its items to shelf 0 (as usual). Delete the list of items first (or second) if you want to remove them.
  6. If you (unfortunately) need to use the original KoL-brand DC manager, click the button all the way at the bottom.
  7. "Display Case" at the top is a link. Where it could lead? Mysterious.

Some other, less obvious improvements:

  • Fixes the notorious numbering issue. The display case has a nasty habit of getting cluttered with nonexistent deleted shelves, making new ones appear in weird places and preventing you from moving the others around freely. This script will rebuild your probably broken shelves so there aren't any weird invisible gaps, and prevent this problem from returning.
  • Makes shelf operations more efficient. Instead of moving a shelf by 10 slots (10 server hits), it will rename shelves and rearrange items (2 server hits) for the same result. Creating and deleting shelves works in a similar way.
  • It should be able to handle silly items that keep changing their names. (Looking at you, lump of indecisive eldritch matter...) If Mafia can't identify it, there will be a bracketed item number attached to it. May need to refresh inventory after adding/removing freaky ambiguous items.
 

Attachments

  • displayshelves.zip
    42.5 KB · Views: 81
Last edited:
Top